org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.service.test.Consumer#0' defined in class path resource [dubbo-consumer.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.service.test.bo.TestBO [01/08/14 01:13:12:012 CST] DubboSharedHandler-thread-1 INFO dubbo.DubboProtocol: [DUBBO] disconected from /10.1.4.130:20880,url:dubbo://10.1.4.130:20880/com.service.test.service.TestService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.4.9&heartbeat=60000&interface=com.service.test.service.TestService&methods=addValue,findAllTest,delTest,addTest&pid=1740&serialization=hessian2&side=consumer&timestamp=1406869991616, dubbo version: 2.4.9, current host: 10.1.4.130

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Google Groups by j, 10 months ago
Error creating bean with name 'com.service.test.Consumer#0' defined in class path resource [dubbo-consumer.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
via coderanch.com by Unknown author, 1 year ago
Error creating bean with name 'hibernate4SessionFactory' defined in class path resource [Spring-Module.xml]: Invocation of init method failed; nested exception is : org/hibernate/annotations/common/reflection/ReflectionManager
via Coderanch by Simon Ritchie, 10 months ago
Error creating bean with name 'hibernate4SessionFactory' defined in class path resource [Spring-Module.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ReflectionManager
via genuitec.com by Unknown author, 1 year ago
Error creating bean with name ‘transactionManager’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.service.UnknownUnwrapTypeException: Cannot unwrap to requested type [javax.sql.DataSource]
via Stack Overflow by user3962745
, 2 years ago
Error creating bean with name 'emp' defined in class path resource [com/bpp/commons/application-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
via Stack Overflow by Uswer721
, 2 years ago
Error creating bean with name 'sessionFactory' defined in class path resource [application-config.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ClassLoadingException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.service.test.Consumer#0' defined in class path resource [dubbo-consumer.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.service.test.bo.TestBO [01/08/14 01:13:12:012 CST] DubboSharedHandler-thread-1 INFO dubbo.DubboProtocol: [DUBBO] disconected from /10.1.4.130:20880,url:dubbo://10.1.4.130:20880/com.service.test.service.TestService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.4.9&heartbeat=60000&interface=com.service.test.service.TestService&methods=addValue,findAllTest,delTest,addTest&pid=1740&serialization=hessian2&side=consumer&timestamp=1406869991616, dubbo version: 2.4.9, current host: 10.1.4.130
at com.service.test.Consumer.start(Consumer.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at com.alibaba.dubbo.container.spring.SpringContainer.start(SpringContainer.java:50)
at com.alibaba.dubbo.container.Main.main(Main.java:80)
at undefined.ConsumerLaunch.main(ConsumerLaunch.java:23)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.