SDN Upgrade - NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer

364 views
Skip to first unread message

Mike Holdsworth

unread,
Jul 12, 2014, 3:53:13 AM7/12/14
to ne...@googlegroups.com
Using Spring-Framework 3.2.9 and Neo4j 2.1.2

I've tried 3.2.0.M1 and 3.2.0.BUILD-SNAPSHOT and get the same error.

Build snapshot from ~2 weeks ago was fine.

Any tips ?

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jTemplate' defined in class path resource [org/springframework/data/neo4j/aspects/config/Neo4jAspectConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jMappingContext' defined in class path resource [org/springframework/data/neo4j/aspects/config/Neo4jAspectConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:603)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1055)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 84 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jMappingContext' defined in class path resource [org/springframework/data/neo4j/aspects/config/Neo4jAspectConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:592)
... 93 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jMappingContext' defined in class path resource [org/springframework/data/neo4j/aspects/config/Neo4jAspectConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:269)
at org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration$$EnhancerBySpringCGLIB$$70f0f18.mappingInfrastructure(<generated>)
at org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate(Neo4jConfiguration.java:135)
at org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration$$EnhancerBySpringCGLIB$$70f0f18.CGLIB$neo4jTemplate$3(<generated>)
at org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration$$EnhancerBySpringCGLIB$$70f0f18$$FastClassBySpringCGLIB$$df863d5d.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:293)
at org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration$$EnhancerBySpringCGLIB$$70f0f18.neo4jTemplate(<generated>)
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.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
... 94 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer

Mike Holdsworth

unread,
Jul 12, 2014, 1:25:51 PM7/12/14
to ne...@googlegroups.com
I've cut back to SDN 3.1.1.RELEASE and I don't get the issue. As my tests are passing I can live with that. It appears that Neo4jConfiguration is importing "javax.enterprise.inject.Produces" which introduces a new dependency that I haven't figured out - cdi-api?

Michael Hunger

unread,
Jul 12, 2014, 8:00:28 PM7/12/14
to ne...@googlegroups.com
Mike, Ollie pointed out that the 3.2.x releaese (with the SD-Commons) requires Spring Framework 4.0.6


On Sat, Jul 12, 2014 at 7:25 PM, Mike Holdsworth <mi...@monowai.com> wrote:
I've cut back to SDN 3.1.1.RELEASE and I don't get the issue. As my tests are passing I can live with that. It appears that Neo4jConfiguration is importing "javax.enterprise.inject.Produces" which introduces a new dependency that I haven't figured out - cdi-api?

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Holdsworth

unread,
Jul 13, 2014, 3:07:58 AM7/13/14
to ne...@googlegroups.com

Given that Spring Framework is the primary dependency for SDN4j, could I suggest you alter the version number pattern? Using 4.X as the major release for Spring 4 and leaving the Spring 3.X compatible SDN version with the 3.x prefix would make things a little clearer.
Reply all
Reply to author
Forward
0 new messages