4 Replies Latest reply on Apr 10, 2012 6:43 AM by guinotphil

    EJB component CREATE not found

    guinotphil Apprentice

      Hello,

       

      I’m having this issue for a little time, and I can’t seem to solve it.

       

      Here is what actually happens, I get from times to times this exception, but I can’t find exactly when and why it happens:

      2012-03-16 18:42:28,449 ERROR [org.jboss.ejb3.invocation] JBAS014134: EJB Invocation failed on component ejbs/myEjbName for method public abstract void myproject.ejbs.MyEJB.destroy(): javax.ejb.EJBException: java.lang.RuntimeException: JBAS014539: Failed to activate {[-108, -113, 92, 95, 0, -81, 71, -34, -89, 36, 36, -15, -38, -28, 3, -110]}

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.stateful.StatefulComponentIdInterceptor.processInvocation(StatefulComponentIdInterceptor.java:52)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)

                at myproject.ejbs.MyEJB$$$view34.destroy(Unknown Source)

                at sun.reflect.GeneratedMethodAccessor2286.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

                at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

                at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)

                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

                at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)

                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

                at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)

                at org.javassist.tmp.java.lang.Object_$$_javassist_seam_40.destroy(Object_$$_javassist_seam_40.java)

                at sun.reflect.GeneratedMethodAccessor2306.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

                at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

                at org.jboss.seam.Component.callComponentMethod(Component.java:2275)

                at org.jboss.seam.Component.callDestroyMethod(Component.java:2206)

                at org.jboss.seam.Component.destroy(Component.java:1472)

                at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251)

                at org.jboss.seam.contexts.Contexts.destroyConversationContext(Contexts.java:413)

                at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:286)

                at org.jboss.seam.contexts.ServletLifecycle.endSession(ServletLifecycle.java:187)

                at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:59)

                at org.apache.catalina.session.StandardSession.expire(StandardSession.java:690)

                at org.apache.catalina.session.StandardSession.expire(StandardSession.java:653)

                at org.apache.catalina.session.StandardManager.stop(StandardManager.java:676)

                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3995)

                at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:108)

                at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)

                at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.RuntimeException: JBAS014539: Failed to activate {[-108, -113, 92, 95, 0, -81, 71, -34, -89, 36, 36, -15, -38, -28, 3, -110]}

                at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.load(FilePersistentObjectStore.java:191)

                at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.load(FilePersistentObjectStore.java:52)

                at org.jboss.as.ejb3.cache.impl.backing.SimpleBackingCacheEntryStore.get(SimpleBackingCacheEntryStore.java:103)

                at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberContainer.get(SerializationGroupMemberContainer.java:279)

                at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberContainer.get(SerializationGroupMemberContainer.java:50)

                at org.jboss.as.ejb3.cache.impl.backing.PassivatingBackingCacheImpl.get(PassivatingBackingCacheImpl.java:135)

                at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.get(AbstractCache.java:66)

                at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.get(AbstractCache.java:39)

                at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)

                ... 57 more

      Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.deployment.subunit."EAR_Project.ear"."EJB_Project.jar".component.ejbs/myEjbName.CREATE not found

                at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:447)

                at org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.readResolve(SerializedStatefulSessionComponent.java:43)

                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.marshalling.reflect.SerializableClass.callReadResolve(SerializableClass.java:325)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:153)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:139)

                at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:57)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)

                at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberImpl.readObject(SerializationGroupMemberImpl.java:358)

                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.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:213)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1574)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1235)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)

                at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.load(FilePersistentObjectStore.java:180)

                ... 67 more

      Caused by: an exception which occurred:

                in object of type org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent

                in object of type org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberImpl

       

       

       

      My application is an EJB application which contains a WAR module, an EJB module and Seam 2.2.2

       

      In my standalone.xml the EJB passivation is defined by:

       

              <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="passivating"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <mdb>

                      <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                  </mdb>

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple" aliases="NoPassivationCache"/>

                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                  </caches>

                  <passivation-stores>

                      <file-passivation-store name="file"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default">

                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                  </timer-service>

                  <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                  <thread-pools>

                      <thread-pool name="default">

                          <max-threads count="10"/>

                          <keepalive-time time="100" unit="milliseconds"/>

                      </thread-pool>

                  </thread-pools>

                  <iiop enable-by-default="false" use-qualified-name="false"/>

              </subsystem>

       

      As you can see the passivation is enabled for stateful bean. The default settings (no passivation cache) caused even more EJB exception with Seam.

       

       

      My EJB is defined by this interface

      package myproject.ejbs;

       

      import javax.ejb.Local;

       

      @Local

      public interface MyEJB

      {

          boolean myBusinessMethod();

       

          void init();

          void destroy();

      }

       

       

      And this implementation:

      package myproject.ejbs;

       

      import java.io.Serializable;

      import java.util.ArrayList;

      import java.util.List;

       

      import javax.ejb.Remove;

      import javax.ejb.Stateful;

      import javax.persistence.EntityManager;

       

      import org.jboss.seam.ScopeType;

      import org.jboss.seam.annotations.AutoCreate;

      import org.jboss.seam.annotations.Destroy;

      import org.jboss.seam.annotations.JndiName;

      import org.jboss.seam.annotations.Logger;

      import org.jboss.seam.annotations.Name;

      import org.jboss.seam.annotations.Scope;

      import org.jboss.seam.annotations.security.Restrict;

      import org.jboss.seam.annotations.web.RequestParameter;

       

      @AutoCreate

      @Scope(ScopeType.SESSION)

      @Stateful(name=MyEJBImpl.EJB_NAME)

      @JndiName(MyEJBImpl.JNDI_NAME)

      @Name("ejbs.myEjbName")

      public class MyEJBImpl implements MyEJB, Serializable

      {

          private static final long serialVersionUID = 9058879769483082826L;

          public static final String EJB_NAME = "ejbs/myEjbName";

          public static final String JNDI_NAME = "java:global/EAR_Project/EJB_Project/" + EJB_NAME;

       

          @Logger

          Log log;

       

          @Override

          @Create

          @Begin(join=true)

          public void init() {

              log.debug("Creating #0", EJB_NAME);

          }

       

          @Override

          @Remove

          @Destroy

          public void destroy() {

              log.debug("Removing EJB #0", EJB_NAME);

          }

       

          @Override

          public boolean myBusinessMethod()    {

              ......

          }

      }

       

       

      And, when the exception from above is happening, running this code:

      Class cl = Class.forName("org.jboss.msc.service.ServiceContainerImpl");

      java.lang.reflect.Method getService = cl.getDeclaredMethod("getService", org.jboss.msc.service.ServiceName.class);

      getService.setAccessible(true);

       

      return getService.invoke(org.jboss.as.server.CurrentServiceContainer.getServiceContainer(), org.jboss.msc.service.ServiceName.parse("jboss.deployment.subunit.\"EAR_Project.ear\".\"EJB_Project.jar\".component.ejbs/myEjbName.CREATE"));

       

      does not return null ! So I dont understand how the component could not be found....

       

       

       

       

      Thank you very much for your help.

        • 1. Re: EJB component CREATE not found
          guinotphil Apprentice

          Anyone please to help me with this issue ? This is really flooding my logs and I'm not sure that I want to deploy AS 7 in production until I get this solved.

          • 2. Re: EJB component CREATE not found
            jaikiran pai Master

            Which exact version of AS7 is this? And what the does application packaging look like?

            • 3. Re: EJB component CREATE not found
              guinotphil Apprentice

              Sorry, yeah this is happening with both AS 7.1.0.Final and 7.1.1.Final.

               

              Here is the description of my packaging:

               

              EAR_Project.ear

                   |----- lib/

                            |----- various *.jar files

                   |----- META-INF/

                            |----- application.xml

                            |----- jboss-deployment-structure.xml

                   |----- jboss-seam.jar        Seam 2.2.2 deployed as an EJB in application.xml

                   |----- EJB_Project.jar

                   |----- EJB_Project_2.jar

                   |----- EJB_Project_3.jar

                   |----- WAR_Project.war

                   |----- WAR_Project_2.war

               

              Thanks for your interest.

               

               

              • 4. Re: EJB component CREATE not found
                guinotphil Apprentice

                I think I got it....

                 

                My problems actually seems to occur only during the undeployment of the application.

                 

                Here is my application.xml

                 

                <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">

                  <application-name>EAR_Project</application-name>

                  <display-name>EAR_Project</display-name>

                  <initialize-in-order>true</initialize-in-order>

                  <module>

                    <web>

                      <web-uri>WAR_Project_2.war</web-uri>

                      <context-root>/ctx</context-root>

                    </web>

                  </module>

                  <module>

                    <ejb>jboss-seam.jar</ejb>

                  </module>

                  <module>

                    <ejb>EJB_Project.jar</ejb>

                  </module>

                  <module>

                    <ejb>EJB_Project_2.jar</ejb>

                  </module>

                  <module>

                    <ejb>EJB_Project_3.jar</ejb>

                  </module>

                  <module>

                    <web>

                      <web-uri>WAR_Project.war</web-uri>

                      <context-root>/</context-root>

                    </web>

                  </module>

                </application>

                 

                 

                The initialize-in-order is important to me, because I need the WAR to be deployed first as, being a Seam application, it'll create the Seam component before the EJB are initialized. I need this, as some of my JMS beans need Seam.

                 

                When undeploying the application, the EJB will be undeployed first. This causes the EJB instance to be removed. But when the WAR is getting undeployed, the sessions are destroyed, and so are the Seam component attached to these sessions. In my case, I have Seam/EJB component. So, when Seam is trying to destroy them, they actually were already destroyed. Hence the error in the EJB interceptor.

                 

                I don't really know, if this is a Seam or EJB issue then.