Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

Spring-Data 1.3.2 with spring-tx-3.2.x

$
0
0
I wanted to upgrade my project to newest Spring versions. However now my unit tests don't run anymore because the context fails to load.

This happens when set spring-orm to version > 3.2.2 or 3.2.2 (3.2.1 works!). After looking into this I saw that going from 3.2.1 to 3.2.2 changes spring-tx dependency from 3.1.4 to 3.2.3. So I assume the issue lies in the tx module and not spring-orm itself (but I could be wrong).

Any idea what cause this issue?

Stack trace: (Note omitting java.lang.IllegalStateException: Failed to load ApplicationContext due to post lenght limitations...)

Code:

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ApplicationContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler] for namespace [http://www.springframework.org/schema/data/jpa]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.support.AbstractGenericContextLoader.loadBeanDefinitions(AbstractGenericContextLoader.java:233) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:117) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:248) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:64) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:91) ~[spring-test-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        ... 33 common frames omitted
Caused by: org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler] for namespace [http://www.springframework.org/schema/data/jpa]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension
        at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:139) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1433) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:185) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        ... 46 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension
        at org.springframework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler.init(JpaRepositoryNameSpaceHandler.java:36) ~[spring-data-jpa-1.3.2.RELEASE.jar:na]
        at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:130) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
        ... 53 common frames omitted


Viewing all articles
Browse latest Browse all 297

Trending Articles