springframework.beans.BeanInstantiationException

Failed to instantiate [org .axonframework.eventsourcing.EventSourcingRepository]: Factory method 'eventSourcingRepository' threw exception; nested exception is java.lang. NoSuchMethodError: com.thoughtworks.xstream.XStream.addImmutableType(Ljava/ lang/Class;Z)V

Solutions on the web1

  • via Google Groups by Mellow Hide, 9 months ago
    Failed to instantiate [org .axonframework.eventsourcing.EventSourcingRepository]: Factory method 'eventSourcingRepository' threw exception; nested exception is java.lang. NoSuchMethodError: com.thoughtworks.xstream.XStream.addImmutableType(Ljava/ lang/Class;Z)V
  • Stack trace

    • springframework.beans.BeanInstantiationException: Failed to instantiate [org .axonframework.eventsourcing.EventSourcingRepository]: Factory method 'eventSourcingRepository' threw exception; nested exception is java.lang. NoSuchMethodError: com.thoughtworks.xstream.XStream.addImmutableType(Ljava/ lang/Class;Z)V at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at com.test.icd.vehicleservice.DeliveryServiceApplication.main(DeliveryServiceApplication.java:10)[main/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_25] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)[idea_rt.jar:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.axonframework.eventsourcing.EventSourcingRepository]: Factory method 'eventSourcingRepository' threw exception; nested exception is java.lang.NoSuchMethodError: com.thoughtworks.xstream.XStream. addImmutableType(Ljava/lang/Class;Z)V at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] ... 23 more Caused by: java.lang.NoSuchMethodError: com.thoughtworks.xstream.XStream. addImmutableType(Ljava/lang/Class;Z)V at org.axonframework.serialization.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:129)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.serialization.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:103)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.serialization.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:78)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.serialization.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:67)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.serialization.xml.XStreamSerializer.<init>(XStreamSerializer.java:49)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.eventsourcing.eventstore.AbstractEventStorageEngine.<init>(AbstractEventStorageEngine.java:37)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.eventsourcing.eventstore.BatchingEventStorageEngine.<init>(BatchingEventStorageEngine.java:40)[axon-core-3.0-M3.jar:3.0-M3] at org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine.<init>(JpaEventStorageEngine.java:37)[axon-core-3.0-M3.jar:3.0-M3] at com.test.icd.vehicleservice.ApplicationConfiguration.eventSourcingRepository(ApplicationConfiguration.java:55)[main/:na] at com.test.icd.vehicleservice.ApplicationConfiguration$$EnhancerBySpringCGLIB$$4042e104.CGLIB$eventSourcingRepository$3(<generated>)[main/:na] at com.test.icd.vehicleservice.ApplicationConfiguration$$EnhancerBySpringCGLIB$$4042e104$$FastClassBySpringCGLIB$$adac035f.invoke(<generated>)[main/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at com.test.icd.vehicleservice.ApplicationConfiguration$$EnhancerBySpringCGLIB$$4042e104.eventSourcingRepository(<generated>)[main/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_25] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] ... 24 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    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.