[jboss-user] [JBoss/Spring Integration] - Exploded deployment problem
purplehaze9999
do-not-reply at jboss.com
Mon Jul 16 10:00:32 EDT 2007
Hello *,
I use Spring 2.1 M2, JBoss 4.2
I can deploy JBoss-Spring example without errors.
I wrote simple example by my self and deployed it in tree separate archives
.spring, .jar and .war. It works.
But wenn I try to deploy an application in exploded directories then I get this error:
| 15:50:15,263 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=WarP-ServerDatasource' to JNDI name 'java:WarP-ServerDatasource'
| 15:50:15,278 INFO [EARDeployer] Init J2EE application: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/
| 15:50:15,325 INFO [NamedXmlApplicationContext] Refreshing org.jboss.spring.factory.NamedXmlApplicationContext at 80f252: display name [org.jboss.spring.factory.NamedXmlApplicationContext at 80f252]; startup date [Mon Jul 16 15:50:15 CEST 2007]; root of context hierarchy
| 15:50:15,325 INFO [NamedXmlBeanDefinitionReader] Loading XML bean definitions from URL [file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/WarP-Server-dao.spring/META-INF/jboss-spring.xml]
| 15:50:15,372 INFO [NamedXmlBeanDefinitionParser] Bean names [description tag]: BeanFactory=(WarP-Server-DAO)
| 15:50:15,388 INFO [NamedXmlApplicationContext] Bean factory for application context [org.jboss.spring.factory.NamedXmlApplicationContext at 80f252]: org.springframework.beans.factory.support.DefaultListableBeanFactory at c83cfd
| 15:50:15,403 INFO [NamedXmlApplicationContext] Bean 'org.springframework.context.config.internalAutowiredAnnotationProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
| 15:50:15,403 INFO [NamedXmlApplicationContext] Bean 'org.springframework.context.config.internalRequiredAnnotationProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
| 15:50:15,403 INFO [NamedXmlApplicationContext] Bean 'org.springframework.context.config.internalCommonAnnotationProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
| 15:50:15,403 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory at c83cfd: defining beans [org.springframework.context.config.internalAutowiredAnnotationProcessor,org.springframework.context.config.internalRequiredAnnotationProcessor,org.springframework.context.config.internalCommonAnnotationProcessor,stockDAOImpl,dataSource,sqlMapClient]; root of factory hierarchy
| 15:50:15,481 INFO [ApplicationContextLoaderImpl] Bean factory [WarP-Server-DAO] binded to local JNDI.
| 15:50:15,481 INFO [SpringApplicationContextDeployer] Deployed Spring: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/WarP-Server-dao.spring/
| 15:50:15,513 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 15:50:15,513 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=WarP-Server.ear,jar=WarP-Server.jar,name=StockServiceEJB,service=EJB3 with dependencies:
| 15:50:15,528 INFO [EJBContainer] STARTED EJB: de.arvatoservices.warp.session.StockServiceEJB ejbName: StockServiceEJB
| 15:50:15,528 INFO [EJBContainer] STOPPED EJB: de.arvatoservices.warp.session.StockServiceEJB ejbName: StockServiceEJB
| 15:50:15,528 WARN [ServiceController] Problem starting service jboss.j2ee:ear=WarP-Server.ear,jar=WarP-Server.jar,name=StockServiceEJB,service=EJB3
| java.lang.ClassCastException: org.jboss.spring.factory.NamedXmlApplicationContext cannot be cast to javax.naming.Context
| at org.jboss.util.naming.Util.createSubcontext(Util.java:69)
| at org.jboss.util.naming.Util.rebind(Util.java:125)
| at org.jboss.util.naming.Util.rebind(Util.java:113)
| at org.jboss.ejb3.stateless.BaseStatelessProxyFactory.bindProxy(BaseStatelessProxyFactory.java:242)
| at org.jboss.ejb3.stateless.BaseStatelessProxyFactory.start(BaseStatelessProxyFactory.java:225)
| at org.jboss.ejb3.stateless.StatelessRemoteProxyFactory.start(StatelessRemoteProxyFactory.java:107)
| at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:83)
| at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:128)
| at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:94)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy104.start(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
| at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:297)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:344)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy34.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy35.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| 15:50:15,622 INFO [EJB3Deployer] Deployed: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/WarP-Server.jar/
| 15:50:15,669 INFO [EARDeployer] Started J2EE application: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/
| 15:50:15,669 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:ear=WarP-Server.ear,jar=WarP-Server.jar,name=StockServiceEJB,service=EJB3
| State: FAILED
| Reason: java.lang.ClassCastException: org.jboss.spring.factory.NamedXmlApplicationContext cannot be cast to javax.naming.Context
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:ear=WarP-Server.ear,jar=WarP-Server.jar,name=StockServiceEJB,service=EJB3
| State: FAILED
| Reason: java.lang.ClassCastException: org.jboss.spring.factory.NamedXmlApplicationContext cannot be cast to javax.naming.Context
|
application.xml:
| <application xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
| version="5">
|
| <display-name>WarP-Server</display-name>
| <module>
| <ejb>WarP-Server-dao.spring</ejb>
| </module>
|
| <module>
| <ejb>WarP-Server.jar</ejb>
| </module>
| </application>
|
WarP-Server-dao.spring and WarP-Server.jar both are exploded archives too.
Wenn I comment out WarP-Server.jar module in application.xml then I don't get any errors.
In my EJB's I commented out all references to spring beans. Why get I then this error?
One more issue.
When I undeploy *.ear directory then I get this:
|
| 15:58:17,341 WARN [JmxKernelAbstraction] jboss.j2ee:ear=WarP-Server.ear,jar=WarP-Server.jar,name=StockServiceEJB,service=EJB3 is not registered
| 15:58:17,341 INFO [SpringApplicationContextDeployer] Undeploying Spring: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/WarP-Server-dao.spring/
| 15:58:17,341 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
| 15:58:17,341 ERROR [SpringApplicationContextDeployer] Failed to stop bean factory: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/WarP-Server-dao.spring/
| 15:58:17,356 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/
| 15:58:17,356 INFO [EARDeployer] Undeployed J2EE application: file:/D:/Programme/jboss-4.2.0.GA/server/default/deploy/WarP-Server.ear/
| 15:58:17,356 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=WarP-ServerDatasource' from JNDI name 'java:WarP-ServerDatasource'
|
|
|
Best regards
Roman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064566#4064566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064566
More information about the jboss-user
mailing list