Grails plugin error : class path resource cannot be resolved - grails

I have the following error ( java.io.FileNotFoundException ) in my log file.
The plugin's path doesn't exist :
class path resource [E:/projet/toolprod/fichiers_install/toolprod/target/work/resources/plugins/webxml-1.4.1/grails-app/i18n/] cannot be resolved to URL because it does not exist
Perhaps, it's due to old things ?
How can I fix it ?
Here is the full stacktrace :
2015-09-14 12:04:56,575 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.io.FileNotFoundException: class path resource [E:/projet/toolprod/fichiers_install/toolprod/target/work/resources/plugins/webxml-1.4.1/grails-app/i18n/] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:412)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:286)
at org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.getPluginBundles(PluginAwareResourceBundleMessageSource.java:152)
at org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.afterPropertiesSet(PluginAwareResourceBundleMessageSource.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:625)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:468)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.initializeContext(GrailsRuntimeConfigurator.java:188)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:168)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:126)
at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:109)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
2015-09-14 12:04:56,610 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.io.FileNotFoundException: class path resource [E:/projet/toolprod/fichiers_install/toolprod/target/work/resources/plugins/webxml-1.4.1/grails-app/i18n/] cannot be resolved to URL because it does not exist
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)

I upgrade the grails version (2.5.0) to Grails 2.5.1 and the error disappears.

Related

Suddenly unable to launch Grails: "Error creating bean with name 'grailsApplication'"

I've been able to run Grails integration tests previously (I think Dec was the last time), but now I'm getting the error pasted below. A colleague has stated that he's currently able to run, so it seems like something must have changed on my laptop even though I can't imagine what (I'm using macOS Sierra, he's on Windows).
I tried clean, clean-all and those didn't help.
Is there something else I could try to clean or any other ideas on what has gone wrong?
Fatal error running tests: Error creating bean with name 'grailsApplication': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.codehaus.groovy.grails.commons.DefaultGrailsApplication]: Constructor threw exception; nested exception is java.lang.NullPointerException (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.codehaus.groovy.grails.commons.DefaultGrailsApplication]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1137)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:966)
at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:553)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:455)
at grails.spring.BeanBuilder.createApplicationContext(BeanBuilder.java:593)
at _GrailsTest$_run_closure1.doCall(_GrailsTest.groovy:102)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at TestApp$_run_closure1.doCall(TestApp.groovy:32)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:591)
at gant.Gant.executeTargets(Gant.groovy:590)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.codehaus.groovy.grails.commons.DefaultGrailsApplication]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
... 39 more
Caused by: java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 41 more
Here's the command IntelliJ tells me is running:
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Dgrails.home=/Users/username/src/grails-2.5.5 -Dtools.jar=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/tools.jar -Dgroovy.starter.conf=/Users/username/src/grails-2.5.5/conf/groovy-starter.conf -Dbase.dir=/Users/username/IdeaProjects/gdbxt-git -Dgrails.build.listeners=org.jetbrains.groovy.grails.rt.GrailsIdeaTestListener -Dfile.encoding=UTF-8 -classpath /Users/username/src/grails-2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.5.jar:/Users/username/src/grails-2.5.5/dist/grails-bootstrap-2.5.5.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/Grails/lib/grails-rt.jar" --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf /Users/username/src/grails-2.5.5/conf/groovy-starter.conf "test-app integration: --stacktrace -plain-output"
But I get the same error if I run
grails test-app integration: --stacktrace -plain-output
in the terminal.
If I try grails run-app, then I see something similar:
2018-03-01 08:33:50,828 [main] WARN webxml.WebxmlGrailsPlugin - Did not find application config file: WebXmlConfig
| Running Grails application
2018-03-01 08:33:51,785 [localhost-startStop-1] INFO context.ContextLoader - Root WebApplicationContext: initialization started
2018-03-01 08:33:51,795 [localhost-startStop-1] INFO support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Thu Mar 01 08:33:51 EST 2018]; root of context hierarchy
2018-03-01 08:33:51,811 [localhost-startStop-1] INFO xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2018-03-01 08:33:52,863 [localhost-startStop-1] WARN support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535)
at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:463)
at java.lang.ClassLoader.loadClass(ClassLoader.java:404)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
... 4 more
2018-03-01 08:33:52,864 [localhost-startStop-1] ERROR context.ContextLoader - Context initialization failed

Terracotta 4.3 - jar conflicts

I am trying to configure terracotta 4.3 with my application. I have done all the necessary changes but when i start my tomcat server, i get the below error(in bold). Can someone suggest how do i go about resolving it. Please note that i cannot exclude jaxrs-api.jar as it is needed for external rest calls.
SEVERE: Exception sending context initialized event to listener
instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'pendingAccountCacheManager' defined in URL
[file:/C:/dev/apache-tomcat-7.0.16_1/webapps/account/WEB-INF/classes/context/account-cacheloader.xml]:
Invocation of init method failed; nested exception is
net.sf.ehcache.CacheException: Failed to instantiate ManagementServer.
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
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:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722) Caused by:
net.sf.ehcache.CacheException: Failed to instantiate ManagementServer.
at
net.sf.ehcache.management.ManagementServerLoader.register(ManagementServerLoader.java:140)
at
net.sf.ehcache.CacheManager.initializeManagementService(CacheManager.java:553)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:516) at
net.sf.ehcache.CacheManager.init(CacheManager.java:395) at
net.sf.ehcache.CacheManager.(CacheManager.java:356) at
org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:138)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
... 20 more Caused by: java.lang.reflect.InvocationTargetException
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
net.sf.ehcache.management.ManagementServerLoader$ManagementServerHolder.start(ManagementServerLoader.java:215)
at
net.sf.ehcache.management.ManagementServerLoader.register(ManagementServerLoader.java:125)
... 27 more
Caused by: java.lang.LinkageError: ClassCastException: attempting to castjar:file:/C:/dev/apache-tomcat-7.0.16_1/webapps/pendingaccount/WEB-INF/lib/jaxrs-api-3.0.9.Final.jar!/javax/ws/rs/client/ClientBuilder.class
to
jar:file:/C:/dev/apache-tomcat-7.0.16_1/webapps/pendingaccount/WEB-INF/lib/ehcache-ee-2.10.0.0.26.jar!/rest-management-private-classpath/javax/ws/rs/client/ClientBuilder.class_terracotta
at
javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97)
at
com.terracotta.management.security.impl.JerseyIdentityAssertionServiceClient.(JerseyIdentityAssertionServiceClient.java:67)
at
net.sf.ehcache.management.ManagementServerImplEE.loadEmbeddedAgentServiceLocator(ManagementServerImplEE.java:132)
at
net.sf.ehcache.management.ManagementServerImplEE.initialize(ManagementServerImplEE.java:71)
at
net.sf.ehcache.management.ManagementServerImplEE.initialize(ManagementServerImplEE.java:184)
... 33 more
To resolve this,I added the ehcache-ee-2.10.0.0.26.jar and other terracotta related jars into the endorsed folder of tomcat. This helped resolve the issue of conflicting jars.

IntelliJ: Spring loaded not working on Grails 2.3.x projects

Changes to controllers and services are not compiled and reloaded automatically like STS. This however works on Grails 2.4.x. What is missing on 2.3.x?
I'm using Grails 2.3.11.
Update:
I tried run-app -reloading but I get the following after that:
2015-06-05 22:03:21,495 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetDeclaredAnnotations(ReflectiveInterceptor.java:946)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetAnnotations(ReflectiveInterceptor.java:1502)
at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:164)
at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:128)
at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:88)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:255)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:225)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:169)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:122)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
2015-06-05 22:03:21,499 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
2015-06-05 22:03:21,499 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
2015-06-05 22:03:21,499 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
Disconnected from the target VM, address: '127.0.0.1:36337', transport: 'socket'

Unable to start Neo4j WrappingNeoServerBootstrapper when deployed as WAR

I have a Grails application running Neo4j as an embedded graph, and want to run the server application. The application runs ok on my local machine using run-app, as well as using run-war, but when I deploy the application as a WAR file under Tomcat, I get the following null pointer exception. Can anyone please advise?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.initializeContext(GrailsRuntimeConfigurator.java:188)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:168)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:126)
at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:109)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
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:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1682)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
... 29 more
2014-12-05 15:33:13,769 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
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:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1682)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.initializeContext(GrailsRuntimeConfigurator.java:188)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:168)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:126)
at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:109)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
2014-12-05 15:33:13,770 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
... 5 more
2014-12-05 15:33:13,771 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
... 5 more
2014-12-05 15:33:13,771 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
2014-12-05 15:33:13,771 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
... 5 more
2014-12-05 15:33:13,780 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
... 5 more
2014-12-05 15:33:13,780 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
2014-12-05 15:33:13,780 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverWrapper': Invocation of init method failed; nested exception is java.lang.NullPointerException
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:89)
... 5 more
The bean serverWrapper is defined in resources.groovy:
serverWrapper(org.neo4j.server.WrappingNeoServerBootstrapper) { bean->
bean.constructorArgs = [ref('graphDatabaseService')]
bean.initMethod="start"
bean.destroyMethod="stop"

grails -reloading run-app fails to run a Grails up throwing the following error

I'm using Grails 2.3.0 on Java 1.6.0_30
2014-05-12 15:21:49,378 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetDeclaredAnnotations(ReflectiveInterceptor.java:935)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetAnnotations(ReflectiveInterceptor.java:1491)
at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:163)
at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:106)
at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:88)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:153)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:169)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:122)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2014-05-12 15:21:49,386 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2014-05-12 15:21:49,387 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2014-05-12 15:21:49,387 [localhost-startStop-1] ERROR StackTrace - Full Stack Trace:
java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Try upgrade to the latest 2.3.8 version of Grails.
I would try to run grails clean and then try again.
Download springloaded-1.2.0.RELEASE.jar or latest. Put in in grails dir. Run grails with following commands
set GRAILS_OPTS=-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -javaagent:springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true
grailsw -no-reloading run-app
Note: -no-reloading is to disable default reloading springloaded. It will wirk fine with reloading

Resources