4 Replies Latest reply on May 21, 2013 6:16 AM by Piyush Jain

    Problem in jndi-pattern of components.xml which is referring to EJB module of another EAR.

    Piyush Jain Newbie

      We are migrating from our application from Jboss 4, RF 3.3, JSF 1.2, Seam 2.2 to Jboss as 7.1, RF 4, JSF2, Seam 2.3.

       

      Structure of EARs

       

      A.ear

           -common-ejb.jar ( in the root path so that can be used by other ears as module)

       

      B.ear

           webapp.war\WEB-INF\components.xml

       

       

      B.jar - It has dependency of common-ejb.jar as module. please find the same below from:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure>

          <deployment>

              <dependencies>

                  <!-- dependency on a inner module of another deployment, export to sub-deployments -->

                  <module name="deployment.A.ear.common-ejb.jar" export="true"/>  

                  <module name="org.jdom" export="true" />

                  <module name="javax.faces.api" slot="main" export="true"/>

                  <module name="com.sun.jsf-impl" slot="main" export="true"/>

                  <module name="org.dom4j" export="true" />

              </dependencies>

          </deployment>

         

          <sub-deployment name="webapp.war">

          </sub-deployment>   

      </jboss-deployment-structure>

       

      Issue: I am unable to access beans of common-ejb from B.ear\webapp.war\WEB-INF\components.xml.

       

      please find contents (related to problem) of B.ear\webapp.war\WEB-INF\components.xml below:

       

      <core:init debug="false" jndi-pattern="java:global/A/common-ejb/#{ejbName}" /> <!-- This has been changed according to JNDI in Jboss as 7. Also in logs confirmed that EJBs in common-ejb starts in java:global/A/common-ejb/#{ejbName}, java:app/common-ejb/#{ejbName}  pattern. -->

      <security:identity authenticate-method="#{ORAuthenticator.login}" />

       

      When on authentication we call this method ORAuthenticator.login but gets below exception:

       

      06:19:16,346 INFO  [org.jboss.as.ejb3] (http--10.3.2.11-24745-3) JBAS014101: Failed to find SFSB instance with session ID {[87, -105, 47, 45, 88, -62, 79, -3, -93, 124, 39, -61, -85, -106, 39, -15]} in cache

      06:19:24,210 WARN  [org.jboss.seam.security.jaas.SeamLoginModule] (http--10.3.2.11-24745-3) Error invoking login method: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'ORAuthenticator' resolved to null

              at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38) [jboss-el-1.0_02.CR2.jar:1.0_02.CR2]

              at org.jboss.el.parser.AstValue.invoke(AstValue.java:95) [jboss-el-1.0_02.CR2.jar:1.0_02.CR2]

              at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el-1.0_02.CR2.jar:1.0_02.CR2]

              at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:222) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

              at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]

              at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]

              at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_09]

              at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_09]

              at javax.security.auth.login.LoginContext$5.run(LoginContext.java:721) [rt.jar:1.7.0_09]

       

       

      Kindly please help and let me know if require more information.