org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'messageSource' defined in class path resource [META-INF/spring-web.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

Samebug tips1

Check if the version of resteasy is using is the same JBoss is using. To find it out, search for resteasy-jaxrs* in JBoss/Wildfly directory and at your pom.xml.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in class path resource [META-INF/spring-web.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:471)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:628)[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:470)[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:242)[jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194)[jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100)[jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591)[jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798)[jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156)[jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14] at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)[jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14] at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)[jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[rt.jar:1.7.0_75] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[rt.jar:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[rt.jar:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[rt.jar:1.7.0_75] at java.lang.Thread.run(Thread.java:745)[rt.jar:1.7.0_75] at org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getPointcut(ReflectiveAspectJAdvisorFactory.java:192)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getAdvisor(ReflectiveAspectJAdvisorFactory.java:178)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getAdvisors(ReflectiveAspectJAdvisorFactory.java:108)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.annotation.BeanFactoryAspectJAdvisorsBuilder.buildAspectJAdvisors(BeanFactoryAspectJAdvisorsBuilder.java:109)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:87)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:289)[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:958)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:930)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:465)[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] ... 26 more Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException from [Module "com.foo.abc:main" from local module loader @9f14c3 (finder: local module finder @c282b (roots: C:\Program Files\EAP-6.2.0\jboss-eap-6.2\modules,C:\Program Files\EAP-6.2.0\jboss-eap-6.2\modules\system\layers\base))] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)[jboss-modules.jar:1.3.0.Final-redhat-2] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)[jboss-modules.jar:1.3.0.Final-redhat-2] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)[jboss-modules.jar:1.3.0.Final-redhat-2] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)[jboss-modules.jar:1.3.0.Final-redhat-2] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)[jboss-modules.jar:1.3.0.Final-redhat-2] ... 36 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

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Andreas HäberAndreas Häber
Once,
81 more bugmates