5 Replies Latest reply on May 29, 2008 4:31 PM by Chris Simons

    No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)

    Chris Simons Expert

      As I mentioned in another (though somewhat off-topic) post, I am having difficult deploying the Booking example to a OC4J 10.1.3.3 container.  The example as configured will deploy successfully to OC4J 11 TP4.


      The problem is not that it doesn't find the SeamInterceptor class but that it can't find @AroundInvoke annotation that it extends from SessionBeanInterceptor (at least that is my guess).


      The error message on deployment:


      2008-05-28 16:45:42.059 ERROR J2EE EJB-03027 [jboss-seam-jee5] An error occured deploying EJB module: com.evermind.server.ejb.exception.DeploymentException: [jboss-seam-jee5:jboss-seam-jee5] - No <around-invoke
      > or lifecycle callbacks were specified for interceptor org.jboss.seam.ejb.SeamInterceptor.
      08/05/28 16:45:42 WARNING: Application.setConfig Application: jboss-seam-jee5 is in failed state as initialization failed.
      java.lang.InstantiationException: Error initializing ejb-modules: [jboss-seam-jee5:jboss-seam-jee5] - No <around-invoke> or lifecycle callbacks were specified for interceptor org.jboss.seam.ejb.SeamInterceptor.


      Could really use some help here.  Is OC4J10R3 unable to find the interceptors because SeamInterceptor is inheriting them from a parent class?  Is there something wrong my ejb-jar.xml or other configuration file?



      resources/meta-inf/ejb-jar.xml


      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
               version="3.0">         
         <interceptors>
            <interceptor>         <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
            </interceptor>
         </interceptors>   
         <assembly-descriptor>
            <interceptor-binding>         <ejb-name>*</ejb-name>
      <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
            </interceptor-binding>
         </assembly-descriptor>
      </ejb-jar>





      web.xml is exactly as in Booking example (no changes).


      Again, example deploys to OC4J11 exactly as found in Booking example.  Was hoping this latest release of OC4J10 was closer to OC4J11 TP4 than it truly is.


      Thanks.

        • 1. Re: No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)
          Jay Balunas Novice

          Here is another suggestion and you touched on it above as well.  It should be easy enough to test.


          Try setting your interceptor to


          org.jboss.seam.intercept.SessionBeanInterceptor
          



          instead of


          org.jboss.seam.ejb.SeamInterceptor
          



          What if OC4j interceptor processing is weak and not handling inherited annotations.

          • 2. Re: No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)
            Chris Simons Expert

            Jay - this is what I am going to test next.  I found in some obscure Oracle documentation that there are some more parameters I can specify within ejb-jar (make that orion-ejb-jar.xml) as follows:



              <interceptors>
                 <interceptor>
                   <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
                    <around-invoke>
                           <method-name>aroundInvoke</method-name>
                    </around-invoke>
                 </interceptor>
               </interceptors>



            Deploying and still seeing the same problem so I'm going to try the SessionBeanInterceptor next!


            Thank you.

            • 3. Re: No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)
              Chris Simons Expert

              Update!  Okay, I kind of figured it out...I had to take the ejb-jar.xml that was created when I deployed to OC4J11 (which defines each lifecycle-callback in detail and does references SessionBeanInterceptor).  I replaced the Booking example's ejb-jar with this one.  Now, my problem is that OC4J interprets ejb-jar and creates an orion-ejb-jar that includes the <interceptors> tag, which is not allowed.



              2008-05-28 18:30:11.003 ERROR J2EE EJB-03027 [jboss-seam-jee5] An error occured deploying EJB module: java.lang.InstantiationException: Unknown deployment tag in C:\oracle\product\oc4j10-1-3-3\j2ee\home\applica
              tion-deployments\jboss-seam-jee5\jboss-seam-jee5/orion-ejb-jar.xml: <interceptors>
              08/05/28 18:30:11 WARNING: Application.setConfig Application: jboss-seam-jee5 is in failed state as initialization failed.




              I can't seem to override this file...it seems to interpret ejb-jar into something that isn't supported.  What OC4J creates for orion-ejb-jar is:


              <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.0.0" deployment-time="11a1d529eef" schema-major-version="10" schema-minor-version="0" >
              <interceptors>
                  <interceptor>
              <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
                <around-invoke>
                   <method-name>aroundInvoke</method-name>
                </around-invoke>
                   </interceptor>
                 </interceptors>
              <assembly-descriptor>
                    <interceptor-binding>
                       <ejb-name>*</ejb-name>
                       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
                    </interceptor-binding>
                 </assembly-descriptor>
              
              </orion-ejb-jar>




              The orion-ejb-jar generated for OC4J11TP4 looks like:


              <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="11.1.1.0.0" deployment-time="11a26ff3b52" schema-major-version="10" schema-minor-version="0" >
                   <enterprise-beans>
                        <session-deployment name="TimerServiceDispatcher" location="TimerServiceDispatcher" local-location="jboss-seam_TimerServiceDispatcherLocal" persistence-filename="TimerServiceDispatcher">
                             <resource-env-ref-mapping name="org.jboss.seam.async.TimerServiceDispatcher/timerService" />
                        </session-deployment>
                        <session-deployment name="EjbSynchronizations" location="EjbSynchronizations" local-location="jboss-seam_EjbSynchronizationsLocal" passivate-count="0" persistence-filename="EjbSynchronizations">
                        </session-deployment>
                   </enterprise-beans>
                   <assembly-descriptor>
                        <default-method-access>
                             <security-role-mapping name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
                        </default-method-access>
                   </assembly-descriptor>
              </orion-ejb-jar>
              



              Back to the drawing board but one issue resolved.

              • 4. Re: No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)
                Jay Balunas Novice

                Maybe this is what you meant by override, but if you create and include you own orion-ejb-jar.xml - configured correctly - does OC4J use it, or does it replace your changes?


                There might be a setting in the orion-application.xml file that can set this option.  The seam-gen example in the ref-guide uses this file to override an OC4J setting.  There may be others.


                • 5. Re: No <Around-invoke> or lifecycle callbacks (OC4J10.1.3.3)
                  Chris Simons Expert

                  Exactly, OC4J is replacing my orion-ejb-jar.xml each time with tags that it does not even support, which could be a bug in 10.1.3.3 (May 2008) or a by-product of me taking a generated ejb-jar file from OC4J11.  Therefore, even when I specify my own orion-ejb-jar, OC4J10 takes it and does what it wants.  One thing I may need to try is to not include an ejb-jar.xml and only include the orion-ejb-jar.xml and see if that prevents OC4J10 from converting ejb-jar into orion-ejb-jar.


                  I will look at the application server level settings and see if there is a way to override how it processes the orion-ejb-jar.


                  Thanks for your input; much appreciated.