Error creating bean with name "1"

来源:17-7 自动化发布脚本编写

慕沐0177137

2018-04-22

http://img.mukewang.com/szimg/5ae081c10001adbb09680582.jpg22-Apr-2018 07:56:53.261 严重 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name '1' defined in class path resource [applicationContext-spring-session.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'redis.clients.jedis.JedisPoolConfig' for property 'poolConfig'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [redis.clients.jedis.JedisPoolConfig] for property 'poolConfig': no matching editors or conversion strategy found

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:195)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4602)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5066)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)

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:483)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)

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:483)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)

at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)

at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)

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:483)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)

at sun.rmi.transport.Transport$1.run(Transport.java:200)

at sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$240(TCPTransport.java:683)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$17/1385979962.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)

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)

Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'redis.clients.jedis.JedisPoolConfig' for property 'poolConfig'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [redis.clients.jedis.JedisPoolConfig] for property 'poolConfig': no matching editors or conversion strategy found

at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:473)

at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:509)

at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:504)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1502)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1461)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

... 57 more

Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [redis.clients.jedis.JedisPoolConfig] for property 'poolConfig': no matching editors or conversion strategy found

at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:267)

at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:458)

... 63 more


22-Apr-2018 07:56:53.264 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

22-Apr-2018 07:56:53.272 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

[2018-04-22 07:56:53,308] Artifact mmall:war: Error during artifact deployment. See server log for details.

22-Apr-2018 07:56:54.090 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/imooc/tomcat1/webapps/manager]

22-Apr-2018 07:56:54.170 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/imooc/tomcat1/webapps/manager] has finished in [79] ms

22-Apr-2018 07:57:23.214 信息 [commons-pool-EvictionTimer] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.apache.commons.pool2.impl.EvictionConfig]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.commons.pool2.impl.EvictionConfig]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1312)

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1300)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1159)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1121)

at org.apache.commons.pool2.impl.GenericObjectPool.evict(GenericObjectPool.java:722)

at org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:991)

at java.util.TimerThread.mainLoop(Timer.java:555)

at java.util.TimerThread.run(Timer.java:505)


Exception in thread "commons-pool-EvictionTimer" java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/EvictionConfig

at org.apache.commons.pool2.impl.GenericObjectPool.evict(GenericObjectPool.java:722)

at org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:991)

at java.util.TimerThread.mainLoop(Timer.java:555)

at java.util.TimerThread.run(Timer.java:505)

Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.commons.pool2.impl.EvictionConfig]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1302)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1159)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1121)

... 4 more

Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.commons.pool2.impl.EvictionConfig]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1312)

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1300)

... 6 more


写回答

3回答

Geely

2018-05-01

//img.mukewang.com/szimg/5ae7c6dd00017c4014040200.jpg


这个就是报错的bean1。然后检查注入的数据。看看这些属性及类型是否对应JedisConxxxxFactory里面的属性。


0
0

Geely

2018-04-24


is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'redis.clients.jedis.JedisPoolConfig' for property 'poolConfig'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [redis.clients.jedis.JedisPoolConfig] for property 'poolConfig': no matching editors or conversion strategy found

 Error creating bean with name '1' defined in class path resource [applicationContext-spring-session.xml]:

 

你好同学,这个是关键异常。

发一下这个配置文件看看,里面的bean配置错误。

0
1
慕沐0177137
老师 上传好 了
2018-04-25
共1条回复

慕沐0177137

提问者

2018-04-22

老师或遇到过此问题的同学

希望可以解答。。。。昨天晚上一直没有找到问题原因

0
0

Java企业级电商项目架构 Tomcat集群与Redis分布式

Tomcat集群+Redis分布式+代码重构+源码原理解析

2685 学习 · 947 问题

查看课程