4 Replies Latest reply on Jun 22, 2009 7:31 PM by Ondrej Zizka

    Stateful EJB hanging in JNDI namespace - JBAS bug?

    Ondrej Zizka Master

      Hi,

      I've been playing with EJB 3.0.

      I've managed to get AS to a state when EJB jar was not (reported as) deployed, but the stateful bean which was inside it is still hanging in JNDI namespace, causing:

      java.lang.IllegalStateException: ProxyFactory/ejb-stateful-1.0-SNAPSHOT/CounterXBean/CounterXBean/remote is already installed.

      This happened when I was redeploying the EJB jar after renaming class and/or interfaces (from Counter to CounterX), until the redeployment failed, and the successive try threw that exception.

      Do you think this could be an AS bug?

      I used the EAP 5 branch.

        • 1. Re: Stateful EJB hanging in JNDI namespace - JBAS bug?
          Ondrej Zizka Master

          Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

          DEPLOYMENTS MISSING DEPENDENCIES:
          Deployment "jboss.j2ee:jar=ejb-stateful-1.0-SNAPSHOT.jar,name=CounterXBean,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:jar=ejb-stateful-1.0-SNAPSHOT.jar,name=CounterXBean,service=EJB3" (should be in state "Configured", but is actually in state "**ERROR**")

          DEPLOYMENTS IN ERROR:
          Deployment "jboss.j2ee:jar=ejb-stateful-1.0-SNAPSHOT.jar,name=CounterXBean,service=EJB3" is in error due to the following reason(s): **ERROR**, java.lang.IllegalStateException: ProxyFactory/ejb-stateful-1.0-SNAPSHOT/CounterXBean/CounterXBean/remote is already installed.

          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.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:265)
          at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:177)
          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
          at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
          at org.jboss.remoting.Client.invoke(Client.java:1724)
          at org.jboss.remoting.Client.invoke(Client.java:629)
          at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:305)
          ... 17 more

          • 2. Re: Stateful EJB hanging in JNDI namespace - JBAS bug?
            Ondrej Zizka Master

            JMX console - Global JNDI Namespace:

            +- CounterBean (class: org.jnp.interfaces.NamingContext)
            | +- remote-ejbtest.stateful.bean.CounterBean (class: Proxy for: ejbtest.stateful.bean.CounterBean)
            | +- remote (class: Proxy for: ejbtest.stateful.bean.CounterBean)

            • 3. Re: Stateful EJB hanging in JNDI namespace - JBAS bug?
              Ondrej Zizka Master

              Actually, JMX console reports the jar as deployed. It seems not to be through EmbJopr, so it might me a ProfileService bug.

              • 4. Re: Stateful EJB hanging in JNDI namespace - JBAS bug?
                Ondrej Zizka Master

                I have found the condition to make it happen - when I have @Remote on both interface and class (bad EJB):

                @Remote
                public interface CounterRemote extends Counter { }

                and

                @Stateful
                @Remote(CounterBean.class)
                public class CounterBean implements CounterRemote { }

                When this is deployed and undeployed, it remains somehow "half-deployed", and can't be un-half-deployed nor (re)deployed.