javax.persistence dependency error using spring-context - maven

I am developing an application using spring-data-jpa. The application launches and runs without any problem, but when I want to write unit tests using spring-context, it seems that I have a dependency conflict due to a JPA1 dependency, which seems to be brought by spring-context(provided by spring-web, spring-webmvc, spring-data-jpa).
Here is my Test(shouldn't be relevant, I provide the code just in case):
package com.company.dashboard.core.services.archiving;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.company.dashboard.config.CoreConfig;
import com.company.dashboard.config.MVCConfig;
import com.company.dashboard.config.PersistenceJPAConfig;
import com.company.dashboard.config.WebAppInitializer;
import com.company.dashboard.core.util.Converter;
import com.company.dashboard.persistence.repository.RecordRepository;
import com.company.dashboard.persistence.repository.RequestRepository;
import com.company.dashboard.rest.domain.RestRequest;
#RunWith(SpringJUnit4ClassRunner.class)
#ContextConfiguration(classes = {MVCConfig.class, PersistenceJPAConfig.class, CoreConfig.class, WebAppInitializer.class})
public class ContextServiceTest {
#Mock
private RequestRepository requestRepository;
#Mock
private RecordRepository recordRepository;
#Mock
private Converter converter ;
#InjectMocks
#Autowired
ArchivingService archivingService;
#Before
public void init() {
MockitoAnnotations.initMocks(this);
}
#Test
public void myTest() {
List<RestRequest> restRequests = archivingService.findLastArchivingRequests("userId", true);
}
}
My Stacktrace:
01-08-2014 15:13:19 ERROR TestContextManager:334 - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener#30848636] to prepare test instance [com.company.dashboard.core.services.archiving.ContextServiceTest#4c875c1c]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)
at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:101)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:331)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:213)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:290)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:292)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exceptionTranslation' defined in class com.company.dashboard.config.PersistenceJPAConfig: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class com.company.dashboard.config.PersistenceJPAConfig: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:220)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:618)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:250)
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:64)
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:91)
... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class com.company.dashboard.config.PersistenceJPAConfig: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
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:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:470)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:277)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:71)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:84)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1540)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
... 39 more
Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
at org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor.getValidationMode(PersistenceUnitInfoDescriptor.java:99)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.mergePropertySources(EntityManagerFactoryBuilderImpl.java:567)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:212)
at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:51)
at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:182)
at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:177)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:290)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 54 more
My maven dependency tree:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # software-dashboard ---
[INFO] com.company:software-dashboard:war:0.0.1-SNAPSHOT
[INFO] +- org.springframework:spring-core:jar:4.0.6.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] +- org.springframework:spring-web:jar:4.0.6.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.0.6.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- org.springframework:spring-context:jar:4.0.6.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.0.6.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.0.6.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:4.0.6.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-jpa:jar:1.6.2.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.8.2.RELEASE:compile
[INFO] | +- org.springframework:spring-orm:jar:3.2.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:3.2.10.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:3.2.10.RELEASE:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.8.1:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[INFO] +- org.springframework:spring-test:jar:4.0.6.RELEASE:compile
[INFO] +- org.apache.maven.plugins:maven-surefire-plugin:jar:2.13:compile
[INFO] | +- org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[INFO] | +- org.apache.maven.surefire:maven-surefire-common:jar:2.13:compile
[INFO] | | +- org.apache.maven.surefire:surefire-booter:jar:2.13:compile
[INFO] | | +- org.apache.maven:maven-artifact:jar:2.0.9:compile
[INFO] | | | \- org.codehaus.plexus:plexus-utils:jar:1.5.1:compile
[INFO] | | +- org.apache.maven:maven-plugin-descriptor:jar:2.0.9:compile
[INFO] | | | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO] | | +- org.apache.maven:maven-project:jar:2.0.9:compile
[INFO] | | | +- org.apache.maven:maven-settings:jar:2.0.9:compile
[INFO] | | | +- org.apache.maven:maven-profile:jar:2.0.9:compile
[INFO] | | | +- org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[INFO] | | | \- org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[INFO] | | +- org.apache.maven:maven-model:jar:2.0.9:compile
[INFO] | | \- org.apache.maven:maven-core:jar:2.0.9:compile
[INFO] | | +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9:compile
[INFO] | | +- org.apache.maven.reporting:maven-reporting-api:jar:2.0.9:compile
[INFO] | | +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[INFO] | | +- org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[INFO] | | +- org.apache.maven:maven-error-diagnostics:jar:2.0.9:compile
[INFO] | | +- org.apache.maven:maven-monitor:jar:2.0.9:compile
[INFO] | | \- classworlds:classworlds:jar:1.1:compile
[INFO] | +- org.apache.maven.surefire:surefire-api:jar:2.13:compile
[INFO] | +- org.apache.maven:maven-toolchain:jar:2.0.9:compile
[INFO] | \- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] +- com.oracle:ojdbc7:jar:12.1.0.1:compile
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:4.3.6.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[INFO] | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] | +- org.hibernate:hibernate-core:jar:4.3.6.Final:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | \- org.jboss:jandex:jar:1.1.0.Final:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] +- com.company.software.kernel:API_RMI:jar:4.7.1.1:compile
[INFO] | +- com.company.software.kernel:API_OBJECTS:jar:4.7.1.1:compile
[INFO] | +- com.company.software.kernel:AUTHENT:jar:4.7.1.1:compile
[INFO] | +- com.company.software.kernel:LDAP:jar:4.7.1.1:compile
[INFO] | | \- com.company.software:ACM_TOOLBOX:jar:1.2.2-SNAPSHOT:compile
[INFO] | | \- log4j:log4j:jar:1.2.15:compile
[INFO] | | +- javax.mail:mail:jar:1.4:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | +- javax.jms:jms:jar:1.1:compile
[INFO] | | +- com.sun.jdmk:jmxtools:jar:1.2.1:compile
[INFO] | | \- com.sun.jmx:jmxri:jar:1.2.1:compile
[INFO] | +- com.company.software.kernel:DB:jar:4.7.1.1:compile
[INFO] | | +- proxool:proxool:jar:0.9.1:compile
[INFO] | | +- com.jolbox:bonecp:jar:0.7.1.RELEASE:compile
[INFO] | | | \- com.google.guava:guava:jar:r08:compile
[INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.4:compile
[INFO] | | +- commons-dbcp:commons-dbcp:jar:1.3:compile
[INFO] | | | \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] | | +- javax.ejb:ejb-api:jar:3.0:runtime
[INFO] | | +- net.sourceforge.jtds:jtds:jar:1.2.5:compile
[INFO] | | +- mysql:mysql-connector-java:jar:5.1.10:compile
[INFO] | | \- ojdbc:ojdbc:jar:14:compile
[INFO] | +- com.company.software.kernel:GLOBAL:jar:4.7.1.1:compile
[INFO] | +- org.apache.cxf:cxf-bundle:jar:2.4.0:compile
[INFO] | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0:compile
[INFO] | | +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.0.0:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-servlet_3.0_spec:jar:1.0:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:jar:1.0:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.3:compile
[INFO] | +- org.jasig.cas.client:cas-client-core:jar:3.2.1:compile
[INFO] | +- com.unboundid:unboundid-ldapsdk:jar:2.3.1:runtime
[INFO] | \- javax.xml.bind:jaxb-api:jar:2.2.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.0:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.0:compile
[INFO] +- net.sf.dozer:dozer:jar:5.5.1:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.1:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | \- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.4.0:compile
[INFO] +- javassist:javassist:jar:3.12.1.GA:compile
[INFO] +- proxool:cglib:jar:0.9.1:provided
[INFO] +- org.mockito:mockito-all:jar:1.9.5:compile
[INFO] +- org.testng:testng:jar:6.8.8:test
[INFO] | +- org.beanshell:bsh:jar:2.0b4:test
[INFO] | \- com.beust:jcommander:jar:1.27:test
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
I know that the PersistenceUnit comes from following jar:
javax.persistence - persistence-api-1.0.2.jar - M2_REPO/javax/persistence/persistence-api/1.0.2 - /home/user/.m2/repository/javax/persistence/persistence-api/1.0.2/persistence-api-1.0.2.jar - software-dashboard.
I tried excluding the jar in spring web, spring webmvc, spring data jpa using:
<exclusions>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
but it didn't do the trick.
Finally I tried deleting manually the jar from the classpath but I got a NullPointerException instead. After putting it back manually I get the previous exception again.
Is my understanding of the problem right? If so, what is the right "maven way" to go?
Thanks,
Harald

Related

Bean Creation Exception with org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration

We have been using spring boot 1.4.7.RELEASE version with spring security 4.1.0.RELEASE Version very successfully, recently we wanted to upgrade the boot as well security versions to 1.5.9, and the one that comes bundled is 4.2.3, but we are facing this Exception while starting up the project, via the commandline as well as on tomcat. Any help on this would be appreciated.
I have already tried to search similar issues in stack overflow as well as Github Issues database without much success.
org.springframework.beans.factory.BeanCreationException: Error creating bean ?>with name 'springSecurityFilterChain' defined in >org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration: Bean instantiation via factory method failed; nested exception is >org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 's
pringSecurityFilterChain' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration.getIgnored(Lorg/springfra
mework/boot/autoconfigure/security/SecurityProperties;)Ljava/util/List;
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RE
LEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at com.AuthApplication.main(AuthApplication.java:29) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang
.NoSuchMethodError: org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration.getIgnored(Lorg/springframework/boot/autoconfigure/security/SecurityProperties;)Ljava/util/List;
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
... 20 common frames omitted
Caused by: java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration.getIgnored(Lorg/springframework/boot/autoconfigure/security/SecurityPropertie
s;)Ljava/util/List;
at org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration$IgnoredPathsWebSecurityConfigurerAdapter.init(ManagementWebSecurityAutoConfiguration.java:160) ~[spring-boot-a
ctuator-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration$IgnoredPathsWebSecurityConfigurerAdapter.init(ManagementWebSecurityAutoConfiguration.java:128) ~[spring-boot-a
ctuator-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371) ~[spring-security-config-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325) ~[spring-security-config-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) ~[spring-security-config-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104) ~[spring-security-config-4.2.3.RELEASE.jar:4.
2.3.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26dd16a8.CGLIB$springSecurityFilterChain$4() ~[spring-security-config-4
.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26dd16a8$$FastClassBySpringCGLIB$$f16ff4cb.invoke() ~[spring-security-c
onfig-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26dd16a8.springSecurityFilterChain() ~[spring-security-config-4.2.3.REL
EASE.jar:4.2.3.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
... 21 common frames omitted
[INFO] +- org.owasp.encoder:encoder:jar:1.1.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.5.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.9.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.9.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | +- org.thymeleaf:thymeleaf-spring4:jar:2.1.6.RELEASE:compile
[INFO] | \- nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:jar:1.4.0:compile
[INFO] | \- org.codehaus.groovy:groovy:jar:2.4.13:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.9.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.9.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.9.RELEASE:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.23:compile
[INFO] | | \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.23:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.23:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.23:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.9.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.9.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.9.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.2.1:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] | +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | \- org.objenesis:objenesis:jar:2.1:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.13.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter-web-services:jar:1.5.9.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework.ws:spring-ws-core:jar:2.4.2.RELEASE:compile
[INFO] | \- org.springframework.ws:spring-xml:jar:2.4.2.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-beans:jar:4.3.13.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-test:jar:4.2.3.RELEASE:test
[INFO] +- org.springframework.security:spring-security-taglibs:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-acl:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework:spring-jdbc:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-redis:jar:1.8.9.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-keyvalue:jar:1.2.9.RELEASE:compile
[INFO] | | \- org.springframework.data:spring-data-commons:jar:1.13.9.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:4.3.13.RELEASE:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] +- com.rabbitmq:amqp-client:jar:3.4.4:compile
[INFO] +- org.zeromq:jeromq:jar:0.3.5:compile
[INFO] +- commons-cli:commons-cli:jar:1.1:compile
[INFO] +- commons-codec:commons-codec:jar:1.9:compile
[INFO] +- commons-io:commons-io:jar:1.2:compile
[INFO] +- com.omne:omnesys:jar:1.18.0.0:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.7:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.7:compile
[INFO] +- org.apache.logging.log4j:log4j-1.2-api:jar:2.3:compile
[INFO] +- com.lmax:disruptor:jar:3.3.0:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile
[INFO] | \- xerces:xercesImpl:jar:2.9.1:compile
[INFO] +- bsf:bsf:jar:2.4.0:compile
[INFO] +- org.thymeleaf.extras:thymeleaf-extras-springsecurity3:jar:2.1.2.RELEASE:compile
[INFO] | \- org.thymeleaf:thymeleaf:jar:2.1.6.RELEASE:compile
[INFO] | +- ognl:ognl:jar:3.0.8:compile
[INFO] | +- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] +- net.sf.ehcache:ehcache:jar:2.9.0:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework:spring-context-support:jar:4.1.7.RELEASE:compile
[INFO] +- org.json:json:jar:20151123:compile
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.52:compile
[INFO] +- org.bouncycastle:bcpkix-jdk15on:jar:1.52:compile
[INFO] +- xalan:xalan:jar:2.7.1:compile
[INFO] | \- xalan:serializer:jar:2.7.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- org.springframework.boot:spring-boot-starter-integration:jar:1.5.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.9.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] | +- org.springframework.integration:spring-integration-core:jar:4.3.12.RELEASE:compile
[INFO] | | \- org.springframework.retry:spring-retry:jar:1.2.1.RELEASE:compile
[INFO] | \- org.springframework.integration:spring-integration-java-dsl:jar:1.2.3.RELEASE:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.0:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.2:compile
[INFO] +- com.google.inject:guice:jar:2.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-websocket:jar:1.5.9.RELEASE:compile
[INFO] | +- org.springframework:spring-messaging:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-websocket:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-freemarker:jar:1.5.9.RELEASE:compile
[INFO] | \- org.freemarker:freemarker:jar:2.3.27-incubating:compile
[INFO] +- ant-contrib:ant-contrib:jar:1.0b3:compile
[INFO] +- org.apache.ant:ant-nodeps:jar:1.8.1:compile
[INFO] | \- org.apache.ant:ant:jar:1.8.1:compile
[INFO] | \- org.apache.ant:ant-launcher:jar:1.8.1:compile
[INFO] +- ant:ant-commons-net:jar:1.6.5:compile
[INFO] +- commons-net:commons-net:jar:1.4.1:compile
[INFO] | \- oro:oro:jar:2.0.8:compile
[INFO] +- org.springframework.boot:spring-boot-actuator:jar:1.3.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.9.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.9.RELEASE:compile
[INFO] +- com.sun.jersey:jersey-client:jar:1.19.3:compile
[INFO] | \- com.sun.jersey:jersey-core:jar:1.19.3:compile
[INFO] | \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO] | \- org.apache.httpcomponents:httpcore:jar:4.4.8:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- org.springframework.session:spring-session:jar:1.3.1.RELEASE:compile
[INFO] +- org.apache.commons:commons-pool2:jar:2.4.2:compile
[INFO] \- redis.clients:jedis:jar:2.9.0:compile
It's due to this dependency: org.springframework.boot:spring-boot-actuator:jar:1.3.3.RELE‌​ASE. The ManagementWebSecurityAutoConfiguration class use an older version of SpringBootWebSecurityConfiguration, calling the static method getIgnored that doesn't exist in org.springframework.boot:spring-boot-autoconfigure:jar:1.5.9‌​.RELEASE. Updating this dependency to org.springframework.boot:spring-boot-actuator:jar:1.5.9.RELE‌​‌​ASE should solve your problem

Spring MVC + Spring Security + LDAP

I have this WebSecurityConfig:
#Configuration
#EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
#Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeRequests()
.antMatchers("/about", "/register").permitAll()
.antMatchers("/p1", "/p2", "/landing").fullyAuthenticated()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.permitAll();
}
#Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth
.ldapAuthentication()
.userDnPatterns("uid={0},ou=people")
.groupSearchBase("ou=groups")
.contextSource()
.ldif("classpath:test-server.ldif")
.and()
.passwordCompare()
.passwordEncoder(new LdapShaPasswordEncoder())
.passwordAttribute("userpassword")
;
}
#Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/resources/**", "/css/**", "/js/**", "/img/**");
}
My ldif file is properly placed and I have a LoginController returning a html page. However, when building with maven I get:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webSecurityConfig': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcContentNegotiationManager' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.accept.ContentNegotiationManager]: Factory method 'mvcContentNegotiationManager' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.accept.ContentNegotiationManagerFactoryBean.build()Lorg/springframework/web/accept/ContentNegotiationManager;
My mvn dependency:tree:
[INFO] +- org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework:spring-web:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.ldap:spring-ldap-core:jar:2.3.2.RELEASE:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] | \- org.springframework:spring-tx:jar:4.3.4.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-ldap:jar:4.2.3.RELEASE:compile
[INFO] +- com.unboundid:unboundid-ldapsdk:jar:4.0.1:compile
[INFO] +- org.springframework.kafka:spring-kafka:jar:2.0.0.RELEASE:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.0.0.RELEASE:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.2.0.RELEASE:compile
[INFO] | \- org.apache.kafka:kafka-clients:jar:0.11.0.0:compile
[INFO] | +- net.jpountz.lz4:lz4:jar:1.3.0:compile
[INFO] | \- org.xerial.snappy:snappy-java:jar:1.1.2.6:compile
[INFO] +- org.springframework:spring-core:jar:5.0.0.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:5.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-websocket:jar:5.0.0.RELEASE:compile
[INFO] +- org.apache.hbase:hbase-client:jar:1.3.1:compile
[INFO] | +- org.apache.hbase:hbase-annotations:jar:1.3.1:compile
[INFO] | | +- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile
[INFO] | | \- log4j:log4j:jar:1.2.17:compile
[INFO] | +- org.apache.hbase:hbase-common:jar:1.3.1:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | \- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
[INFO] | +- org.apache.hbase:hbase-protocol:jar:1.3.1:compile
[INFO] | +- commons-codec:commons-codec:jar:1.9:compile
[INFO] | +- commons-io:commons-io:jar:2.4:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | +- com.google.guava:guava:jar:12.0.1:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
[INFO] | +- io.netty:netty-all:jar:4.0.23.Final:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] | | \- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] | +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | +- org.jruby.jcodings:jcodings:jar:1.0.8:compile
[INFO] | +- org.jruby.joni:joni:jar:2.1.2:compile
[INFO] | +- com.yammer.metrics:metrics-core:jar:2.2.0:compile
[INFO] | +- org.apache.hadoop:hadoop-auth:jar:2.5.1:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.2.4:compile
[INFO] | | \- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
[INFO] | | +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
[INFO] | | +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
[INFO] | | \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
[INFO] | +- org.apache.hadoop:hadoop-common:jar:2.5.1:compile
[INFO] | | +- org.apache.hadoop:hadoop-annotations:jar:2.5.1:compile
[INFO] | | | \- jdk.tools:jdk.tools:jar:1.6:system
[INFO] | | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | | +- org.apache.commons:commons-math3:jar:3.1.1:compile
[INFO] | | +- xmlenc:xmlenc:jar:0.52:compile
[INFO] | | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | | +- commons-net:commons-net:jar:3.1:compile
[INFO] | | +- commons-el:commons-el:jar:1.0:runtime
[INFO] | | +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | | | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | | +- org.apache.avro:avro:jar:1.7.4:compile
[INFO] | | | \- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | +- com.jcraft:jsch:jar:0.1.42:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | \- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | | \- org.tukaani:xz:jar:1.0:compile
[INFO] | +- org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.5.1:compile
[INFO] | | +- org.apache.hadoop:hadoop-yarn-common:jar:2.5.1:compile
[INFO] | | | +- org.apache.hadoop:hadoop-yarn-api:jar:2.5.1:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | \- io.netty:netty:jar:3.6.2.Final:compile
[INFO] | \- junit:junit:jar:4.12:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.springframework:spring-webmvc:jar:5.0.0.RELEASE:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.0:provided
[INFO] +- org.thymeleaf:thymeleaf-spring4:jar:2.1.5.RELEASE:compile
[INFO] | \- org.thymeleaf:thymeleaf:jar:2.1.5.RELEASE:compile
[INFO] | +- ognl:ognl:jar:3.0.8:compile
[INFO] | +- org.javassist:javassist:jar:3.16.1-GA:compile
[INFO] | \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-hadoop:jar:2.5.0.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-hadoop-core:jar:2.5.0.RELEASE:compile
[INFO] | | +- org.apache.hadoop:hadoop-streaming:jar:2.7.3:compile
[INFO] | | +- org.apache.hadoop:hadoop-distcp:jar:2.7.3:compile
[INFO] | | +- org.apache.hadoop:hadoop-hdfs:jar:2.7.3:compile
[INFO] | | | +- org.mortbay.jetty:jetty:jar:6.1.26:compile
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] | | | +- com.sun.jersey:jersey-server:jar:1.9:compile
[INFO] | | | | \- asm:asm:jar:3.1:compile
[INFO] | | | +- commons-daemon:commons-daemon:jar:1.0.13:compile
[INFO] | | | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | | | +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | | | | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | | | \- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:compile
[INFO] | | \- org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.7.3:compile
[INFO] | | +- org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.7.3:compile
[INFO] | | | +- org.apache.hadoop:hadoop-yarn-client:jar:2.7.3:compile
[INFO] | | | \- org.apache.hadoop:hadoop-yarn-server-common:jar:2.7.3:compile
[INFO] | | +- org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.7.3:compile
[INFO] | | | \- org.apache.hadoop:hadoop-yarn-server-nodemanager:jar:2.7.3:compile
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.9:compile
[INFO] | | | +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] | | | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] | | | | \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] | | | \- com.sun.jersey.contribs:jersey-guice:jar:1.9:compile
[INFO] | | \- com.google.inject.extensions:guice-servlet:jar:3.0:compile
[INFO] | | \- com.google.inject:guice:jar:3.0:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.springframework.data:spring-data-hadoop-hive:jar:2.5.0.RELEASE:compile
[INFO] | | \- org.springframework.batch:spring-batch-core:jar:3.0.7.RELEASE:compile
[INFO] | | +- com.ibm.jbatch:com.ibm.jbatch-tck-spi:jar:1.0:compile
[INFO] | | | \- javax.batch:javax.batch-api:jar:1.0:compile
[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.4.7:compile
[INFO] | | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | | +- org.codehaus.jettison:jettison:jar:1.2:compile
[INFO] | | \- org.springframework.batch:spring-batch-infrastructure:jar:3.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-hadoop-hbase:jar:2.5.0.RELEASE:compile
[INFO] | +- org.springframework:spring-jdbc:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-hadoop-pig:jar:2.5.0.RELEASE:compile
[INFO] | \- org.springframework.data:spring-data-hadoop-batch:jar:2.5.0.RELEASE:compile
[INFO] +- org.springframework:spring-dao:jar:2.0.8:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.9.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] \- org.json:json:jar:20170516:compile
Any thoughts?
From the error, it looks like there is some problem with the versions of spring jar files that you are using
If you look at the documentation of ContentNegotiationManagerFactoryBean class here, the build() method was introduced in the version 5.0
public ContentNegotiationManager build()
Actually build the ContentNegotiationManager.
Since:
5.0
The class ContentNegotiationManagerFactoryBean is present in the org.springframework:spring-web jar file. As per your mvn dependency tree, the version is org.springframework:spring-web:jar:4.3.9.RELEASE
This 4.3.9 version doesn't contain build() method as per the documentation 4.3.9 release . So, you are getting this error.
If you can change org.springframework:spring-web:jar:4.3.9.RELEASE to org.springframework:spring-web:jar:5.0.0.RELEASE, it should solve your problem.
I had a similar problem:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcContentNegotiationManager' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.accept.ContentNegotiationManager]: Factory method 'mvcContentNegotiationManager' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.accept.ContentNegotiationManagerFactoryBean.build()Lorg/springframework/web/accept/ContentNegotiationManager;
My dependencies in build.gradle:
buildscript {
ext {
springBootVersion = '1.5.9.RELEASE'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-release" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
.....
dependencies {
compile('org.springframework:spring-webmvc:2.5.2.RELEASE')
compile('org.springframework.boot:spring-boot-starter-jersey')
compile('org.springframework.boot:spring-boot-starter-security')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
}
I open File/Project structure/Libraries (i use intellij idea) and checked versions of dependences:
I am not sure but i think then i not clearly specified versions of dependencies Gradle used previous version for this dependencies on default.
Then i specified manually necessary version in build.gradle:
dependencies {
compile 'org.springframework:spring-webmvc:5.0.2.RELEASE'
compile 'org.springframework:spring-web:5.0.2.RELEASE'
compile 'org.springframework:spring-expression:5.0.2.RELEASE'
compile 'org.springframework:spring-aop:5.0.2.RELEASE'
compile 'org.springframework:spring-beans:5.0.2.RELEASE'
compile 'org.springframework:spring-context:5.0.2.RELEASE'
compile 'org.springframework:spring-core:5.0.2.RELEASE'
compile 'org.springframework:spring-test:5.0.2.RELEASE'
compile('org.springframework.boot:spring-boot-starter-jersey')
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.3'
compile 'com.fasterxml.jackson.core:jackson-core:2.9.3'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.3'
compile('org.springframework.security:spring-security-web:5.0.0.RELEASE')
compile('org.springframework.security:spring-security-config:5.0.0.RELEASE')
compile('org.springframework.security:spring-security-core:5.0.0.RELEASE')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
It is helped me.

Spring boot 1.4.2.RELEASE error on startup java.lang.ClassNotFoundException: org.springframework.beans.factory.ObjectProvider

I am trying to upgrade spring-boot from 1.3 to 1.4.2.RELEASE. Running mvn spring-boot:run throws the following error.
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:178) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:333) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at com.cisco.ple.AdminApplication.main(AdminApplication.java:20) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.4.2.RELEASE.jar:1.4.2.RELEASE]
Caused by: java.lang.IllegalStateException: #ConditionalOnMissingBean did not specify a bean using type, name or annotation and the attempt to deduce the bean's type failed
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.validate(OnBeanCondition.java:310) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.<init>(OnBeanCondition.java:300) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:112) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
... 22 common frames omitted
Caused by: org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanTypeDeductionException: Failed to deduce bean type for org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.addDeducedBeanTypeForBeanMethod(OnBeanCondition.java:373) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.addDeducedBeanType(OnBeanCondition.java:347) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.<init>(OnBeanCondition.java:294) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
... 24 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/ObjectProvider
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_74]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_74]
at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_74]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.addDeducedBeanTypeForBeanMethod(OnBeanCondition.java:360) ~[spring-boot-autoconfigure-1.4.2.RELEASE.jar:1.4.2.RELEASE]
... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.ObjectProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_74]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_74]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_74]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_74]
... 33 common frames omitted
2016-11-16 15:10:44.540 INFO 62059 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#4fefe49d: startup date [Wed Nov 16 15:10:40 IST 2016]; root of context hierarchy
2016-11-16 15:10:44.541 WARN 62059 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#4fefe49d: startup date [Wed Nov 16 15:10:40 IST 2016]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:415) [spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:975) [spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:934) [spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:818) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
at com.cisco.ple.AdminApplication.main(AdminApplication.java:20) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.4.2.RELEASE.jar:1.4.2.RELEASE]
Exception in thread "restartedMain" 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:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/ObjectProvider
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:534)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:567)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:627)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1445)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:445)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:415)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:530)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:523)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1162)
at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:886)
at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:872)
at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:858)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:812)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at com.cisco.ple.AdminApplication.main(AdminApplication.java:20)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.ObjectProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 30 more
Here is the mvn dependency:tree output
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # Admin ---
[INFO] company:admin:war:1.0
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.4.2.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.2.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | \- org.springframework.boot:spring-boot-actuator:jar:1.4.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.2.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] | +- org.springframework:spring-web:jar:4.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.2.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.2.RELEASE:compile
[INFO] | | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.6:compile
[INFO] | | | \- org.apache.tomcat:tomcat-juli:jar:8.5.6:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.2.4.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.0.11.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:5.0.11.Final:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.10.5.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.12.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-orm:jar:4.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.2.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.2.4.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.1.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:4.1.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:1.4.2.RELEASE:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:4.2.4.RELEASE:compile
[INFO] | \- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-velocity:jar:1.4.2.RELEASE:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- commons-digester:commons-digester:jar:2.1:compile
[INFO] | +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] | \- org.apache.velocity:velocity-tools:jar:2.0:compile
[INFO] | +- commons-chain:commons-chain:jar:1.1:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- sslext:sslext:jar:1.2-0:compile
[INFO] | +- org.apache.struts:struts-core:jar:1.3.8:compile
[INFO] | +- org.apache.struts:struts-taglib:jar:1.3.8:compile
[INFO] | \- org.apache.struts:struts-tiles:jar:1.3.8:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:1.4.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-redis:jar:1.4.2.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-redis:jar:1.7.5.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-keyvalue:jar:1.1.5.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:4.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:4.2.4.RELEASE:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] +- redis.clients:jedis:jar:2.8.2:compile
[INFO] | \- org.apache.commons:commons-pool2:jar:2.4.2:compile
[INFO] +- org.springframework.security.oauth:spring-security-oauth2:jar:2.0.12.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:4.2.4.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-core:jar:4.1.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.4.2.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.2.RELEASE:compile
[INFO] | +- junit:junit:jar:4.12:compile
[INFO] | +- org.assertj:assertj-core:jar:2.5.0:compile
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:compile
[INFO] | | \- org.objenesis:objenesis:jar:2.1:runtime
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:compile
[INFO] | +- org.skyscreamer:jsonassert:jar:1.3.0:compile
[INFO] | | \- org.json:json:jar:20140107:compile
[INFO] | \- org.springframework:spring-test:jar:4.2.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.2.RELEASE:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.6:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.6:provided
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.6:provided
[INFO] +- org.apache.tomcat.embed:tomcat-embed-jasper:jar:8.5.6:provided
[INFO] | \- org.eclipse.jdt.core.compiler:ecj:jar:4.5.1:provided
[INFO] +- jstl:jstl:jar:1.2:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:4.1.3.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-acl:jar:4.1.3.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.2.4.RELEASE:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | \- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] +- cglib:cglib-nodep:jar:2.2:compile
[INFO] +- net.sf.ehcache:ehcache-core:jar:2.6.0:compile
[INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] | +- commons-lang:commons-lang:jar:2.5:compile
[INFO] | \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] +- com.googlecode.ehcache-spring-annotations:ehcache-spring-annotations:jar:1.1.3:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- javax.mail:mail:jar:1.4.5:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.apache.cxf:cxf-core:jar:3.1.5:compile
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.1:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.1.5:compile
[INFO] | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.1.5:compile
[INFO] | +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] +- org.apache.cxf:cxf-rt-ws-security:jar:3.1.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-security-saml:jar:3.1.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-security:jar:3.1.5:compile
[INFO] | +- net.sf.ehcache:ehcache:jar:2.10.3:compile
[INFO] | +- org.apache.wss4j:wss4j-policy:jar:2.1.4:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-stax:jar:2.1.4:compile
[INFO] | | \- org.apache.wss4j:wss4j-bindings:jar:2.1.4:compile
[INFO] | \- org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.1.4:compile
[INFO] +- org.apache.wss4j:wss4j-ws-security-common:jar:2.1.4:compile
[INFO] | +- org.apache.santuario:xmlsec:jar:2.0.5:compile
[INFO] | +- org.opensaml:opensaml-saml-impl:jar:3.1.1:compile
[INFO] | | +- org.opensaml:opensaml-profile-api:jar:3.1.1:compile
[INFO] | | | \- org.opensaml:opensaml-core:jar:3.1.1:compile
[INFO] | | +- org.opensaml:opensaml-saml-api:jar:3.1.1:compile
[INFO] | | | +- org.opensaml:opensaml-xmlsec-api:jar:3.1.1:compile
[INFO] | | | \- org.opensaml:opensaml-soap-api:jar:3.1.1:compile
[INFO] | | +- org.opensaml:opensaml-security-impl:jar:3.1.1:compile
[INFO] | | | \- org.opensaml:opensaml-security-api:jar:3.1.1:compile
[INFO] | | | +- org.cryptacular:cryptacular:jar:1.0:compile
[INFO] | | | \- org.bouncycastle:bcprov-jdk15on:jar:1.51:compile
[INFO] | | +- org.opensaml:opensaml-xmlsec-impl:jar:3.1.1:compile
[INFO] | | \- net.shibboleth.utilities:java-support:jar:7.1.1:compile
[INFO] | | +- com.google.guava:guava:jar:18.0:compile
[INFO] | | \- joda-time:joda-time:jar:2.9.5:compile
[INFO] | +- org.opensaml:opensaml-xacml-impl:jar:3.1.1:compile
[INFO] | | \- org.opensaml:opensaml-xacml-api:jar:3.1.1:compile
[INFO] | +- org.opensaml:opensaml-xacml-saml-impl:jar:3.1.1:compile
[INFO] | | \- org.opensaml:opensaml-xacml-saml-api:jar:3.1.1:compile
[INFO] | +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] +- org.apache.wss4j:wss4j-ws-security-dom:jar:2.1.4:compile
[INFO] +- commons-codec:commons-codec:jar:1.10:compile
[INFO] +- org.apache.cxf:cxf-rt-rs-extension-providers:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.1.5:compile
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile
[INFO] | \- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-ws-policy:jar:3.1.5:compile
[INFO] | +- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | \- org.apache.neethi:neethi:jar:3.0.3:compile
[INFO] +- org.apache.cxf:cxf-rt-ws-addr:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-rs-client:jar:3.1.5:compile
[INFO] +- org.apache.cxf:cxf-rt-wsdl:jar:3.1.5:compile
[INFO] +- javax.ws.rs:jsr311-api:jar:1.0:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.0:compile
[INFO] +- commons-validator:commons-validator:jar:1.4.0:compile
[INFO] +- org.apache.tiles:tiles-servlet:jar:3.0.4:compile
[INFO] | \- org.apache.tiles:tiles-request-servlet:jar:1.0.4:compile
[INFO] +- org.apache.tiles:tiles-core:jar:3.0.4:compile
[INFO] +- org.apache.tiles:tiles-jsp:jar:3.0.4:compile
[INFO] | +- org.apache.tiles:tiles-template:jar:3.0.4:compile
[INFO] | | \- org.apache.tiles:tiles-autotag-core-runtime:jar:1.1.0:compile
[INFO] | \- org.apache.tiles:tiles-request-jsp:jar:1.0.4:compile
[INFO] +- org.apache.tiles:tiles-api:jar:3.0.1:compile
[INFO] | \- org.apache.tiles:tiles-request-api:jar:1.0.1:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.40:compile
[INFO] +- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] | \- antlr:antlr:jar:2.7.7:compile
[INFO] +- org.owasp.esapi:esapi:jar:2.0GA:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.5:compile
[INFO] | +- commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
[INFO] | +- commons-fileupload:commons-fileupload:jar:1.2:compile
[INFO] | +- log4j:log4j:jar:1.2.16:compile
[INFO] | +- xom:xom:jar:1.1:compile
[INFO] | | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | | +- xalan:xalan:jar:2.7.0:compile
[INFO] | | \- jaxen:jaxen:jar:1.1.6:compile
[INFO] | +- org.beanshell:bsh-core:jar:2.0b4:compile
[INFO] | \- org.owasp.antisamy:antisamy:jar:1.4.3:compile
[INFO] | +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] | | +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] | | +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] | | \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] | \- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | \- stax:stax-api:jar:1.0.1:compile
[INFO] +- com.opencsv:opencsv:jar:3.7:compile
[INFO] +- com.sun.jersey:jersey-core:jar:1.17.1:compile
[INFO] +- com.sun.jersey:jersey-client:jar:1.17.1:compile
[INFO] +- com.sun.jersey.contribs:jersey-multipart:jar:1.17.1:compile
[INFO] | \- org.jvnet:mimepull:jar:1.6:compile
[INFO] +- org.springframework.session:spring-session:jar:1.1.0.RELEASE:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.4:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.4:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.8.4:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.4:compile
[INFO] | +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | \- com.fasterxml.woodstox:woodstox-core:jar:5.0.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-hateoas:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.hateoas:spring-hateoas:jar:0.20.0.RELEASE:compile
[INFO] | \- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | \- net.minidev:json-smart:jar:2.2.1:test
[INFO] | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] +- org.jolokia:jolokia-core:jar:1.3.5:compile
[INFO] | \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.jsoup:jsoup:jar:1.9.2:compile
[INFO] \- commons-io:commons-io:jar:2.5:compile
It looks like class org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter of artifact org.springframework.boot:spring-boot-autoconfigure:1.4.2.RELEASE is using class org.springframework.beans.factory.ObjectProvider of artifact org.springframework:spring-beans. However org.springframework.beans.factory.ObjectProvider was added only after version 4.3 of the artifact and provided version of the artifact is 4.2.4.RELEASE in the spring boot parent. Version 1.4.2.RELEASE is supposed to be a stable version of spring-boot.
What's wrong with the configuration?
The answer is:
Ali uses a few dependency management plugins in his pom.xml and has a 4.2.4.RELEASE property defined. This property is used by one of these plugins to determine which versions of JARs should be downloaded.
In his scenario, he has to remember to upgrade both and version of 'spring-boot-starter-parent' to compatible releases.
To expand what #Rafal G. said, I had a property defined in my pom.xml <spring.version>4.2.4.RELEASE</spring.version>. Same property is defined in spring boot parent pom.xml, and my explicit declaration of this property was overriding the one mentioned in spring-boot's parent pom.
Another reason why you should keep your pom.xml clean.

MuleESB -3.4 CE : jpa and hibernate version support?

I test a POC with Service include in Mule like bean spring, I have a issue with Hibernate and Jpa dependencies. Every body now which version of Hibernate and JPA are supported/use in Mule 3.4 CE.
I have a lot of exception when i wan't to run the flow : whith hibernate 3.6.0.Final :
java.lang.IllegalAccessError: tried to access method org.hibernate.engine.CascadeStyle.<init>()V from class org.hibernate.engine.EJB3CascadeStyle$1
at org.hibernate.engine.EJB3CascadeStyle$1.<init>(EJB3CascadeStyle.java:44)
at org.hibernate.engine.EJB3CascadeStyle.<clinit>(EJB3CascadeStyle.java:39)
at org.hibernate.ejb.event.EJB3PersistEventListener.<clinit>(EJB3PersistEventListener.java:39)
at org.hibernate.ejb.EventListenerConfigurator.<init>(EventListenerConfigurator.java:101)
at org.hibernate.ejb.Ejb3Configuration.<init>(Ejb3Configuration.java:159)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
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)
with 4.0.1 and uppe :
java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V
at org.hibernate.service.ServiceRegistryBuilder.buildServiceRegistry(ServiceRegistryBuilder.java:244)
at org.hibernate.ejb.Ejb3Configuration.buildLifecycleControledServiceRegistry(Ejb3Configuration.java:930)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:903)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
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.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:119)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:84)
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:207)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:58)
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:91)
My dependence tree :
[INFO] +- org.mule:mule-core:jar:3.4.0:provided
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.8.0:provided
[INFO] | +- org.safehaus.jug:jug:jar:asl:2.0.0:provided
[INFO] | +- commons-cli:commons-cli:jar:1.2:provided
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:provided
[INFO] | +- commons-io:commons-io:jar:1.4:provided
[INFO] | +- commons-lang:commons-lang:jar:2.4:provided
[INFO] | +- commons-pool:commons-pool:jar:1.5.3:provided
[INFO] | +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:provided
[INFO] | +- javax.annotation:jsr250-api:jar:1.0:provided
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.6.1:provided
[INFO] | +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] | +- log4j:log4j:jar:1.2.16:compile
[INFO] | +- asm:asm:jar:3.1:provided
[INFO] | +- asm:asm-commons:jar:3.1:provided
[INFO] | | \- asm:asm-tree:jar:3.1:provided
[INFO] | +- org.mvel:mvel2:jar:2.1.3.Final:provided
[INFO] | +- org.jgrapht:jgrapht-jdk1.5:jar:0.7.3:provided
[INFO] | \- org.mule.common:mule-common:jar:0.11.0:provided
[INFO] +- org.mule.modules:mule-module-spring-config:jar:3.4.0:provided
[INFO] | +- org.mule.modules:mule-module-annotations:jar:3.4.0:provided
[INFO] | | \- cglib:cglib-nodep:jar:2.2:provided
[INFO] | +- org.springframework:spring-context:jar:3.2.1.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:3.2.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:3.2.1.RELEASE:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1-osgi:provided
[INFO] | \- jaxen:jaxen:jar:1.1.1:provided
[INFO] | \- jdom:jdom:jar:1.0:provided
[INFO] +- org.mule.transports:mule-transport-file:jar:3.4.0:provided
[INFO] +- org.mule.modules:mule-module-xml:jar:3.4.0:provided
[INFO] | +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:provided
[INFO] | +- commons-jxpath:commons-jxpath:jar:1.3-osgi:provided
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.2:provided
[INFO] | | \- xmlpull:xmlpull:jar:1.1.3.1:provided
[INFO] | +- joda-time:joda-time:jar:1.6:provided
[INFO] | +- xpp3:xpp3_min:jar:1.1.3.4.O-osgi:provided
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.0.8:provided
[INFO] | | \- org.codehaus.woodstox:stax2-api:jar:3.0.2:provided
[INFO] | +- net.java.dev.stax-utils:stax-utils:jar:20080702-osgi:provided
[INFO] | +- net.sf.saxon:saxon:jar:8.9.0.4-osgi:provided
[INFO] | +- net.sf.saxon:saxon-dom:jar:8.9.0.4-osgi:provided
[INFO] | +- net.sf.saxon:saxon-xqj:jar:8.9.0.4:provided
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.1:provided
[INFO] | \- com.sun.xml.bind:jaxb-impl:jar:2.1.5:provided
[INFO] +- org.mule.tests:mule-tests-functional:jar:3.4.0:test
[INFO] | +- org.springframework:spring-beans:jar:3.2.1.RELEASE:compile
[INFO] | +- commons-net:commons-net:jar:2.0:test
[INFO] | +- org.apache.ftpserver:ftpserver-core:jar:1.0.2:test
[INFO] | | \- org.apache.mina:mina-core:jar:2.0.0-M6:test
[INFO] | +- org.apache.ftpserver:ftplet-api:jar:1.0.2:test
[INFO] | +- org.apache.sshd:sshd-core:jar:0.6.0:test
[INFO] | +- bouncycastle:bcprov-jdk14:jar:139:test
[INFO] | +- org.mule:mule-core:test-jar:tests:3.4.0:test
[INFO] | | +- javax.activation:activation:jar:1.1-osgi:provided
[INFO] | | \- org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1-osgi:test
[INFO] | \- org.mockito:mockito-all:jar:1.9.0:test
[INFO] +- mockobjects:mockobjects-core:jar:0.09:test
[INFO] +- junit:junit:jar:4.9:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- mysql:mysql-connector-java:jar:5.1.10:compile
[INFO] +- org.mule.transports:mule-transport-email:jar:3.4.0:provided
[INFO] | \- javax.mail:mail:jar:1.4.3:provided
[INFO] +- org.mule.transports:mule-transport-jdbc:jar:3.4.0:provided
[INFO] | +- commons-dbutils:commons-dbutils:jar:1.2:provided
[INFO] | \- com.experlog:xapool:jar:1.5.0-osgi:provided
[INFO] +- org.springframework:spring-orm:jar:3.2.1.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- org.springframework:spring-core:jar:3.2.1.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:4.0.1.Final:test
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:test
[INFO] | +- org.hibernate:hibernate-core:jar:4.0.1.Final:test
[INFO] | | \- antlr:antlr:jar:2.7.7:test
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:test
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.0.CR2:test
[INFO] | +- org.javassist:javassist:jar:3.15.0-GA:test
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:test
[INFO] \- fr.myapp:jar:0.0.1-SNAPSHOT:compile
[INFO] +- org.springframework:spring-jdbc:jar:3.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:3.2.4.RELEASE:compile
[INFO] \- org.springframework.data:spring-data-jpa:jar:1.4.2.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:1.6.2.RELEASE:compile
[INFO] \- org.aspectj:aspectjrt:jar:1.7.2:compile
My spring service run in test context whithout muleESB, is OK.
Mule distribution contains Hibernate core JARs at ${MULE_HOME}/lib/opt. But for some reason it doesn't contain Hibernate entity manager JAR. So, if you include hibernate-entitymanager.jar-4.0.1.Final in your classpath, it will try to access core hibernate classes from ${MULE_HOME}/lib/opt JARs which has been loaded by a different classloader and thus gives java.lang.IllegalAccessError.
Solution is to delete Mule provided Hibernate JARs from ${MULE_HOME}/lib/opt and add your own. Please ensure that you have a backup before you carry out such operation.
the suppression of hibernate-core-3.6.0.Final.jar in /opt/mule help to run muleEsb.
As pointed out by mmeyer this is a Class Loader issue. You can fix this in Mule 3.2 Mule provides a Fine Grained Class Loading option. To fix the above we can provide the following property in src/main/app/mule-deploy.properties and it loads both org.hibernate.engine.CascadeStyle and org.hibernate.engine.EJB3CascadeStyle using the application class loader:
FIX: Add the following to src/main/app/mule-deploy.properties
loader.override=org.hibernate
Note: Mule Studio still continues with this issue and hence one has to add hibernate entity manager jar to \MuleStudio\plugins\org.mule.tooling.server.3.4.1.ee_3.4.1.201312062152\mule\opt
My observation using mule CE standalone:
Scenario 1: (Deployment Fails)
My Mule App /lib
- has hibernate-entitymanager-3.6.0.Final .
- I excluded all other hibernate jars including hibernate-core-3.6.0.Final.jar
MuleCE3.4.0/lib/opt
- has hibernate-core-3.6.0.Final.jar and other hibernate jars
Error when app is deployed:
Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [persistenceContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalAccessError: tried to access method org.hibernate.engine.CascadeStyle.()V from class org.hibernate.engine.EJB3CascadeStyle$1 (org.mule.api.lifecycle.InitialisationException)
Scenario 2 (Deployment Successful)
My Mule App /lib
- has hibernate-entitymanager-3.6.0.Final .
- I excluded all other hibernate jars including hibernate-core-3.6.0.Final.jar
MuleCE3.4.0/lib/opt
- has hibernate-core-3.6.0.Final.jar and other hibernate jars
- [Different from Scenario 1] Copy hibernate-entitymanager-3.6.0.Final to MuleCE/lib/opt

Upgrading from Spring 3.0.3.RELEASE results in: java.lang.NoSuchFieldError: USER_DECLARED_METHODS

I have a Spring-MVC 3.0 web application built with Maven. All Spring dependency versions are defined with a maven property <spring.version>3.0.3.RELEASE</spring.version>. When I change the version to either 3.0.4.RELEASE or 3.0.5.RELEASE, then the web application fails with the following exception:
ERROR: [DispatcherServlet] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: USER_DECLARED_METHODS
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:612)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:371)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:307)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
I've found one relevant hit on Google http://forum.springsource.org/showthread.php?p=328767 but it did not help me, as I've checked my Spring versions in my pom and done numerous clean builds on the project. I'm running the webapp via mvn jetty:run.
[EDIT] Here is the dependency tree as requested by michael-lange...
[INFO] au.org.ala:bie-admin:war:1.0-SNAPSHOT
[INFO] +- au.org.ala:bie-hbase:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.gbif:ecat-common:jar:1.1-SNAPSHOT:compile
[INFO] | +- org.gbif:dwc-archive:jar:1.2-SNAPSHOT:compile
[INFO] | | +- com.trustice:tar:jar:2.5:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | +- jaxen:jaxen:jar:1.1-beta-6:compile
[INFO] | | | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | | | \- xom:xom:jar:1.0b3:compile
[INFO] | | | +- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] | | | \- org.ccil.cowan.tagsoup:tagsoup:jar:0.9.7:compile
[INFO] | | +- com.google.guava:guava:jar:r03:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.0:compile
[INFO] | | \- com.google.inject:guice:jar:2.0:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.apache.hadoop:hbase:jar:0.20.4:compile
[INFO] | +- org.apache.hadoop:zookeeper:jar:3.2.2:compile
[INFO] | +- org.apache.hadoop:hadoop-core:jar:0.20.2:compile
[INFO] | +- org.apache.hadoop:hadoop-ant:jar:0.20.2:compile
[INFO] | +- org.apache.hadoop:hadoop-tools:jar:0.20.2:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.5.2:compile
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.4.3:compile
[INFO] | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | +- org.apache.lucene:lucene-core:jar:2.9.2:compile
[INFO] | +- org.apache.solr:solr-core:jar:1.4.0:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-highlighter:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-queries:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-snowball:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-memory:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-misc:jar:2.9.1:compile
[INFO] | | +- org.apache.lucene:lucene-spellchecker:jar:2.9.1:compile
[INFO] | | +- org.apache.solr:solr-commons-csv:jar:1.4.0:compile
[INFO] | | +- woodstox:wstx-asl:jar:3.2.7:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] | +- org.apache.solr:solr-solrj:jar:1.4.0:compile
[INFO] | | \- org.codehaus.woodstox:wstx-asl:jar:3.2.7:compile
[INFO] | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | +- org.apache.cassandra:apache-cassandra:jar:0.6.1:compile
[INFO] | +- org.apache.thrift:thrift:jar:0.2.0:compile
[INFO] | +- pelops:pelops:jar:0.804:compile
[INFO] | +- org.geotools:gt-main:jar:2.5-RC1:compile
[INFO] | | +- org.geotools:gt-api:jar:2.5-RC1:compile
[INFO] | | +- com.vividsolutions:jts:jar:1.9:compile
[INFO] | | \- jdom:jdom:jar:1.0:compile
[INFO] | +- org.geotools:gt-shapefile:jar:2.5-RC1:compile
[INFO] | | +- org.geotools:gt-referencing:jar:2.5-RC1:compile
[INFO] | | | +- java3d:vecmath:jar:1.3.1:compile
[INFO] | | | \- org.geotools:gt-metadata:jar:2.5-RC1:compile
[INFO] | | | +- org.opengis:geoapi:jar:2.2-M1:compile
[INFO] | | | \- net.java.dev.jsr-275:jsr-275:jar:1.0-beta-2:compile
[INFO] | | \- velocity:velocity:jar:1.4:compile
[INFO] | | \- velocity:velocity-dep:jar:1.4:runtime
[INFO] | +- org.geotools:gt-epsg-hsql:jar:2.5-RC1:compile
[INFO] | | \- hsqldb:hsqldb:jar:1.8.0.7:compile
[INFO] | +- postgresql:postgresql:jar:8.1-407.jdbc3:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.4:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.openrdf.sesame:sesame-rio-rdfxml:jar:2.2:compile
[INFO] | | +- org.openrdf.sesame:sesame-model:jar:2.2:compile
[INFO] | | | +- info.aduna.commons:aduna-commons-collections:jar:2.2:compile
[INFO] | | | | \- info.aduna.commons:aduna-commons-concurrent:jar:2.2:compile
[INFO] | | | \- info.aduna.commons:aduna-commons-iteration:jar:2.2:compile
[INFO] | | +- info.aduna.commons:aduna-commons-net:jar:2.1:compile
[INFO] | | \- info.aduna.commons:aduna-commons-xml:jar:2.1:compile
[INFO] | +- org.openrdf.sesame:sesame-rio-api:jar:2.2:compile
[INFO] | | \- info.aduna.commons:aduna-commons-lang:jar:2.2:compile
[INFO] | +- org.openrdf.sesame:sesame-rio-ntriples:jar:2.2:compile
[INFO] | +- org.openrdf.sesame:sesame-rio-n3:jar:2.2:compile
[INFO] | +- org.springframework:spring-core:jar:3.0.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-asm:jar:3.0.0.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.0.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:3.0.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:3.0.0.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:3.0.0.RELEASE:compile
[INFO] | +- org.openrdf.sesame:sesame-rio-turtle:jar:2.2:compile
[INFO] | | +- info.aduna.commons:aduna-commons-io:jar:2.3:compile
[INFO] | | \- info.aduna.commons:aduna-commons-text:jar:2.1:compile
[INFO] | \- au.org.ala:ala-name-matching:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.gbif:ecat-checklistbank:jar:1.0-SNAPSHOT:compile
[INFO] | | +- junit:junit:jar:4.4:compile
[INFO] | | +- uk.co.flamingpenguin.jewelcli:jewelcli:jar:0.6:compile
[INFO] | | +- gnu.trove:trove:jar:2.0.4:compile
[INFO] | | \- org.freemarker:freemarker:jar:2.3.15:compile
[INFO] | +- portal:portal-core:jar:1.0-SNAPSHOT:compile
[INFO] | | +- org.springframework:spring-dao:jar:2.0:compile
[INFO] | | +- org.springframework:spring-support:jar:2.0:compile
[INFO] | | +- org.springframework:spring-aop:jar:2.0:compile
[INFO] | | +- org.springframework:spring-aop-cache:jar:2.0:compile
[INFO] | | +- org.apache.velocity:velocity:jar:1.6:compile
[INFO] | | | \- oro:oro:jar:2.0.8:compile
[INFO] | | +- soap:soap:jar:2.3.1:compile
[INFO] | | +- quartz:quartz:jar:1.6.0:compile
[INFO] | | +- javax.transaction:jta:jar:1.0.1B:compile
[INFO] | | +- dom4j:dom4j-core:jar:1.4-dev-8:compile
[INFO] | | +- commons-math:commons-math:jar:1.1:compile
[INFO] | | | \- commons-discovery:commons-discovery:jar:0.2:compile
[INFO] | | \- saxpath:saxpath:jar:1.0-FCS:compile
[INFO] | \- au.com.bytecode:opencsv:jar:2.2:compile
[INFO] +- au.org.ala:bie-repository:jar:1.0-SNAPSHOT:compile
[INFO] | +- au.org.ala:ala-logger:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-orm:jar:3.0.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-tx:jar:3.0.0.RELEASE:compile
[INFO] | +- org.springframework:spring-jdbc:jar:3.0.0.RELEASE:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2:compile
[INFO] | +- commons-dbcp:commons-dbcp:jar:1.2.1:compile
[INFO] | | +- commons-pool:commons-pool:jar:1.2:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | +- commons-validator:commons-validator:jar:1.3.1:compile
[INFO] | | \- commons-digester:commons-digester:jar:1.6:compile
[INFO] | +- net.sourceforge.htmlunit:htmlunit:jar:2.5:compile
[INFO] | | +- xalan:xalan:jar:2.7.1:compile
[INFO] | | | \- xalan:serializer:jar:2.7.1:compile
[INFO] | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.5:compile
[INFO] | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.12:compile
[INFO] | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile
[INFO] | | \- org.w3c.css:sac:jar:1.3:compile
[INFO] | +- net.sf.opencsv:opencsv:jar:2.1:compile
[INFO] | +- org.jdom:jdom:jar:1.1:compile
[INFO] | +- pdfbox:pdfbox:jar:0.7.3:compile
[INFO] | | +- org.fontbox:fontbox:jar:0.1.0:compile
[INFO] | | +- org.jempbox:jempbox:jar:0.2.0:compile
[INFO] | | +- bouncycastle:bcmail-jdk14:jar:136:compile
[INFO] | | \- bouncycastle:bcprov-jdk14:jar:136:compile
[INFO] | +- javax.media:jai-core:jar:1.1.3:compile
[INFO] | +- javax.media:jai-codec:jar:1.1.3:compile
[INFO] | \- javax.media:jai-imageio:jar:1.1:compile
[INFO] +- au.org.ala:ala-common-ui:jar:1.0-SNAPSHOT:compile
[INFO] | \- org.jasig.cas:cas-client-core:jar:3.1.10:compile
[INFO] +- au.org.ala:ala-cas-client:jar:1.0-SNAPSHOT:compile
[INFO] +- org.junit:com.springsource.org.junit:jar:4.7.0:test
[INFO] +- org.springframework:org.springframework.test:jar:3.0.5.RELEASE:test
[INFO] +- org.springframework:org.springframework.aop:jar:3.0.5.RELEASE:compile
[INFO] | \- org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0:compile
[INFO] +- org.springframework:org.springframework.beans:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.asm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.context:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.expression:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.context.support:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.core:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.jdbc:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.orm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.transaction:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.web:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:org.springframework.web.servlet:jar:3.0.5.RELEASE:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.6:compile
[INFO] +- org.apache.el:com.springsource.org.apache.el:jar:6.0.20:compile
[INFO] +- javax.servlet:com.springsource.javax.servlet:jar:2.5.0:provided
[INFO] +- javax.servlet:com.springsource.javax.servlet.jsp:jar:2.1.0:provided
[INFO] +- javax.servlet:com.springsource.javax.servlet.jsp.jstl:jar:1.2.0:compile
[INFO] +- org.apache.taglibs:com.springsource.org.apache.taglibs.standard:jar:1.1.2:compile
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] | +- javax.mail:mail:jar:1.4:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- javax.jms:jms:jar:1.1:compile
[INFO] | +- com.sun.jdmk:jmxtools:jar:1.2.1:compile
[INFO] | \- com.sun.jmx:jmxri:jar:1.2.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] | \- commons-codec:commons-codec:jar:1.2:compile
[INFO] +- commons-io:commons-io:jar:1.4:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- org.codehaus.jackson:jackson-core-asl:jar:1.4.1:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.4.1:compile
[INFO] +- opensymphony:sitemesh:jar:2.4.2:compile
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] \- org.hibernate:com.springsource.org.hibernate.validator:jar:4.0.0.GA:compile
[INFO] +- javax.validation:com.springsource.javax.validation:jar:1.0.0.GA:compile
[INFO] \- org.slf4j:com.springsource.slf4j.api:jar:1.5.6:compile
It turned out two of our own dependencies both had dependencies on Spring 3.0.0.RELEASE. Adding an exclusion to each of these as:
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
</exclusions>
fixed the problem.
This smells like a Spring bug to me as I did not see this problem using 3.0.1, 3.0.2 or 3.0.3.
In response to your last comment, you can use the 'dependencyManagement' section of the POM to try to mitigate the Spring 3.0.0 requirement of your internal dependencies. This should force everything to use Spring 3.0.5.RELEASE if you place the proper 'dependency' elements under your dependencyManagement section.

Resources