2015-04-05 18 views
5

İlkbahar projesi, 3.2.9 yayını kullanıyorum, ancak 4.1.4'e değiştirdiğimde, bahar projem iyi çalışıyor. Uygulamayı başlattığımda aşağıdaki istisnaları alıyorum.İlkbahar web mvc uygulaması başlatılırken istisna

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' 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.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcValidator' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider; 
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762) 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663) 
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629) 
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677) 
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548) 
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489) 
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) 
    at javax.servlet.GenericServlet.init(GenericServlet.java:158) 
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241) 
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154) 
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1041) 
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4944) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5230) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) 
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581) 
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1683) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
+0

Hatanız, bu sorudaki soruna benzer: http://stackoverflow.com/questions/21950607/abstractmethoderror-on-deploying-spring-4-0-in-tomcat-6 xerx593'ün önerdiği gibi, muhtemelen bir tür API sürümü çakışması sorunu. – Kris

cevap

4

senin yığın izlemesi anahtar ifadedir:

java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;

This answer senin sorunun açıklaması/istisna uygulanacak ayrıca görünüyor burada

<org.springframework-version>4.1.4.RELEASE</org.springframework-version> 

istisna istisna detay ileti: Çakışan bir javax.validation sürümünüz var!

İpucu: Ben bağımlılık çatışmaların kimlik & eliminasyon (özellikle bazı sürüm yükseltmeden sonra) (a pom editörü) NetBeans' 'Grafik Görünüm' tercih ederler. "Saf-maven-yol" olacaktır: Benim durumumda için

mvn dependency:tree -Dverbose -Dincludes=javax.validation 
0

, bunun nedeni bahar verileri ile uyumlu olmayan yay çizme marş web bahar mvc sürüme oldu. ve istisnai, gerçekten de çok zor olabilir; her ikisi de herhangi bir parametre olmaksızın varsayılan olarak, AbstractMethodError için iki kurucu vardır. Bu nedenle, ilk kurucu kullanılarak istisna atarsa, uygulamaya bağlı olarak hata ayıklama için çok fazla çalışma gerektirir.