JBoss Community

ProxyAsyncConfiguration

created by Shivam Sinha in Snowdrop - View the full discussion

Hi,

 

I have spent atleast 14+ hrs on trying to migrate my exisiting spring app to jbossAS7 and would really appreicate anyhelp with the following issue, when attempting to start JBoss:

 

 

Exception:

02:25:44,885 INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory (MSC service thread 1-4) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@78090631: defining beans org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,econDateInitDatabaseImpl,forexPro,importStaticDataImpl,edIndicatorValueFactoryImpl,edCityDAOImpl,edCountryDAOImpl,edHistoryDAOImpl,edHolidayDAOImpl,edIndicatorDAOImpl,edIndicatorValueDAOImpl,edJobDAOImpl,edRegionDAOImpl,edIndicatorSchedulerImpl,proxyAsyncConfiguration,schedulingConfiguration,loadTimeWeavingConfiguration,proxyTransactionManagementConfiguration,delegatingWebMvcConfiguration,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,emf,dataSource,transactionManager,exporter,testBean,schedulerFactoryBean,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,org.springframework.context.annotation.internalAsyncAnnotationProcessor,org.springframework.context.annotation.internalScheduledAnnotationProcessor,loadTimeWeaver,transactionAttributeSource,transactionInterceptor,requestMappingHandlerMapping,viewControllerHandlerMapping,beanNameHandlerMapping,resourceHandlerMapping,defaultServletHandlerMapping,requestMappingHandlerAdapter,mvcConversionService,mvcValidator,httpRequestHandlerAdapter,simpleControllerHandlerAdapter,handlerExceptionResolver; root of factory hierarchy

02:25:44,888 ERROR org.springframework.web.context.ContextLoader (MSC service thread 1-4) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalAsyncAnnotationProcessor' defined in class path resource org/springframework/scheduling/annotation/ProxyAsyncConfiguration.class: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method public org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor() threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1008) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:904) ProxyAsyncConfiguration

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

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:459) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ProxyAsyncConfiguration

          at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728) ProxyAsyncConfiguration

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

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

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

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

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) jbossweb-7.0.1.Final.jar:7.0.2.Final

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) jbossweb-7.0.1.Final.jar:7.0.2.Final

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) jboss-as-web-7.0.2.Final.jar:7.0.2.Final

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ProxyAsyncConfiguration

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ProxyAsyncConfiguration

          at java.lang.Thread.run(Thread.java:680) ProxyAsyncConfiguration

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method public org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor() threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:169) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) ProxyAsyncConfiguration

          ... 21 more

Caused by: java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.util.Assert.notNull(Assert.java:112) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor(ProxyAsyncConfiguration.java:45) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691.CGLIB$asyncAdvisor$0() ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691$$FastClassByCGLIB$$df56e036.invoke() ProxyAsyncConfiguration

          at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) ProxyAsyncConfiguration

          at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:253) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691.asyncAdvisor() ProxyAsyncConfiguration

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ProxyAsyncConfiguration

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ProxyAsyncConfiguration

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ProxyAsyncConfiguration

          at java.lang.reflect.Method.invoke(Method.java:597) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149) ProxyAsyncConfiguration

          ... 22 more

 

02:25:44,890 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/econdates]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalAsyncAnnotationProcessor' defined in class path resource org/springframework/scheduling/annotation/ProxyAsyncConfiguration.class: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method public org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor() threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1008) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:904) ProxyAsyncConfiguration

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

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:459) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ProxyAsyncConfiguration

          at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728) ProxyAsyncConfiguration

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

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

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

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

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) jbossweb-7.0.1.Final.jar:7.0.2.Final

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) jbossweb-7.0.1.Final.jar:7.0.2.Final

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) jboss-as-web-7.0.2.Final.jar:7.0.2.Final

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ProxyAsyncConfiguration

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ProxyAsyncConfiguration

          at java.lang.Thread.run(Thread.java:680) ProxyAsyncConfiguration

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method public org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor() threw exception; nested exception is java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:169) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) ProxyAsyncConfiguration

          ... 21 more

Caused by: java.lang.IllegalArgumentException: @EnableAsync annotation metadata was not injected

          at org.springframework.util.Assert.notNull(Assert.java:112) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration.asyncAdvisor(ProxyAsyncConfiguration.java:45) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691.CGLIB$asyncAdvisor$0() ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691$$FastClassByCGLIB$$df56e036.invoke() ProxyAsyncConfiguration

          at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215) ProxyAsyncConfiguration

          at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:253) ProxyAsyncConfiguration

          at org.springframework.scheduling.annotation.ProxyAsyncConfiguration$$EnhancerByCGLIB$$c8304691.asyncAdvisor() ProxyAsyncConfiguration

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ProxyAsyncConfiguration

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ProxyAsyncConfiguration

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ProxyAsyncConfiguration

          at java.lang.reflect.Method.invoke(Method.java:597) ProxyAsyncConfiguration

          at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149) ProxyAsyncConfiguration

          ... 22 more

 

02:25:44,915 INFO  javax.enterprise.resource.webcontainer.jsf.config (MSC service thread 1-4) Initializing Mojarra 2.1.3 (SNAPSHOT 20110825) for context '/econdates'

02:25:45,809 ERROR org.apache.catalina.core.StandardContext (MSC service thread 1-4) Error listenerStart

02:25:45,809 ERROR org.apache.catalina.core.StandardContext (MSC service thread 1-4) Context /econdates startup failed due to previous errors

02:25:45,810 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/econdates]] (MSC service thread 1-4) Closing Spring root WebApplicationContext

02:25:45,812 INFO  ProxyAsyncConfiguration (MSC service thread 1-4) registering web context: /econdates

02:25:45,858 INFO  org.jboss.as.server.controller (DeploymentScanner-threads - 2) Deployed "econdates.war"

 

 

 

 

 

spring application-infrastructure.xml:

 

 

 

 

 

 


persistence.xml:

 

 

 

 

 

 

web.xml:

<display-name>Econ Dates</display-name>

<context-param>

                    <param-name>contextConfigLocation</param-name>

                    <param-value>classpath:/META-INF/spring/application-context.xml,

              classpath:/META-INF/spring/application-infrastructure.xml,

              <!-- classpath:/META-INF/spring/econdates-security-context.xml  -->

  </param-value>

</context-param>

....

<servlet-mapping>

  <servlet-name>EconDates</servlet-name>

  <url-pattern>/</url-pattern>

</servlet-mapping>

 

...

<persistence-context-ref>

  <persistence-context-ref-name>jboss/myEntityManagerFactory</persistence-context-ref-name>

  <persistence-unit-name>EconDatesDB</persistence-unit-name>

</persistence-context-ref>

 

 

 

 

 

Reply to this message by going to Community

Start a new discussion in Snowdrop at Community