[jboss-user] [Beginner's Corner] - Problems Migrating from WAS to JBoss 6

Julie H do-not-reply at jboss.com
Thu Jun 30 03:15:53 EDT 2011


Julie H [http://community.jboss.org/people/julieh] created the discussion

"Problems Migrating from WAS to JBoss 6"

To view the discussion, visit: http://community.jboss.org/message/612665#612665

--------------------------------------------------------------
Hi.

I am in the processing of migrating one of our applications from WAS to JBoss 6, and have come across an issue I am having trouble resolving. Would appreciate it if someone could provide some insight into this problem.

The application follows the EJB2.0 spec and uses Xdoclet annotations.
We want to first get the application up and running on JBOSS 6, with a view to then converting the application to use EJB3.0 spec.

I have installed the application successfully in JBoss 5 (just to check whether I got the same issue as in JBoss 6), and it installs successfully (haven't run it yet though - so it may fail at runtime).

The error I am getting is as follows :

2011-06-30 15:05:32,554 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Create: name=jboss.j2ee:jndiName=BPProcessAudit,service=EJB state=Configured mode=Manual requiredState=Create: java.lang.ClassCastException: $Proxy193 cannot be cast to javax.ejb.EJBLocalHome
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.getEJBLocalHome(BaseLocalProxyFactory.java:244) [:6.0.0.Final]
at org.jboss.ejb.Container.createService(Container.java:923) [:6.0.0.Final]
at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:159) [:6.0.0.Final]
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:323) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:299) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_13]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_13]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_13]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_13]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189) [:2.2.0.GA]
at $Proxy41.create(Unknown Source) at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:54) [:2.2.0.GA]
at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:42) [:2.2.0.GA]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.system.ServiceController.doChange(ServiceController.java:671) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.ServiceController.create(ServiceController.java:405) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source) [:1.6.0_13]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_13]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_13]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) [:6.0.0.GA]
at $Proxy173.create(Unknown Source) at org.jboss.ejb.EjbModule.createService(EjbModule.java:449) [:6.0.0.Final]
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:323) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:299) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_13]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_13]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_13]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_13]
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189) [:2.2.0.GA]
at $Proxy41.create(Unknown Source) at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:54) [:2.2.0.GA]
at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:42) [:2.2.0.GA]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.system.ServiceController.doChange(ServiceController.java:671) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.ServiceController.create(ServiceController.java:405) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.ServiceController.create(ServiceController.java:370) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
at org.jboss.system.deployers.ServiceDeployer.create(ServiceDeployer.java:184) [:6.0.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) [:6.0.0.Final]
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49) [:6.0.0.Final]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_13]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_13]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_13]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_13]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]


This error occurs for each of the EJB's contained in the application.

The class which causes the above problem is :

package com.xx.dao.ejb;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
// other imports deleted
/**
* --
* @ejb.bean
*    name = "BPProcessAudit"
*    display-name = "BPProcessAudit Database Access Bean"
*    type = "Stateless"
*    transaction-type = "Bean"
*    jndi-name = "ejb/xx/xx/BPProcessAudit"
*    local-jndi-name = "ejb/xx/xx/BPProcessAuditLocal"
*    view-type = "both"
*
* @ejb.home
*    remote-class = "com.xx.dao.ejb.interfaces.BPProcessAuditHome"
*    local-class = "com.xx.dao.ejb.interfaces.BPProcessAuditLocalHome"
*
* @ejb.interface
*    remote-class = "com.xx.dao.ejb.interfaces.BPProcessAudit"
*    local-class = "com.xx.dao.ejb.interfaces.BPProcessAuditLocal"
*
* @ejb.util
*    generate = "logical"
*
* @ejb.resource-ref
*  res-ref-name = "MYDB_REF"
*  res-type = "javax.sql.DataSource"
*  res-auth = "Container"
*  jndi-name = "jdbc/AXISDB"
*
* @websphere.resource-ref
*  res-ref-name = "MYDB_REF"
*  isolation-level = "TRANSACTION_READ_COMMITTED"
*/
public class BPProcessAuditEJB implements SessionBean {
  //Static fields
  private static final long serialVersionUID = -76401858385693261L;
  //Instance fields
  private SessionContext sessionContext;
  public void ejbCreate() throws EJBException, CreateException {
  }
  public void ejbActivate() throws EJBException, RemoteException {
  }
  public void ejbPassivate() throws EJBException, RemoteException {
  }
  public void ejbRemove() throws EJBException, RemoteException {
  }

  /**
    *
    * @param primaryKey
    * @return
    * @throws EJBException
    * --
    * @ejb.interface-method
    *    view-type = "both"
    */
  public BPProcessAuditVO find(BPProcessAuditPK primaryKey) throws EJBException, DataAccessException {
      // code deleted
      
  }



The Local and remote interfaces, and the utility class are all generated by Xdoclet.

Please let me know what other information would be useful in identifying the issue.

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/612665#612665]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110630/a99dcb0e/attachment-0001.html 


More information about the jboss-user mailing list