2010-05-13 42 views
3
Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null:java.lang.IllegalArgumentException: Method must not be null 

我在部署我的應用程序時遇到此部署錯誤。java.lang.IllegalArgumentException:方法不能爲空

java -version 
java version "1.6.0_20" 
Java(TM) SE Runtime Environment (build 1.6.0_20-b02) 
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode) 

而同一個構建被成功部署在相同的服務器碼頭6.1.3與以下conf。使用

java version "1.6.0_17" 

春季版2.5.6.SEC01

如何克服,谷歌搜索沒有工作?

2010-05-13 15:53:20.903::WARN: Failed startup of context [email protected]{/caw,jar:file:/home/jigar/jetty-6.1.3/webapps/caw.war!/} 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) 
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:515) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) 
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) 
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) 
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) 
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) 
    at org.mortbay.jetty.Server.doStart(Server.java:210) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) 
    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.mortbay.start.Main.invokeMain(Main.java:183) 
    at org.mortbay.start.Main.start(Main.java:497) 
    at org.mortbay.start.Main.main(Main.java:115) 
Caused by: java.lang.IllegalArgumentException: Method must not be null 
    at org.springframework.util.Assert.notNull(Assert.java:112) 
    at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63) 
    at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:58) 
    at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250) 
    at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144) 
    at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252) 
    at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282) 
    at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) 
    ... 35 more 
2010-05-13 15:53:20.906::WARN: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null: 
java.lang.IllegalArgumentException: Method must not be null 
    at org.springframework.util.Assert.notNull(Assert.java:112) 
    at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63) 
    at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:58) 
    at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250) 
    at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144) 
    at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252) 
    at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282) 
    at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) 
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:515) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) 
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) 
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) 
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) 
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) 
    at org.mortbay.jetty.Server.doStart(Server.java:210) 
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) 
    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.mortbay.start.Main.invokeMain(Main.java:183) 
    at org.mortbay.start.Main.start(Main.java:497) 
    at org.mortbay.start.Main.main(Main.java:115) 
2010-05-13 15:53:20.964::INFO: Started SelectChannelConnector @ 0.0.0.0:8090 
+1

你能展示更多的堆棧跟蹤嗎?包括根本原因。 – Espen 2010-05-13 10:10:18

+1

完整的堆棧跟蹤會有幫助,即'PropertyPlaceholderConfigurer'中的哪一行是這樣的? – 2010-05-13 10:11:27

+2

@abc:你可以編輯你的問題,並把堆棧跟蹤。 – 2010-05-13 10:26:53

回答

6

這可能是由不同版本的Spring庫的髒類路徑導致的。清理它並將它與正確的版本依賴關係對齊到同一個Spring版本。

+0

如果是這樣的話,那麼如何將相同的構建部署到另一個JVM? – 2010-05-13 14:23:58

+0

只需按照常規方式將庫存放在Web應用的'/ WEB-INF/lib'中。 JVM的lib或服務器庫。 – BalusC 2010-05-13 14:25:10

+0

耶BalusC我做了同樣的事情,所有必需的庫都在/ WEB-INF/lib only.in Java版本「1.6.0_20」它拋出錯誤並且在具有java版本「1.6.0_17」的機器中工作良好,所有其餘配置保持原樣。相同的服務器,相同版本的服務器,相同的配置。 ) – 2010-05-13 14:37:11

相關問題