I am using Grails 3.0.5
I get this error when trying to deploy using java -Dgrails.env=prod -jar
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:8080 in environment: production
ERROR StackTrace - Full Stack Trace:
org.grails.taglib.GrailsTagException: [views/layouts/secure0.gsp:142] Error executing tag <g:render>: PermGen space
at org.grails.gsp.GroovyPage.throwRootCause(GroovyPage.java:445) ~[grails-gsp-3.0.5.jar!/:3.0.5]
at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:388) ~[grails-gsp-3.0.5.jar!/:3.0.5]
at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.4.jar!/:2.4.4]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.4.jar!/:2.4.4]
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) ~[groovy-2.4.4.jar!/:2.4.4]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) ~[groovy-2.4.4.jar!/:2.4.4]
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) ~[groovy-2.4.4.jar!/:2.4.4]
Before deployment, I test in localhost, and it runs without any error.
But after deployment I get this error.
What's wrong with my code?
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:80 in environment: production
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDis patcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in con text with path [] threw exception [Handler processing failed; nested exception i s java.lang.OutOfMemoryError: PermGen space] with root cause
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_79]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_79 ]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) ~[na:1.7.0_79]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7 .0_79]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0 _79]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_79]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_79]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0 _79]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0 _79]
at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(La unchedURLClassLoader.java:163) ~[ChatV3-0.1.jar!/:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(Laun chedURLClassLoader.java:136) ~[ChatV3-0.1.jar!/:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_79]
at org.grails.buffer.StreamCharBuffer$MultipartCharBufferChunk.asStringC hunk(StreamCharBuffer.java:1864) ~[grails-encoder-3.0.5.jar!/:3.0.5]
at org.grails.buffer.StreamCharBuffer.readToSingleStringChunk(StreamChar Buffer.java:720) ~[grails-encoder-3.0.5.jar!/:3.0.5]
at org.grails.buffer.StreamCharBuffer.toString(StreamCharBuffer.java:700 ) ~[grails-encoder-3.0.5.jar!/:3.0.5]
at org.grails.buffer.FastStringWriter.getValue(FastStringWriter.java:63) ~[grails-encoder-3.0.5.jar!/:3.0.5]
at org.grails.buffer.FastStringWriter.toString(FastStringWriter.java:59) ~[grails-encoder-3.0.5.jar!/:3.0.5]
at org.grails.web.pages.GroovyPagesUriSupport.getAbsoluteViewURIInternal (GroovyPagesUriSupport.java:225) ~[grails-web-common-3.0.5.jar!/:3.0.5]
at org.grails.web.pages.GroovyPagesUriSupport.getAbsoluteViewURI(GroovyP agesUriSupport.java:161) ~[grails-web-common-3.0.5.jar!/:3.0.5]
at org.grails.web.gsp.io.GrailsConventionGroovyPageLocator.findViewByPat h(GrailsConventionGroovyPageLocator.java:68) ~[grails-web-gsp-3.0.5.jar!/:3.0.5]
at org.grails.web.servlet.view.GroovyPageViewResolver.createGrailsView(G roovyPageViewResolver.java:186) ~[grails-web-gsp-3.0.5.jar!/:3.0.5]
at org.grails.web.servlet.view.GroovyPageViewResolver$1.call(GroovyPageV iewResolver.java:113) ~[grails-web-gsp-3.0.5.jar!/:3.0.5]
at org.grails.web.servlet.view.GroovyPageViewResolver$1.call(GroovyPageV iewResolver.java:110) ~[grails-web-gsp-3.0.5.jar!/:3.0.5]
at grails.util.CacheEntry.updateValue(CacheEntry.java:170) ~[grails-core -3.0.5.jar!/:3.0.5]
at grails.util.CacheEntry.getValue(CacheEntry.java:144) ~[grails-core-3. 0.5.jar!/:3.0.5]
at grails.util.CacheEntry.getValue(CacheEntry.java:84) ~[grails-core-3.0 .5.jar!/:3.0.5]
at grails.util.CacheEntry.getValue(CacheEntry.java:102) ~[grails-core-3. 0.5.jar!/:3.0.5]
at org.grails.web.servlet.view.GroovyPageViewResolver.loadView(GroovyPag eViewResolver.java:124) ~[grails-web-gsp-3.0.5.jar!/:3.0.5]
at grails.plugin.scaffolding.ScaffoldingViewResolver.loadView(Scaffoldin gViewResolver.groovy:36) ~[scaffolding-3.1.1.jar!/:na]
at org.springframework.web.servlet.view.AbstractCachingViewResolver.crea teView(AbstractCachingViewResolver.java:244) ~[spring-webmvc-4.1.7.RELEASE.jar!/ :4.1.7.RELEASE]
at org.springframework.web.servlet.view.UrlBasedViewResolver.createView( UrlBasedViewResolver.java:446) ~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE ]
at org.springframework.web.servlet.view.AbstractCachingViewResolver.reso lveViewName(AbstractCachingViewResolver.java:146) ~[spring-webmvc-4.1.7.RELEASE. jar!/:4.1.7.RELEASE]
ERROR StackTrace - Full Stack Trace:
org.grails.taglib.GrailsTagException: [views/layouts/main.gsp:8] Error executing tag <asset:stylesheet>: PermGen space
at org.grails.gsp.GroovyPage.throwRootCause(GroovyPage.java:445) ~[grail s-gsp-3.0.5.jar!/:3.0.5]
at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:388) ~[grails-gsp -3.0.5.jar!/:3.0.5]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7. 0_79]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) ~[na:1.7.0_79]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) ~[na:1.7.0_79]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java: 93) ~[groovy-2.4.4.jar!/:2.4.4]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2
ERROR org.apache.catalina.core.ContainerBase - Unexpected death of background thread ContainerBackgroundProcessor[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
java.lang.OutOfMemoryError: PermGen space
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ContainerBackgroundProcessor[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]"
This is what I try to do..
[root#server chat]# export GRAILS_OPTS="-server -d64 -XX:MaxPermSize=1024 -Xmx1024m"
[root#server chat]# java -Dgrails.env=prod -jar ChatV3-0.1.jar
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:80 in environment: production
ERROR asset.pipeline.AssetSpecLoader - Error loading asset specification asset.pipeline.CssAssetFile: PermGen space
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_79]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_79]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_79]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_79]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_79]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_79]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_79]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_79]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_79]
at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(LaunchedURLClassLoader.java:163) ~[ChatV3-0.1.jar!/:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:136) ~[ChatV3-0.1.jar!/:na]
When I tried to get Java
[root#server chat]# ps -ax | grep java
3700 ? Sl 1:27 /usr/java/jdk1.7.0_79/bin/java -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/root/apache-activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/root/apache-activemq/tmp -Dactivemq.classpath=/root/apache-activemq/conf; -Dactivemq.home=/root/apache-activemq -Dactivemq.base=/root/apache-activemq -Dactivemq.conf=/root/apache-activemq/conf -Dactivemq.data=/root/apache-activemq/data -jar /root/apache-activemq/bin/activemq.jar start
11544 pts/0 S+ 0:00 grep --color=auto java
You got a PermGen error.
Try using somethink like:
$ export GRAILS_OPTS="-XX:MaxPermSize=1024m -Xmx1024M -server"
$ java -Dgrails.env=prod -jar
Take a look on this questions/answers, they will help you:
Grails and PermGen issue with g:link and g:render
Grails PermGem error
I resolve my problem with
java -XX:MaxPermSize:1024m -Dgrails.env=prod -jar hellowWorld.jar
Related
The description of jclouds is given in the below link.
https://jclouds.apache.org/guides/openstack/. I have packstack installed in the machine.
java -classpath ".:lib/*" JCloudsNova
Exception in thread "main" java.util.ServiceConfigurationError: org.jclouds.apis.ApiMetadata: Provider org.jclouds.openstack.neutron.v2.NeutronApiMetadata could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:232) at java.util.ServiceLoader.access$100(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:281)at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.addAll(ImmutableCollection.java:360) at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:508) at org.jclouds.apis.Apis.all(Apis.java:72) at org.jclouds.apis.Apis.withId(Apis.java:88) at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:169) at JCloudsNova.(JCloudsNova.java:39)
at JCloudsNova.main(JCloudsNova.java:19)
Caused by: java.lang.NoClassDefFoundError: org/jclouds/openstack/keystone/v2_0/config/AuthenticationApiModule at org.jclouds.openstack.neutron.v2.NeutronApiMetadata$Builder.(NeutronApiMetadata.java:78) at org.jclouds.openstack.neutron.v2.NeutronApiMetadata.(NeutronApiMetadata.java:51) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ... 10 more
Caused by: java.lang.ClassNotFoundException: org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
When I make changes to a controller, it appears hot reloading is breaking with the following errors:
2018-01-26 19:37:43.752 ERROR --- [Loader#14dad5dc] o.s.loaded.CurrentLiveVersion : Unexpected exception whilst trying to call the static initializer on com.emmanuj.cleena.Requestmap
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springsource.loaded.CurrentLiveVersion.runStaticInitializer(CurrentLiveVersion.java:311)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:433)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1018)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError
at com.emmanuj.cleena.Requestmap$$EQhtIzZ2.___clinit___(Requestmap.groovy)
... 11 more
2018-01-26 19:37:43.770 ERROR --- [Loader#14dad5dc] o.s.loaded.CurrentLiveVersion : Unexpected exception whilst trying to call the static initializer on com.emmanuj.cleena.Role
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springsource.loaded.CurrentLiveVersion.runStaticInitializer(CurrentLiveVersion.java:311)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:433)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1018)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError
at com.emmanuj.cleena.Role$$EQhtIzZ2.___clinit___(Role.groovy)
... 11 more
2018-01-26 19:37:43.827 ERROR --- [Loader#14dad5dc] o.s.loaded.CurrentLiveVersion : Unexpected exception whilst trying to call the static initializer on com.emmanuj.cleena.User
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springsource.loaded.CurrentLiveVersion.runStaticInitializer(CurrentLiveVersion.java:311)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:433)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1018)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError
at com.emmanuj.cleena.User$$EQhtIzZ2.___clinit___(User.groovy)
... 11 more
2018-01-26 19:37:43.897 ERROR --- [Loader#14dad5dc] o.s.loaded.CurrentLiveVersion : Unexpected exception whilst trying to call the static initializer on com.emmanuj.cleena.UserRole
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springsource.loaded.CurrentLiveVersion.runStaticInitializer(CurrentLiveVersion.java:311)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:433)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1018)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError
at com.emmanuj.cleena.UserRole$$EQhtIzZ2.___clinit___(UserRole.groovy)
... 11 more
Not sure how to access the full stacktrace but it looks like this is happening for Spring Security classes with the #GrailsCompileStatic annotation.
I've the following configurations:
Grails 3.3.2
spring-security-core plugin v3.3.2
spring-security-rest plugin v2.0.0.M2; and
JVM 1.8
Update: It appears this error is happening after I make changes in my controller and then run the compile command from the grails interactive prompt.
Jenkins installation that was previously running is no longer booting. When trying to access if via web, I get an HTTP 503 error due to the service being unavailable.
Jenkins 1.567-1.1
CentOS 6.7
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (rhel-1.13.11.0.el6_7-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
I've tried installing several font packages, and have checked that it's running in headless mode. It is.
Here is the stack trace:
SEVERE: Failed to initialize Jenkins
hudson.util.AWTProblem: java.lang.NullPointerException
at hudson.WebAppMain.contextInitialized(WebAppMain.java:182)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at winstone.Launcher.<init>(Launcher.java:154)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at Main._main(Main.java:293)
at Main.main(Main.java:98)
Caused by: java.lang.NullPointerException
at sun.font.FontManager.getDefaultPlatformFont(FontManager.java:3409)
at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:263)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:164)
at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:254)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
at java.lang.Class.newInstance(Class.java:379)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.font.FontManager.initSGEnv(FontManager.java:1121)
at sun.font.FontManager.findFont2D(FontManager.java:1876)
at java.awt.Font.getFont2D(Font.java:477)
at java.awt.Font.getFamily(Font.java:1198)
at java.awt.Font.getFamily_NoClientCode(Font.java:1172)
at java.awt.Font.getFamily(Font.java:1164)
at java.awt.Font.toString(Font.java:1661)
at hudson.util.ChartUtil.<clinit>(ChartUtil.java:229)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:181)
... 19 more
May 20, 2016 9:07:53 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Failed startup of context w.{,file:/var/cache/jenkins/war/},/var/cache/jenkins/war
java.lang.NullPointerException
at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:63)
at hudson.util.BootFailure.publish(BootFailure.java:43)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:244)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at winstone.Launcher.<init>(Launcher.java:154)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at Main._main(Main.java:293)
at Main.main(Main.java:98)
The test-app command run with the below errors...
I'm execute the Grails on the Windows platform, the following recomended solutions ( that I found... ) doesn't help.
1. grails clean ; grails compile --refresh-dependencies
2. Deleted he data from .grails directory
Environment Variables JAVA_PATH,GRAILS_PATH, PATH defined properly.
Someone have idea how to fix this problem?
Loading Grails 2.3.4
|Configuring classpath
.
|Environment set to test
......................................
|Running without daemon...
java.lang.ClassNotFoundException: org.grails.ide.eclipse.runtime.GrailsEclipseConsole
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at grails.build.logging.GrailsConsole.createInstance(GrailsConsole.java:282)
at grails.build.logging.GrailsConsole.getInstance(GrailsConsole.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1725)
at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1140)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3461)
at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1152)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at org.codehaus.groovy.grails.resolve.DependencyManagerConfigurer.configureIvy(DependencyManagerConfigurer.groovy:126)
at grails.util.BuildSettings.configureDependencyManager(BuildSettings.groovy:1281)
at grails.util.BuildSettings.postLoadConfig(BuildSettings.groovy:1219)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1115)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1087)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1073)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy)
at grails.util.BuildSettings$loadConfig$1.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1053)
at grails.util.BuildSettings.loadConfig(BuildSettings.groovy)
at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProcess.initializeBuildSettings(ForkedGrailsProcess.groovy:736)
at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProjectClassExecutor.initializeProjectInstance(ForkedGrailsProjectClassExecutor.groovy:80)
at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProjectClassExecutor.run(ForkedGrailsProjectClassExecutor.groovy:73)
at org.codehaus.groovy.grails.cli.fork.testing.ForkedGrailsTestRunner.main(ForkedGrailsTestRunner.groovy:76)
I am trying to run my grails project using grails run-app command, but the following error has occured:
2013-06-05 17:01:49,409 [pool-6-thread-1] ERROR StackTrace - Full Stack Trace:
groovy.lang.MissingPropertyException: No such property: configClass for class: java.lang.String
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:35)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetPropertySafe(AbstractCallSite.java:333)
at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$__clinit__closure14.doCall(HibernatePluginSupport.groovy:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:226)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$__clinit__closure14.doCall(HibernatePluginSupport.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at groovy.lang.Closure.call(Closure.java:412)
at groovy.lang.Closure.call(Closure.java:406)
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:736)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:569)
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:511)
at org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.doWithRuntimeConfiguration(DefaultGrailsPlugin.java:528)
at org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager.doRuntimeConfiguration(AbstractGrailsPluginManager.java:120)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:156)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:121)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:104)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
2013-06-05 17:01:49,436 [pool-6-thread-1] ERROR StackTrace - Full Stack Trace:
groovy.lang.MissingPropertyException: No such property: configClass for class: java.lang.String
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:736)
at grails.spring.BeanBuilder.beans(BeanBuilder.java:569)
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:511)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
I have tried to resolve the issue as mentioned below:
tried grails clean
removed GROOVY_HOME (as grails provide the groovy itself, and i'm running the application from command line)
cleaned the %USER_HOME%.grails directory manually
But none of the above method solved the issue.
java -version returned the following:
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)
grails -version returned the following:
Grails version: 2.1.0
New stacktrace log:
Thanks in advance.
try searching for "configClass" string in your whole project and see what it is, then try commenting it out and see what happens? the error mentions "bootstraps" - maybe it's there?
Changing the workspace resolved the problem. Just created a new workspace. That's all !!!!
Check your config/DataSource.groovy for configClass and any badly formatted code such as unbalanced quotes. The datasource block sometimes has a block using configClass such as the one shown in the Hibernate Filter plugin documentation:
dataSource {
…
configClass = HibernateFilterDomainConfiguration
}
Alternatively, perhaps you need to add a configClass definition for a plugin to work.