ClassCastException when deploy EJB2 in JBoss5.0.1 but works well when in Jboss4
clariones Mar 2, 2010 10:02 PMHi,
We have a product base on EJB2, and deployed in Jboss 4.0.2 before. All things go well.
After I change my JBoss to 5.0.1.GA, I got the strange exception: ClassCastException
The Exception Stack |
---|
10:20:59,782 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core "server.out" 487L, 46297C 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:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) 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:668) at com.nokia.warlock.utils.deployer.AppDeployer.deployModule(AppDeployer.java:324) at com.nokia.warlock.utils.deployer.AppDeployer.startService(AppDeployer.java:292) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269) at com.nokia.warlock.utils.jmx.StandardMBeanSupport.start(StandardMBeanSupport.java:67) ... 62 more Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): *** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/usr/nbg/system/modules/Configuration.jar/ -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/usr/nbg/system/modules/Configuration.jar/ DEPLOYMENTS IN ERROR: Deployment "vfszip:/usr/nbg/system/modules/Configuration.jar/" is in error due to the following reason(s): java.lang.ClassCastException: org.jboss.metadata.ejb.jboss.JBossEntityBeanMetaData cannot be cast to org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993) at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:862) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:833) ... 77 more |
And here is the piece of ejb-jar.xml:
in ejb-jar.xml |
---|
And here is the code shows how "AppDeployer" deploy jar files:
code pieces |
---|
* Created on 02.03.2005 ...... ...... |
The parameters and Jboss.service:MainDeployer can got correctly, but I always got the classCastException for EntityBean. I serached in google and do not found any likely issues.
Anybody can give a hand? Thanks a lot!