2 Replies Latest reply on Dec 10, 2008 8:30 AM by Rogerio Baldini

    Error deploying EJB3 on jBoss 5.0.0.GA

    Rogerio Baldini Newbie

      Hi Guys,

      I am trying to deploy an EJB3 on jBoss 5.0.0.GA and I am receiving this message:

      09:32:54,821 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=#default
      09:32:54,822 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      09:32:54,826 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=#default
      09:32:54,826 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
      09:32:54,826 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      09:32:56,113 INFO [JBossASKernel] Created KernelDeployment for: jcompany_jsf_modelo.jar
      09:32:56,113 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3
      09:32:56,113 INFO [JBossASKernel] with dependencies:
      09:32:56,113 INFO [JBossASKernel] and demands:
      09:32:56,113 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
      09:32:56,113 INFO [JBossASKernel] and supplies:
      09:32:56,113 INFO [JBossASKernel] jndi:AppFacadeImpl/remote-com.powerlogic.app.facade.IAppFacadeRemote
      09:32:56,113 INFO [JBossASKernel] jndi:AppFacadeImpl/local-com.powerlogic.app.facade.IAppFacade
      09:32:56,114 INFO [JBossASKernel] Class:com.powerlogic.app.facade.IAppFacadeRemote
      09:32:56,114 INFO [JBossASKernel] jndi:AppFacadeImpl/local
      09:32:56,114 INFO [JBossASKernel] jndi:AppFacadeImpl
      09:32:56,114 INFO [JBossASKernel] Class:com.powerlogic.app.facade.IAppFacade
      09:32:56,114 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3) to KernelDeployment of: jcompany_jsf_modelo.jar
      09:32:56,144 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3
      09:32:56,144 INFO [EJBContainer] STARTED EJB: com.powerlogic.app.facade.AppFacadeImpl ejbName: AppFacadeImpl
      09:32:56,169 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
       AppFacadeImpl - EJB3.x Default Remote Business Interface
       AppFacadeImpl/remote-com.powerlogic.app.facade.IAppFacadeRemote - EJB3.x Remote Business Interface
       AppFacadeImpl/local - EJB3.x Default Local Business Interface
       AppFacadeImpl/local-com.powerlogic.app.facade.IAppFacade - EJB3.x Local Business Interface
      
      09:32:56,201 INFO [SessionSpecContainer] Stopping jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3
      09:32:56,213 INFO [EJBContainer] STOPPED EJB: com.powerlogic.app.facade.AppFacadeImpl ejbName: AppFacadeImpl
      09:32:56,213 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3 state=Create
      java.lang.ClassCastException: $Proxy421 cannot be cast to javax.naming.Context
       at org.jboss.util.naming.Util.createSubcontext(Util.java:70)
       at org.jboss.util.naming.Util.bind(Util.java:104)
       at org.jboss.util.naming.Util.bind(Util.java:91)
       at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:901)
       at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:886)
       at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.bind(JndiSessionRegistrarBase.java:875)
       at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:150)
       at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:174)
       at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:606)
       at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:247)
       at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:879)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:547)
       at java.lang.Thread.run(Thread.java:619)
      09:32:56,416 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
      
      jboss.web.deployment:war=/jcompany_jsf
       -> jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3{Create:**ERROR**}
      
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.j2ee:jar=jcompany_jsf_modelo.jar,name=AppFacadeImpl,service=EJB3 -> java.lang.ClassCastException: $Proxy421 cannot be cast to javax.naming.Context | **ERROR**
      
      


      My EJB:
      @Stateless(mappedName="AppFacadeImpl")
      @TransactionManagement(TransactionManagementType.CONTAINER)
      
      public class AppFacadeImpl extends PlcFacadeImpl implements IAppFacade, IAppFacadeRemote {
      
      }
      


      And interfaces:
      @Local
      public interface IAppFacade extends IPlcFacade {
      
      }
      


      @Remote
      public interface IAppFacadeRemote extends IPlcFacadeRemote, IAppFacade {
      
      }
      



      Can anybody help me ?

      Thanks,
      Rogerio