EJB binding w/ JNDI prefix

Hello,
How about if I want to create a subcontext*before*any ejb binding?
for example, I want to bind a ejb with directory prefix like "ejb/MyBean",
how can I achieve that?
I notice that (from the doc)*all* startup action(s) are done after others.
Isn't that mean I cannot use a startup class to create the subcontext "ejb"?
In this case is there any place I can specify in the weblogic.properties
to create a subcontext to hold all my EJB?
Thanks in advance.
regards,
parngon

I have deployed EJBs using JNDI names of "/ejb/<beanshome>" and the
sub-context "ejb" gets created automatically. I'm running WLS 5.1 SP6.
"Andy Winskill" <[email protected]> wrote in message
news:[email protected]..
>
[email protected] wrote:
Alexander Petrushko <[email protected]> wrote:
You can specify the name to which the bean will be bound in JNDI by
using the
jndi-name element inside weblogic-enterprise-bean inweblogic-ejb-jar.xml. If
jndi-name is "ejb.MyBean or "ejb/MyBean" the bean will be bound as"MyBean" in
the "ejb" context.
Cheers,
AlexThat works! Many thanks.
At first I don't know that one can bind a name like "a.b.c" and use JNDI
to look up "a/b/c"...
I have tried using "ejb/MyBean" in the weblogic-ejb-jar.xml, but it fails
if I don't create the "ejb/" sub context first.Using the a.b.c notation the sub context's should be automatically createdon deployment. However, I've seen
the / notation fail to create the sub context's as you say. I've not triedthis on SP6 yet.
>
Cheers,
Andy

Similar Messages

  • Example of binding an object(just a java class not an EJB) to a JNDI name

    Hi,
    I would appreciate your help if you could give me some pointers regarding where
    to find any examples which uses objects ( a java class not an EJB) to a JNDI name.
    I could get an example to work using String but it doesnt work with a java class
    object.
    Thanks a lot,
    Sunitha

    Try making the java object serializable.
    - Naresh
    "sunitha" <[email protected]> wrote:
    >
    Hi,
    I would appreciate your help if you could give me some pointers regarding
    where
    to find any examples which uses objects ( a java class not an EJB) to
    a JNDI name.
    I could get an example to work using String but it doesnt work with a
    java class
    object.
    Thanks a lot,
    Sunitha

  • EJB called via JNDI in a Repository Service :: ClassCastException

    Hi SDN,
    I've got a problem in calling an EJB from a Repository Service...
    Here the steps I've follow:
      -  An EJB has been created with some Business Methods in it; it has been packaged in an EAR and deployed;
      -  This EJB is looked up succesfully via JNDI in a WDJ application and also in an Abstract Portal Component; I use the following guides:
    [Accessing EJB Apps using JNDI|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0736159e-0301-0010- 9ea4-c63d83d0797b?QuickLink=index&overridelayout=true]
    [Referencing an EJB in an Abstract Portal Component|http://wiki.sdn.sap.com/wiki/display/HOME/ConnectingEJBUsing ExternalJars]
      -  A Repository Service has been created and registered on "CREATE_CHILD_TEMPLATE" ResourceEvent; I can see from logs that this service works correctly;
       -  I've copied in the PAR lib and private/lib folders two jars (ejb20.jar and the JAR created building the EJB) and they are added to the build path;
      -  If I try to look up the EJB via JNDI in the received service method, I get a ClassCastException...
    Here some code:
    try {
         //I use System.err to see log in the Default Trace
         System.err.println("Initialize EJB");
         //TestJNDIHome class seems to be visible at runtime, following instruction does not throw any exception
         System.err.println("ToString TestJNDIHome: " + TestJNDIHome.class.toString());
         //EJB and PAR are on the same J2EE engine, so no InitialContext parameters, I'm right?
         InitialContext context = new InitialContext();
         Object jndiobj = context.lookup("altevie.com/testear/TestJNDIBean");
         System.err.println("Classe oggetto recuperato da lookup: " + jndiobj.getClass());
         TestJNDIHome home = (TestJNDIHome) javax.rmi.PortableRemoteObject.narrow(jndiobj, TestJNDIHome.class);
         testJNDI = home.create();
    } catch (NamingException ex) {
         System.err.println("NamingException :: " + ex.getLocalizedMessage());
    } catch (RemoteException ex) {
         System.err.println("RemoteException :: " + ex.getLocalizedMessage());
    } catch (CreateException ex) {
         System.err.println("CreateException :: " + ex.getLocalizedMessage());          
    Here the portalapp.xml (in the same PAR there are two objects, the Repository Service and an Abstract Portal Component, but I've got the same problem also removing the Abstract Portal Component...):
    <application>
      <application-config>
        <property name="com.sap.engine.interfaces.cross.ObjectReferenceImpl" value="SAPJ2EE::altevie.com/testEAR"/>
        <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal"/>
        <property name="PrivateSharingReference" value="SAPJ2EE::altevie.com/testEAR"/>
      </application-config>
      <components>
        <component name="TestJSP">
          <component-config>
            <property name="ClassName" value="com.comer.eps.epcomp.TestJSP"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.sap.netweaver.rf.wrapper.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    javax.rmi.PortableRemoteObject.narrow method call throws a ClassCastException...
    From the previous println I can see the lookup method returns a com.sap.engine.interfaces.cross.ObjectReferenceImpl object, I do not know if it is correct...
    I've tried to lookup the Local (localejbs/altevie.com/testear/TestJNDIBean) and Remote (altevie.com/testear/TestJNDIBean) JNDI Bean name, but I get the same error...
    I'm sure the JNDI name is correct (it works with WDJ and Abstract Portal Component... I've also tested via LOOKUP command using telnet to connect to J2EE AS and I've checked JNDI Registry and EJB Container services in Visual Admin)...
    Here the stack trace of the error:
    java.lang.ClassCastException: com.comer.eps.ejb.AccessiEJBHome
         at com.sap.engine.services.cross.PortableRemoteObjectContainer.narrow(PortableRemoteObjectContainer.java:179)
         at com.sap.engine.system.PortableRemoteObjectProxy.narrow(PortableRemoteObjectProxy.java:24)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at com.comer.eps.repsrv.onsave.RipubblicaByDE.initializeEJB(RipubblicaByDE.java:145)
    Can you help me? Why JNDI lookup works in an Abstract Portal Application and doesn't in a Repository Service (same code...)?
    Thank you so much and best regards,
    Manuel
    Text Formatted: Manuel Xiccato on Sep 27, 2011 12:29 PM

    Hi SDN,
    I've got a problem in calling an EJB from a Repository Service...
    Here the steps I've follow:
      -  An EJB has been created with some Business Methods in it; it has been packaged in an EAR and deployed;
      -  This EJB is looked up succesfully via JNDI in a WDJ application and also in an Abstract Portal Component; I use the following guides:
    [Accessing EJB Apps using JNDI|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0736159e-0301-0010- 9ea4-c63d83d0797b?QuickLink=index&overridelayout=true]
    [Referencing an EJB in an Abstract Portal Component|http://wiki.sdn.sap.com/wiki/display/HOME/ConnectingEJBUsing ExternalJars]
      -  A Repository Service has been created and registered on "CREATE_CHILD_TEMPLATE" ResourceEvent; I can see from logs that this service works correctly;
       -  I've copied in the PAR lib and private/lib folders two jars (ejb20.jar and the JAR created building the EJB) and they are added to the build path;
      -  If I try to look up the EJB via JNDI in the received service method, I get a ClassCastException...
    Here some code:
    try {
         //I use System.err to see log in the Default Trace
         System.err.println("Initialize EJB");
         //TestJNDIHome class seems to be visible at runtime, following instruction does not throw any exception
         System.err.println("ToString TestJNDIHome: " + TestJNDIHome.class.toString());
         //EJB and PAR are on the same J2EE engine, so no InitialContext parameters, I'm right?
         InitialContext context = new InitialContext();
         Object jndiobj = context.lookup("altevie.com/testear/TestJNDIBean");
         System.err.println("Classe oggetto recuperato da lookup: " + jndiobj.getClass());
         TestJNDIHome home = (TestJNDIHome) javax.rmi.PortableRemoteObject.narrow(jndiobj, TestJNDIHome.class);
         testJNDI = home.create();
    } catch (NamingException ex) {
         System.err.println("NamingException :: " + ex.getLocalizedMessage());
    } catch (RemoteException ex) {
         System.err.println("RemoteException :: " + ex.getLocalizedMessage());
    } catch (CreateException ex) {
         System.err.println("CreateException :: " + ex.getLocalizedMessage());          
    Here the portalapp.xml (in the same PAR there are two objects, the Repository Service and an Abstract Portal Component, but I've got the same problem also removing the Abstract Portal Component...):
    <application>
      <application-config>
        <property name="com.sap.engine.interfaces.cross.ObjectReferenceImpl" value="SAPJ2EE::altevie.com/testEAR"/>
        <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal"/>
        <property name="PrivateSharingReference" value="SAPJ2EE::altevie.com/testEAR"/>
      </application-config>
      <components>
        <component name="TestJSP">
          <component-config>
            <property name="ClassName" value="com.comer.eps.epcomp.TestJSP"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.sap.netweaver.rf.wrapper.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    javax.rmi.PortableRemoteObject.narrow method call throws a ClassCastException...
    From the previous println I can see the lookup method returns a com.sap.engine.interfaces.cross.ObjectReferenceImpl object, I do not know if it is correct...
    I've tried to lookup the Local (localejbs/altevie.com/testear/TestJNDIBean) and Remote (altevie.com/testear/TestJNDIBean) JNDI Bean name, but I get the same error...
    I'm sure the JNDI name is correct (it works with WDJ and Abstract Portal Component... I've also tested via LOOKUP command using telnet to connect to J2EE AS and I've checked JNDI Registry and EJB Container services in Visual Admin)...
    Here the stack trace of the error:
    java.lang.ClassCastException: com.comer.eps.ejb.AccessiEJBHome
         at com.sap.engine.services.cross.PortableRemoteObjectContainer.narrow(PortableRemoteObjectContainer.java:179)
         at com.sap.engine.system.PortableRemoteObjectProxy.narrow(PortableRemoteObjectProxy.java:24)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at com.comer.eps.repsrv.onsave.RipubblicaByDE.initializeEJB(RipubblicaByDE.java:145)
    Can you help me? Why JNDI lookup works in an Abstract Portal Application and doesn't in a Repository Service (same code...)?
    Thank you so much and best regards,
    Manuel
    Text Formatted: Manuel Xiccato on Sep 27, 2011 12:29 PM

  • EJB lookup via JNDI results in java.lang.NoClassDefFoundError

    Hello,
    I have created and deployed an EJB to the WebAS (ver 6.40).  There is no problem looking up the bean via JNDI and calling its methods from a J2EE application - I successfully did this via a servlet.
    However, a JNDI lookup from a Web Dynpro application - on the same server - results in a java.lang.NoClassDefFoundError error.
    The code for the JNDI lookup is identical in either case.
    Any thoughts?

    Hello,
    I am calling ejb from .jsp use following code
    Properties props = new Properties();
    InitialContext ctx = new InitialContext();
    Object ob = ctx.lookup("java:comp/env/ejb/CalculatorBean");
    CalculatorHome home = (CalculatorHome) PortableRemoteObject.narrow(ob, CalculatorHome.class);
    calc = home.create();
    I have a error:
    java.lang.ClassNotFoundException: class com.sap.examples.calculator.beans.CalcProxy : com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at calculator, the whole lookup name is java:comp/env/ejb/CalculatorBean
    My ejb-jar.xml is:
    <display-name>
         CalculatorEjb</display-name>
         <enterprise-beans>
              <session>
                   <icon/>
                   <ejb-name>Calculator</ejb-name>
                   <home>com.sap.examples.calculator.CalculatorHome</home>
                   <remote>com.sap.examples.calculator.CalculatorRemote</remote>
                   <local-home>com.sap.examples.calculator.CalculatorLocalHome</local-home>
                   <local>com.sap.examples.calculator.CalculatorLocal</local>
                   <service-endpoint>com.sap.examples.calculator.CalculatorServiceEndpoint</service-endpoint>
                   <ejb-class>com.sap.examples.calculator.CalculatorBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <ejb-ref-type>Session</ejb-ref-type>
                        <home>com.sap.examples.calculator.CalculatorHome</home>
                        <remote>com.sap.examples.calculator.CalculatorRemote</remote>
                        <ejb-link>Calculator</ejb-link>
                   </ejb-ref>
                   <ejb-local-ref>
                        <description/>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <ejb-ref-type>Session</ejb-ref-type>
                        <local-home>com.sap.examples.calculator.CalculatorLocalHome</local-home>
                        <local>com.sap.examples.calculator.CalculatorLocal</local>
                        <ejb-link>Calculator</ejb-link>
                   </ejb-local-ref>
              </session>
         </enterprise-beans>
    my ejb-j2ee-engine.xml is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-j2ee-engine
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ejb-j2ee-engine.xsd">
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>Calculator</ejb-name>
                   <ejb-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <jndi-name>ejb/CalculatorBean</jndi-name>
                   </ejb-ref>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <jndi-name>ejb/CalculatorBean</jndi-name>
                   </ejb-local-ref>
              </enterprise-bean>
         </enterprise-beans>
    </ejb-j2ee-engine>

  • Ejb-ref and JNDI lookup problem

    Hi,
    I use WLS6.1sp2. I created one EntityBean and SessionBean jar files. I tried to
    use session bean to refer entity bean, I failed. The details are as following:
    In EntityBean's weblogic-ejb-jar.xml, I set:
    <jndi-name>cabin.CabinHome</jndi-name>
    In sessionbean's ejb-jar.xml
    <ejb-ref>
    <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.titan.cabin.CabinHome</home>
    <remote>com.titan.cabin.Cabin</remote>
    </ejb-ref>
    In sessionbean's weblogic-ejb-jar.xml
    <reference-descriptor>
         <ejb-reference-description>
              <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
              <jndi-name>ejb/CabinHome</jndi-name>
         </ejb-reference-description>
    </reference-descriptor>
    At sessionbean's client, I use
    javax.naming.Context jndiContext = getInitialContext();
    Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome");
    When I run client file, I get the following error message:
    - with nested exception:
    [javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException:
    Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
    'CabinHome']; Link Remaining Name: 'ejb/CabinHome']>
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
    'CabinHome'
         <<no stack trace available>>
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException:
    Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
    'CabinHome']; Link Remaining Name: 'ejb/CabinHome']
         at com.titan.travelagent.TravelAgentBean.listCabins(TravelAgentBean.java:45)
         at com.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl.listCabins(TravelAgentBean_a4c3ph_EOImpl.java:37)
         at com.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl_WLSkel.invoke(Unknown
    Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<Feb 1, 2002 11:32:40 PM PST> <Info> <Management> <dj> <travelServer> <ExecuteThread:
    '14' for queue: 'default'> <system> <> <140009> <Configuration changes for domain
    saved to the repository.>
    Do you know what's wrong? how to fix this problem?
    Thanks in advance.
    DJ

    Slava,
    I took "cabin." out from weblogic-ejb-jar.xml, I got the same error.
    DJ
    "Slava Imeshev" <[email protected]> wrote:
    Hi DJ,
    I think you don't need "cabin." in weblogic-ejb-jar.xml :
    <jndi-name>cabin.CabinHome</jndi-name>
    Regards,
    Slava Imeshev
    "DJ" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I use WLS6.1sp2. I created one EntityBean and SessionBean jar files.I
    tried to
    use session bean to refer entity bean, I failed. The details are asfollowing:
    In EntityBean's weblogic-ejb-jar.xml, I set:
    <jndi-name>cabin.CabinHome</jndi-name>
    In sessionbean's ejb-jar.xml
    <ejb-ref>
    <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.titan.cabin.CabinHome</home>
    <remote>com.titan.cabin.Cabin</remote>
    </ejb-ref>
    In sessionbean's weblogic-ejb-jar.xml
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
    <jndi-name>ejb/CabinHome</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    At sessionbean's client, I use
    javax.naming.Context jndiContext = getInitialContext();
    Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome");
    When I run client file, I get the following error message:
    - with nested exception:
    [javax.naming.LinkException:  [Root exception is
    javax.naming.NameNotFoundException:>> Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining>name>> 'CabinHome'; Link Remaining Name: 'ejb/CabinHome']>
    javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException:
    Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remainingname
    'CabinHome'
    <<no stack trace available>>
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [javax.naming.LinkException:  [Root exception is
    javax.naming.NameNotFoundException:>> Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining>name>> 'CabinHome'; Link Remaining Name: 'ejb/CabinHome']
    atcom.titan.travelagent.TravelAgentBean.listCabins(TravelAgentBean.java:45)
    atcom.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl.listCabins(TravelAgentBe
    an_a4c3ph_EOImpl.java:37)
    atcom.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    atweblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :93)
    atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
    2)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<Feb 1, 2002 11:32:40 PM PST> <Info> <Management> <dj> <travelServer><ExecuteThread:
    '14' for queue: 'default'> <system> <> <140009> <Configuration changesfor
    domain
    saved to the repository.>
    Do you know what's wrong? how to fix this problem?
    Thanks in advance.
    DJ

  • WSIF EJB Binding Error

    Hi,
    I create a very simple WSIF EJB binding, when running the BPEL process from the BPEL Console, I always got the "org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'java.lang.String' is not compatible" error.
    ========================================
    Here is the WSDL for the EJB:
    ========================================
    <definitions name="DisconnectWebService"
    targetNamespace="http://ord.itech.oracle.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ord.itech.oracle.com/"
    xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/">
    <message name="TransMessage">
    <part name="a" type="xsd:string" />
    </message>
    <portType name="DisconnectWebService">
    <operation name="startTrans">
    <input name="startTransRequest" message="tns:TransMessage"/>
    </operation>
    </portType>
    <binding name="DisconnectWebServiceWSIF" type="tns:DisconnectWebService">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
    <format:typeMap typeName="xsd:int" formatType="int"/>
    </format:typeMapping>
    <operation name="startTrans">
    <ejb:operation
    methodName="startTrans"
    parameterOrder="a"
    interface="remote"/>
    <input name="startTransRequest"/>
    </operation>
    </binding>
    <service name="DisconnectWebService">
    <port name="DisconnectWebServiceWSIFPort"
    binding="tns:DisconnectWebServiceWSIF">
    <ejb:address className="com.oracle.itech.model.TestSessionEJBHome"
    jndiName="TestSessionEJB"
    initialContextFactory="com.evermind.server.rmi.RMIInitialContextFactory"
    jndiProviderURL="ormi://localhost/app"/>
    </port>
    </service>
    </definitions>
    ========================================
    Here is the error:
    ========================================
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    parts: {{summary=com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@10e6817 : Could not invoke 'startTrans'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'java.lang.String' is not compatible, detail=org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'java.lang.String' is not compatible}}

    Did you manage to find a solution to this? Im having the exact same problem...
    Did you get anywhere? A point in the right direction would be great...
    Thanks in advance...
    Ian

  • How could JNDI differentiate two ejb have same jndi name but on difference

    how could JNDI differentiate two ejb have same jndi name but on difference server
    suppose that:
    we have two J2EE Server those are Server1 and server2, and both of them have a ejb named Test deployed on it, and I need a java client maybe it is a java Application, servlet or ejb in server1 to get the reference to the ejb name Test, how to use JNDI to get the reference to both of them. those two ejb have same name but on difference server. how could the java client locate them?

    You've hit problem #1 in the alleged scalability of EJB containers.
    Basically, the whole setup assumes that you're only dealing with one naming service. The expectation is that a given name is bound to a single object, which in this case is the Home interface.
    Some systems support clustering, which can allow you to get round this, but the details will depend on you EJB container vendor,
    Sylvia.

  • Error Deploying Application - ejb-link or jndi-name

    I get the following error when depoying my J2EE application. Can anyone help ?
    Deployment failed on Server MServer1
    weblogic.management.DeploymentException:
    Exception:weblogic.management.ApplicationException: activate failed for Supplier
         Module: Supplier     Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception:
    [weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name]
    weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:473)
         at weblogic.servlet.internal.CompEnv.init(CompEnv.java:123)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:5616)
         at weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletContext.java:5588)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:841)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3127)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2081)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2062)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    --------------- nested within: ------------------
    weblogic.management.DeploymentException: Could not setup environment - with nested exception:
    [weblogic.deployment.EnvironmentException: ejb-ref ejb/ReceiverSes requires an ejb-link or jndi-name]
         at weblogic.servlet.internal.CompEnv.init(CompEnv.java:133)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:5616)
         at weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletContext.java:5588)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:841)
         at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3127)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2081)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2062)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    I found the issue. The below entries were missing from weblogic.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/PipelineExecutor</ejb-ref-name>
    <jndi-name>${APPNAME}.BEA_personalization.PipelineExecutor</jndi-name>
    </ejb-reference-description>
    "rohit" <[email protected]> wrote:
    >
    Does anyone knows why we would get the below error. I verified the web.xml
    and
    it seems to be right. Any help appreciated. Rohit
    <Jul 1, 2003 5:08:12 PM PDT> <Error> <Deployer> <149231> <The slave deployer
    was
    unable to set the activation state to true for the application portalApp
    weblogic.management.ApplicationException: activate failed forceoportal
    Module Name: ceoportal, Error: weblogic.j2ee.DeploymentException: Could
    not setu
    p environment - with nested exception:
    [weblogic.deployment.EnvironmentException: ejb-ref ejb/PipelineExecutor
    requires
    an ejb-link or jndi-name]
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
    ner.java:1093)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
    ner.java:1022)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForA
    llApplications(SlaveDeployer.java:617)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.j
    ava:376)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
    e(DeploymentManagerServerLifeCycleImpl.java:235)
    at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:
    65)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
    at weblogic.Server.main(Server.java:32)

  • When the ejb been bind into jndi

    Hi,
    I am using wls7.0sp1, i can see the ejbs are deployed on the server start up,
    but when the client tried to call it, the server split out exception:
    2002-11-14 11:32:10,890 ERROR [ExecuteThread: '11' for queue: 'default'] (JNDI.java:180)
    - javax.naming.NameNotFoundException: Unable to resolve 'ims.ej
    b.MyBeanHome'. Does the wls bind the ejb when it is deployed or there is extra
    step i need to configure.
    thanks

    How can list the subcontext? with the command I can see the first part "ims".
    Kumar Allamraju <[email protected]> wrote:
    >
    java weblogic.Admin -url {admin or managed server url} -username system
    -password weblogic LIST
    The above command will LIST the entries from WLS jndi tree. You may
    want to run the above command against admin & managed servers and see
    if it lists your EJB or not.
    Kumar
    Jen wrote:
    The log file shows ejb deployed. here i attched the log file. The onlything i
    can see the abnormal from the log file is the first line (actuallyis on console
    only), what that means?
    And line:
    "####<Nov 14, 2002 1:58:41 PM PST> <Info> <Cluster> <jen0> <myserver1><main>
    <kernel identity> <> <000101> <Cannot resolve ClusterAddress: :7003,:7005>".
    I have an admin server and two clustered managed server on one box.The question
    is I use nostage for both admin and managed server, the ejbs are under\applications
    directory, this might be a problem. Where the applications should gofor each
    managed server, or i only can use satge mode foe managed server?
    Thanks
    Rob Woollen <[email protected]> wrote:
    My guess is the deployment failed. Check the server logs. Were there
    any errors during deployment?
    You might also try the EJB examples. Are these working for you?
    -- Rob
    Jen wrote:
    Hi,
    I am using wls7.0sp1, i can see the ejbs are deployed on the serverstart up,
    but when the client tried to call it, the server split out exception:
    2002-11-14 11:32:10,890 ERROR [ExecuteThread: '11' for queue: 'default'](JNDI.java:180)
    - javax.naming.NameNotFoundException: Unable to resolve 'ims.ej
    b.MyBeanHome'. Does the wls bind the ejb when it is deployed or thereis extra
    step i need to configure.
    thanks------------------------------------------------------------------------
    <Nov 14, 2002 1:58:15 PM PST> <Warning> <Management> <141087> <Unrecognized
    property: system.name>
    ####<Nov 14, 2002 1:58:15 PM PST> <Info> <Logging> <jen0> <myserver1><main> <kernel identity> <> <000000> <FileLogger Opened at C:\op\.\myserver1\myserver1.log>
    ####<Nov 14, 2002 1:58:17 PM PST> <Info> <socket> <jen0> <myserver1><main> <kernel identity> <> <000406> <NTSocketMuxer was built on Jun
    24 2002 17:35:19
    ####<Nov 14, 2002 1:58:17 PM PST> <Info> <socket> <jen0> <myserver1><main> <kernel identity> <> <000408> <Allocating 2 NT reader threads>
    ####<Nov 14, 2002 1:58:31 PM PST> <Info> <Security> <jen0> <myserver1><main> <kernel identity> <> <090142> <The weblogic keystore provider
    DefaultKeyStore in realm myrealm cannot be used for trusted (root) CAs
    because its trusted (root) CA keystore was not configured.>
    ####<Nov 14, 2002 1:58:31 PM PST> <Notice> <Security> <jen0> <myserver1><main> <kernel identity> <> <090082> <Security initializing using realm
    myrealm.>
    ####<Nov 14, 2002 1:58:31 PM PST> <Notice> <WebLogicServer> <jen0><myserver1> <main> <kernel identity> <> <000328> <Starting WebLogic
    Managed Server "myserver1" for domain "op">
    ####<Nov 14, 2002 1:58:31 PM PST> <Info> <WebLogicServer> <jen0> <myserver1><main> <kernel identity> <> <000214> <WebLogic Server "myserver1" version:
    WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
    WebLogic XMLX Module 7.0 SP1 Mon Sep 9 22:54:41 PDT 2002 206753
    (c) 1995, 1996, 1997, 1998 WebLogic, Inc.
    (c) 1999, 2000, 2001 BEA Systems, Inc.>
    ####<Nov 14, 2002 1:58:31 PM PST> <Info> <WebLogicServer> <jen0> <myserver1><main> <kernel identity> <> <000215> <Loaded License : C:\bea\license.bea>
    ####<Nov 14, 2002 1:58:31 PM PST> <Info> <RJVM> <jen0> <myserver1><main> <kernel identity> <> <000520> <Network Configuration
    Cluster Participant: true
    Cluster Name: mycluster
    Cluster Multicast Address: 237.0.0.1
    Cluster Multicast Port: 7777
    Cluster Multicast Interface: not configured
    Cluster Multicast TTL (max hops): 1
    Cluster Multicast Send Delay: 12 ms
    Cluster Multicast Buffer Size: 65536
    Native Socket IO Enabled: true
    Reverse DNS Allowed: false
    Network Channel: Default
    Listen Address: not configured
    Listen Port: 7003
    SSL Listen Port: 7004
    External DNS Name: not configured
    Cluster Address: :7003,:7005
    Protocol(s): T3,T3S,HTTP,HTTPS,IIOP,IIOPS
    Tunneling Enabled: false
    Outgoing Enabled: true
    Admin Traffic Only: false
    Admin Traffic OK: true
    Channel Weight: 50
    Accept Backlog: 50
    Login Timeout: 5000 ms
    Login Timeout SSL: 25000 ms
    Message Timeout HTTP: 60000 ms
    Message Timeout T3: 60000 ms
    Message Timeout IIOP: 60000 ms
    Idle Timeout IIOP: 60000 ms
    Max Message Size HTTP: 10000000
    Max Message Size T3: 10000000
    Max Message Size IIOP: 10000000
    ####<Nov 14, 2002 1:58:35 PM PST> <Info> <IIOP> <jen0> <myserver1><main> <kernel identity> <> <002014> <IIOP subsystem enabled.>
    ####<Nov 14, 2002 1:58:41 PM PST> <Info> <Cluster> <jen0> <myserver1><main> <kernel identity> <> <000101> <Cannot resolve ClusterAddress:
    :7003,:7005>
    ####<Nov 14, 2002 1:58:42 PM PST> <Info> <XML> <jen0> <myserver1> <main><kernel identity> <> <130036> <Initializing XMLRegistry.>
    ####<Nov 14, 2002 1:58:44 PM PST> <Info> <JDBC> <jen0> <myserver1><main> <kernel identity> <> <001007> <INITIALIZING DONE issued.>
    ####<Nov 14, 2002 1:58:44 PM PST> <Info> <Connector> <jen0> <myserver1><main> <kernel identity> <> <190000> <Initializing J2EE Connector Service>
    ####<Nov 14, 2002 1:58:44 PM PST> <Info> <Connector> <jen0> <myserver1><main> <kernel identity> <> <190001> <J2EE Connector Service initialized
    successfully>
    ####<Nov 14, 2002 1:58:46 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040090> <Deployed 4 default connection factories.>
    ####<Nov 14, 2002 1:58:46 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040305> <JMS service is initialized and in the
    standby mode.>
    ####<Nov 14, 2002 1:58:46 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101128> <Initializing HTTP services.>
    ####<Nov 14, 2002 1:58:46 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101133> <Initializing WEB server myserver1>
    ####<Nov 14, 2002 1:58:47 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101052> <[HTTP myserver1] Initialized>
    ####<Nov 14, 2002 1:58:47 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101135> <myserver1 is the default web server>
    ####<Nov 14, 2002 1:58:47 PM PST> <Info> <J2EE> <jen0> <myserver1><main> <kernel identity> <> <160037> <J2EE service initializing>
    ####<Nov 14, 2002 1:58:50 PM PST> <Info> <Deployer> <jen0> <myserver1><main> <kernel identity> <> <149207> <The Deployment Slave is initializing>
    ####<Nov 14, 2002 1:58:51 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101201> <uddi:uddi loading descriptor>
    ####<Nov 14, 2002 1:58:52 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101059> <[HTTP] Loading uddi from WAR file:
    .\myserver1\.internal\uddi.war>
    ####<Nov 14, 2002 1:58:53 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101202> <uddi:uddi preparing>
    ####<Nov 14, 2002 1:58:55 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101201> <wl_management_internal1:wl_management_internal1
    loading descriptor>
    ####<Nov 14, 2002 1:58:55 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101059> <[HTTP] Loading wl_management_internal1
    from WAR file: .\myserver1\.internal\wl_management_internal1.war>
    ####<Nov 14, 2002 1:58:55 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101202> <wl_management_internal1:wl_management_internal1
    preparing>
    ####<Nov 14, 2002 1:58:56 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101201> <uddiexplorer:uddiexplorer loading
    descriptor>
    ####<Nov 14, 2002 1:58:56 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101059> <[HTTP] Loading uddiexplorer from
    WAR file: .\myserver1\.internal\uddiexplorer.war>
    ####<Nov 14, 2002 1:58:56 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101202> <uddiexplorer:uddiexplorer preparing>
    ####<Nov 14, 2002 1:58:59 PM PST> <Info> <EJB> <jen0> <myserver1> <main><kernel identity> <> <010008> <EJB Deploying file: Case.jar>
    ####<Nov 14, 2002 1:58:59 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Case cannot be
    redeployed while the server is running. com.ims.ejb.CaseBean is located
    in the server's classpath.>
    ####<Nov 14, 2002 1:58:59 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Caser cannot be
    redeployed while the server is running. com.ims.ejb.CaseBean is located
    in the server's classpath.>
    ####<Nov 14, 2002 1:58:59 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Case cannot be
    redeployed while the server is running. com.ims.ejb.CaseBean is located
    in the server's classpath.>
    ####<Nov 14, 2002 1:59:00 PM PST> <Info> <EJB> <jen0> <myserver1> <main><kernel identity> <> <010008> <EJB Deploying file: Submit.jar>
    ####<Nov 14, 2002 1:59:00 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Submit cannot
    be redeployed while the server is running. com.ims.ejb.SubmitBean is
    located in the server's classpath.>
    ####<Nov 14, 2002 1:59:00 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Submit cannot
    be redeployed while the server is running. com.ims.ejb.SubmitBean is
    located in the server's classpath.>
    ####<Nov 14, 2002 1:59:00 PM PST> <Warning> <EJB> <jen0> <myserver1><main> <kernel identity> <> <010001> <EJB Deployment: Submit cannot
    be redeployed while the server is running. com.ims.ejb.SubmitBean is
    located in the server's classpath.>
    ####<Nov 14, 2002 1:59:07 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101201> <myapp:myapp loading descriptor>
    ####<Nov 14, 2002 1:59:07 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101060> <[HTTP] Loading "HTTP" from directory:
    "C:\op\.\applications\myapp">
    ####<Nov 14, 2002 1:59:08 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101202> <myapp:myapp preparing>
    ####<Nov 14, 2002 1:59:14 PM PST> <Info> <DRS> <jen0> <myserver1> <main><kernel identity> <> <002504> <Slave for DataIdentifier DataIdentifierID:
    1 registered with DRS with version 0>
    ####<Nov 14, 2002 1:59:16 PM PST> <Info> <Deployer> <jen0> <myserver1><main> <kernel identity> <> <149215> <The Slave Deployer did not receive
    an initial update after 2,000 milliseconds.>
    ####<Nov 14, 2002 1:59:16 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101206> <uddi:uddi activating>
    ####<Nov 14, 2002 1:59:17 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101209> <uddi:uddi ready>
    ####<Nov 14, 2002 1:59:17 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101208> <uddi:uddi starting>
    ####<Nov 14, 2002 1:59:17 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101206> <wl_management_internal1:wl_management_internal1
    activating>
    ####<Nov 14, 2002 1:59:17 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101209> <wl_management_internal1:wl_management_internal1
    ready>
    ####<Nov 14, 2002 1:59:18 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101208> <wl_management_internal1:wl_management_internal1
    starting>
    ####<Nov 14, 2002 1:59:18 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101206> <uddiexplorer:uddiexplorer activating>
    ####<Nov 14, 2002 1:59:18 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101209> <uddiexplorer:uddiexplorer ready>
    ####<Nov 14, 2002 1:59:18 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101208> <uddiexplorer:uddiexplorer starting>
    ####<Nov 14, 2002 1:59:18 PM PST> <Info> <Deployer> <jen0> <myserver1><main> <kernel identity> <> <149208> <The Deployment Slave is initialized>
    ####<Nov 14, 2002 1:59:18 PM PST> <Notice> <Cluster> <jen0> <myserver1><main> <kernel identity> <> <000138> <Listening for announcements from
    cluster mycluster on 237.0.0.1:7777>
    ####<Nov 14, 2002 1:59:18 PM PST> <Notice> <Cluster> <jen0> <myserver1><main> <kernel identity> <> <000133> <Waiting to synchronize with other
    running members of mycluster>
    ####<Nov 14, 2002 1:59:48 PM PST> <Notice> <Cluster> <jen0> <myserver1><main> <kernel identity> <> <000134> <Discovered and synchronized with
    0 other running members of mycluster>
    ####<Nov 14, 2002 1:59:49 PM PST> <Info> <JTA> <jen0> <myserver1> <main><kernel identity> <> <110441> <Opening transaction log with driver version
    "j1.0" and synchronous write policy "Cache-Flush". For information on
    synchronous write policies, refer to the weblogic.management.configuration.ServerMBean
    javadoc or console on-line help.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JDBC> <jen0> <myserver1><main> <kernel identity> <> <001007> <RESUMING ... issued.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JDBC> <jen0> <myserver1><main> <kernel identity> <> <001007> <RESUMING DONE issued.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040108> <User connection factory "MessageDrivenBeanConnectionFactory"
    is started.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040108> <User connection factory "QueueConnectionFactory"
    is started.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040108> <User connection factory "TopicConnectionFactory"
    is started.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040108> <User connection factory "DefaultConnectionFactory"
    is started.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <JMS> <jen0> <myserver1> <main><kernel identity> <> <040306> <JMS service is active now.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101129> <Initializing Web services.>
    ####<Nov 14, 2002 1:59:50 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101238> <HTTP log rotation is size based
    for the webserver: myserver1>
    ####<Nov 14, 2002 1:59:51 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101051> <[HTTP myserver1] started>
    ####<Nov 14, 2002 1:59:51 PM PST> <Info> <Deployer> <jen0> <myserver1><main> <kernel identity> <> <149209> <The Deployment Slave is resuming>
    ####<Nov 14, 2002 1:59:51 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101133> <Initializing WEB server myserver1>
    ####<Nov 14, 2002 1:59:51 PM PST> <Info> <EJB> <jen0> <myserver1> <main><kernel identity> <> <010009> <EJB Deployed EJB with JNDI name ims.ejb.CaseHome..>
    ####<Nov 14, 2002 1:59:52 PM PST> <Info> <EJB> <jen0> <myserver1> <main><kernel identity> <> <010009> <EJB Deployed EJB with JNDI name ims.ejb.SubmitHome.>
    ####<Nov 14, 2002 1:59:58 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101206> <myapp:myapp activating>
    ####<Nov 14, 2002 1:59:59 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101209> <myapp:myapp ready>
    ####<Nov 14, 2002 1:59:59 PM PST> <Info> <HTTP> <jen0> <myserver1><main> <kernel identity> <> <101208> <myapp:myapp starting>
    ####<Nov 14, 2002 2:00:02 PM PST> <Info> <Deployer> <jen0> <myserver1><main> <kernel identity> <> <149210> <The Deployment Slave is resumed>
    >

  • EJB 3.0 @Stateless @EJB @Resource and JNDI clarity..

    Hi,
    I am trying to configure an EJB 3.0 but not able to do so properly.
    I have a single business interface and 2 bean implementation class of the same business interface doing different things. How do I access the EJB's if I have the same business interface class.I am getting JNDI error while trying to lookup.
    Also what does the "name" and "mappedName" in @Stateless(name ="...",mappedName="") signify.
    Then in case of Dependency injection,how should I look for the EJB? What would be it's JNDI name in this case?
    @EJB(name="",beanName="",mappedName="")
    private HelloEJB hello;
    What does the name,benaName and mappedName in case of an @EJB annotation signify??
    Please clear me with these attributes of @Stateless and @EJB and @Resource. I am getting toatlly confused with what should be the logic name and what is the JNDI name????
    Thanks

    In @Stateless, @name() is the annotation equivalent of <ejb-name> in ejb-jar.xml. It gives a unique bean name identifier to the component within the ejb-jar. It is completely independent of mappedName. If no @Stateless name() is specified, it defaults to the unqualified bean class name.
    In @Stateless, mappedName() is used to assign a global JNDI name to the bean's remote interface. This can be used to explicitly lookup the EJB reference to that interface or as one way to resolve a caller's EJB dependency.
    In @EJB, if the target of the dependency lives within the same application, you can always fully resolve it using only beanName(). beanName() takes the value specified in @Stateless name(), or the default as described above.
    @EJB name() assigns a name to the client dependency within the caller's component environment. It is optional. In most cases that value doesn't matter since if the dependency is being injected you never have to refer to the name() attribute anywhere else.
    @EJB mappedName() is used to resolve an EJB dependency that spans applications. It holds a global JNDI name, e.g. the one specified in @Stateless mappedName(). mappedName() is not required to be supported by all vendors.
    So, to sum it all up, it's fine to have two different beans that expose the same interface. E.g. :
    @Stateless(name="A1", mappedName="A1Global")
    public class A1 implements A { ... }
    @Stateless(mappedName="A2Global") // name() defaults to "A2"
    public class A2 implements A { ... }
    In a caller within the same application :
    @EJB(beanName="A1")
    private A a;
    @EJB(beanName="A2")
    private A a;
    In a caller within a different application :
    @EJB(mappedName="A1Global")
    private A a;
    @EJB(mappedName="A2Global")
    private A a;
    You can find additional information in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#EJB_ejb-ref_ejb_local_ref

  • EJB 3.0 JNDI lookup results in Classcast Exception

    Hello everybody,
    I�m experiencing a strange problem when I want to retrieve a stateless session bean from a POJO in my enterprise app. I am using EJB 3.0, running on Glassfish build 33 and JDK 1.5.
    I have successfully deployed my ear file which has the EJB.jar and the war file in it. I�m using JSF 1.2 in the web app and I am able to use all session beans using the injection annotation in my managed beans (this is how it is supposed to be according to the spec.). However, I now need to acces a stateless session bean from a POJO (non-managed or backing bean) which resides also in the war file. I�m using the following code to retrieve the session bean:
    (where IMySessionBean = remote interface and MySessionBean is the implementation)
    try {
    ic = new InitialContext();
    MySessionBean mybean = (MySessionBean )ic.lookup("env/IMySessionBean");
    When casting the object from the lookup into MySessionBean I get a classcast Exception. However, I can see the session bean using the JNDI browser that comes with Glassfish and it�s deployed and available. If mybean is of type Object, I see that the lookup method returns a wrapper of my session bean.
    Here�s what the stacktrace says:
    java.lang.ClassCastException: com.myproject.ejb.interfaces._IMySessionBean_Wrapper
         at ...
    Do I miss something here and there�s more required to obtain a reference to the session bean? I�m pretty much stuck here and any help is greastly appreciated!
    Thanks in advance!
    Cheers,
    Joerg

    Hi Joerg,
    In the session bean client view, the bean implementation class is never used. The client
    only interacts with the local or remote interface.
    Regarding the lookup, the more portable approach is to
    lookup the ejb reference through the component environment of the web application
    rather than doing a direct global lookup. If you have already defined any ejb reference
    injections somewhere in the web app, you can look up the same dependencies via
    java:comp/env. For example, if your managed bean has the following @EJB annotation :
    @EJB(name="mybeanref") IMySessionBean beanRef;
    You can look up the same underlying dependency in your utility class :
    IMySessionBean beanRef = (IMySessionBean) new InitialContext().lookup
    ("java:comp/env/mybeanref");
    Note that the portion of the lookup string after java:comp/env/ comes from the name() attribute
    of @EJB. @EJB name() has the same semantics as the ejb-ref-name in the deployment
    descriptor. You can find more info on these topics in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • EJB 3.0 JNDI lookup gives ClassCastException

    The object returned by the JNDI lookup of a EJB 3.0 Statefull Session Bean is not of the expected type, but rather of an obviously generated Proxy type (ejb_DistributionProcessor_LocalProxy_4h350 instead of expected DistributionProcessor). Does anybody have any idea about what this could be?
    Details:
    We are using annotations @Statefull and @Local and are deploying on a standalone OC4J 10.1.3.1. The beans are presumably loaded correctly since they get listed in Enterprise Managers list of beans for the application. There is also obviously an object at the desired JNDI location, presumably some kind of proxy. Unfortunately the proxy cannot be cast to the original type making the retrieved object useless.
    I can supply more details if necessary, but really don't know what more is relevant.

    Well, I figured it out, it seems I had the classes in both the EJB and the WEB deployment, so when casting it tried to cast X from EJB to X from WEB application and since they reside in different locations they weren't the same file and therefore not castable.

  • Error when trying to bind without "cn=" prefix

    I am trying to bind a java object, via jndi, into an LDAP server and
    am getting an error.
    We have already bound jms.topics using IBM's JMSAdmin tool (a java
    tool), and they are in with names like "bucks" and "dela". Now, we
    want to put objects in from another tool instead of using the IBM
    tool.
    I am able to get the objects in, but I am forced to use "cn=myObject"
    instead of "myObject". For programic reasons, the later is what I
    need to do.
    Here is the code:
    // create the ctx
    InitialDirContext ctx = new InitialDirContext(env);
    // create the topic object with topic name of myTopic
    Topic q = new com.ibm.mq.jms.MQTopic("myTopic");
    // bind the object to the LDAP with the name == the topic name
    ctx.bind(new CompositeName("myTopic"),q);
    This results in
    javax.naming.directory.SchemaViolationException: [LDAP: error code 65
    - Object Class Violation]; remaining name 'myTopic'
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:903)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:657)
    at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:1428)
    at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:459)
    at com.sun.jndi.toolkit.ComponentContext.p_bind(ComponentContext.java:594)
    at com.sun.jndi.toolkit.PartialCompositeContext.bind(PartialCompositeContext.java:185)
    at javax.naming.InitialContext.bind(InitialContext.java:366)
    at JNDITool.main(JNDITool.java:74)
    But, if I use
    ctx.bind(new CompositeName("cn=myTopic"),q);
    it works fine, but appears as "cn=myTopic" in the naming directory.
    In order to be backward compatible with another application, I need to
    have the name be merely "myTopic".
    Anybody know what IBM's JMSAdmin tool is doing differenctly to achieve
    this?
    TIA,
    Gonzo

    So the answer is you need to create some attributes to use when binding:
    // create the attributes for the binding.
    BasicAttributes basicattributes = new BasicAttributes();
    basicattributes.put("objectclass", "javaContainer");
    basicattributes.put("cn", topicName);
    // do the binding
    ((DirContext)ctx).bind(topicName, newTopic, basicattributes);
    Gonzo

  • Global Catalog binding thru JNDI

    Hi,
    Has anyone tried binding to the Global Catalog thru JNDI, if Yes can you send some pointers on how to achieve it.
    TIA,
    Raj.

    hi im searching some hints for this theme too. perhaps we could share some information ..
    tia
    indy
    [email protected]

  • Ejb-ref, ejb-link or JNDI lookup

    If I have an application in which one EJB is using another EJB in the SAME application,
    what is the best of way of accessing the other EJB?
    Why would I use ejb-ref / ejb-link instead of just looking it up in the JNDI?
    Just curious.
    Thanks.
    Dan

    ejb-ref/ejb-link were introduced in the ejb spec to allow bean developers to
    develop beans without any knowledge of the environment into which they would
    be deployed. If you can live with hard coded jndi names then that is fine or
    you can use the mechanism define below but using ejb-ref/ejb-link makes your
    beans more reuseable and less dependent on the final environement.
    If both the ejbs are in the same application I would recommend using ejb-ref
    and ejb-link.
    -- Anand
    "Chad McDaniel" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Baumbach" <[email protected]> writes:
    If I have an application in which one EJB is using another EJB in the
    SAME application,
    what is the best of way of accessing the other EJB?
    Why would I use ejb-ref / ejb-link instead of just looking it up in theJNDI?
    >>
    >
    I believe that ejb-ref/link is not useful in most systems and causes
    another level of complexity to maintain. Since EJBs are complex enough
    I think that using the basic JNDI lookup is preferable. Also, this
    frees you to move the beans to a remote server if you ever want to.
    The simplest and most flexible technique, I believe, is to use a
    utility class that handles all EJB lookups for you and use a simple
    EJB and JNDI name mapping that this class can generate the JNDI name
    with a simply manipulation of the bean name. If you ever change the
    reference technique you will then only have one class to modify.
    This is also a good place to cache home references.

Maybe you are looking for

  • IPad for Drawing or Storyboarding. Possible?

    I have seen this amazing device and its come into my mind that this could be very helpful for designer, specially if any software for story boarding will be great. I am waiting for the best model to come into market (64GB + WiFi etc... ). I am thinki

  • 1st gen Ipod touch update?

    Hi Folks, My son has given me his old Ipod touch 1st Gen.  I have updated this to IOS 3.1 but need IOS 4 and above to run some (most) of the Apps available.  Can this be done and can you point me to a link if available please? Thanks.

  • Reading two files at a time

    Hi, My sender system sends two files 1.Header 2.Item I need to read both the files at a time. If only both the files are present in the directory,i want pick the files otherwise not. How can i do this validation in XI?? Thanks. Rushikesh

  • Condition type error

    Hi friends, I have a scenario where i put the condition type for packing charges in the sales order as manual condition,But when i do an invoice that condition type does not appear . 1)Do we have to put that condition type of the packing charges manu

  • Issue regarding RG23A Part -II

    hi Expert, i am getting problem in updation of RG23A Part -II, while doing MIGO Part - I register is getting updated but CENVAT credit document is not generating and also it is not updating Part - II. My scenerio is like that BED - 16%