Error when One EJB calls anothe EJB

Hi,
I got the following error when I use one EJB call another EJB in OAS 4.0.8.1, the code is developed in JDeveloper 3.0/Win NT 4.0/SP5.
Can anyone give me some ideas? or is there any samples in this case?
Thanks a lot!
Creating an initial context
Looking for the EJB published as 'APP/APPEJB'
Creating a new EJB instance
Calling APPEJB methods...
CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
org.omg.CORBA.BAD_OPERATION:
java.rmi.ServerException: CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
org.omg.CORBA.BAD_OPERATION:
at javax.rmi.oas.corba.CorbaRemoteExceptionHelperValue.OBVObjFrom(Compiled Code)
at TwoEJB._stub_APPEJB.callEJBMapping(Compiled Code)
at TwoEJB.TwoEJBClient.main(Compiled Code)
null

Home handle is an object that identifies an enterprise bean. A client may serialize the handle, and then later deserialize it to obtain a reference to the enterprise bean.
The javax.ejb.HomeHandle is similar to javax.ejb.Handle. Just as the Handle is used to store and retrieve reference to EJB objects, the HomeHandle is used to store and retrieve remote references to EJB homes. HomeHandle can be stored and later used to access an EJB home remote refrence the same way that a Handle can be serialized and later used to access an EJB object's remoe reference.
import java.io.*;
import javax.ejb.EJBHome;
import javax.ejb.HomeHandle;
public class WorkingWithEJBHandles {
public static void main( String[] args ) throws Exception {
EJBHome aHome = null;
// get hold of a home interface
HomeHandle handle = aHome.getHomeHandle();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream( bos );
oos.writeObject( handle );
byte[] handleAsBytes = bos.toByteArray();
// store in the database, on file. howwever you want
FileInputStream fis = new FileInputStream( "fileobj" );
ObjectInputStream ois = new ObjectInputStream( fis );
HomeHandle theHandle = (HomeHandle) ois.readObject();
// get back the EJBHome from the HomeHandle
aHome = theHandle.getEJBHome();
// the same kind of logic also holds for EJBHandles, as well as
// HomeHandles
Transfer Object is a Design pattern. Refer to Core J2EE Design Pattern.
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html
Rgds,
Seetesh

Similar Messages

  • EJB calling another EJB - special considerations

    I am trying to call an EJB from another EJB in the same container. I am able to get hold of the home interface but get an error when I try to narrow and get the Bean.
    The error I get is a class cast exception. Cannot narrow ....
    I read in some place that we need to do soemthing special with the DD's to achieve this. Any answers. I can post more code examples or send you samples.
    Any help will be gr8tly appreciated.
    Vijay

    Hi,
    If ure able to get the Home then you must call the create method on the home to create the Bean and not narrow it again. I think you use narrowing to get the Home and not the bean.
    I hope this helps
    neo

  • How to call one EJB in another EJB?

    How to call one EJB in another EJB? Please explain with some example code.

    To refer a Ejb from another Ejb include <ejb-ref> element in ejb-jar.xml
    <session>
    <ejb-name>EjbA</ejb-name>
    <ejb-ref>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.ejb.EjbBHome</home>
    <remote>com.ejb.EjbB</remote>
    </ejb-ref>
    </session>
    Include a <reference-descriptor> in weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>EjbA</ejb-name>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <jndi-name>com.ejb.EjbBHome</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    In EjbA Bean class refer to EjbB with
    a remote reference to EjbB.
    InitialContext initialContext=new InitialContext();
    EjbBHome EjbBHome=(EjbBHome)
    initialContext.lookup("com.ejb.EjbBHome");
    EjbB ejbB=EjbBHome.findByPrimaryKey(primarykey);

  • Error in calling an EJB from another EJB

    Hello All,
    I have a scenario where i need to call a method of an ejb from another ejb.
    Both the EJB's are in different DC's.
    EG: DC1 using DC2
    I have added the public part of DC2 in DC1.
    The following code is written in DC1 to access the EJB of DC2
          MyRemote l_remote;
           MyHome l_home;
           InitialContext l_ctx = new InitialContext();
    >>       l_home = (MyHome)l_ctx.lookup("JNDI Name");
           l_remote = (MyRemote)l_home.create();
    There is no error at build time and deploy time, but at run time "MyHome" class is not found.
    Even i am not able to access the helper class defined in the DC2 at runtime.
    Please help.
    Thanks in Advance

    First off, wrong forum section.
    Check if your JNDI name is correctly placed for the bean you're calling -- check j2ee-engine.xml for that. Check the EJB container if the ear file you deployed is there and updated.
    Try placing  "localejbs/JNDI name" on your lookup parameter.
    Regards,
    Jan

  • Calling EJB from another EJB

    I need to make a several calls to the methods inside EJB1 from EJB2. I was getting
    the remote reference of the EJB2 inside the ejbCreate() of the EJB1, is it a good
    practice ?? If not, do I need to get remote reference of the EJB2 every time I
    need to call EJB2 method??
    Thanks in advance.

    To refer a Ejb from another Ejb include <ejb-ref> in ejb-jar.xml
    <session>
    <ejb-name>Ejb1</ejb-name>
    <ejb-ref>
    <ejb-ref-name>Ejb2</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.ejb.Ejb2Home</home>
    <remote>com.ejb.Ejb2</remote>
    </ejb-ref>
    <session>
    Include a <reference-discriptor> in weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>EjbSession</ejb-name>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>Ejb2</ejb-ref-name>
    <jndi-name>com.ejb.Ejb2Home</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    In Ejb1 bean class refer to Ejb2 method with a remote reference to Ejb2.
    InitialContext initialContext = new InitialContext();
    Ejb2Home ejb2Home = (Ejb2Home)initialContext.lookup("com.ejb.Ejb2Home");
    Ejb2 ejb2 = ejb2Home.findByPrimaryKey();
    Alex Pratt wrote:
    I need to make a several calls to the methods inside EJB1 from EJB2. I was getting
    the remote reference of the EJB2 inside the ejbCreate() of the EJB1, is it a good
    practice ?? If not, do I need to get remote reference of the EJB2 every time I
    need to call EJB2 method??
    Thanks in advance.

  • How do I reference an EJB inside anothe EJB ,both are on different hosts

    Hi,
    I want to reference an EJB on one host inside another EJB in another
    host. Even if i hardcode the url of the host on which the EJB is
    deployed , it gives me the error regarding the no such ejb found.
    I would appreciate your help.
    Thanks

    Robert,
    We've been trying to implement this type of multi-server setup for some
    time now. Our application consists of 260+ EJBs with a large team of
    developers actively working against it. The business logic in our
    application puts the EJBS in a highly interrelated situation. This
    degree of interrelation makes it necessary for each developer to deploy
    the entire application before any work can get done.
    Starting a weblogic server, on a Windows Workstation, with 260+ beans is
    very time consuming. But to get around this development bottle neck, we
    are attempting the same scenario described in this thread. We have
    recently upgraded from WL4.5.x to WL5.1 SP8. With WL5.1, we get the
    CommunicationException seen previously in this thread. But the Error
    message in WL5.1 is less descriptive. The 5.1 error message is missing:
    WL6.0 Error Text: "This error could indicate that a component was
    deployed on a cluster member but not other members of that cluster. Make
    sure that any component deployed on a server that is part of a cluster
    is also deployed on all other members"
    It is obvious that weblogic's clustering depends on classes being
    available to each server in the cluster, including the ejbc generated
    _WLStub classes.  To me, it seems wrong that a weblogic server can only
    use standard JNDI to lookup HomeInterfaces on other weblogic servers if
    the hidden _WLStub classes are available to both servers.  I say this
    because non-weblogic clients have JNDI lookup abilities without these
    requirements. This whole experience was frustrating because all along
    I knew that the solution was simply to take the hacker route and put the
    classes in the the client classpath. I guess I just want to know if
    this is bug? If not, I think it should be.
    Thanks for listening
    Steve Dodge
    Steve Dodge
    Realeum Inc.
    Robert Patrick wrote:
    Here is an example:
    On server1, I have a Bean called TellerBean that calls the AccountBean
    that lives on server2. To make this work, I need to deploy the
    TellerBean.jar file AND any/all AccountBean Stub classes (any file in the
    deployed version of the AccountBean.jar file matching the pattern
    AccountBean*Stub.class) on server1. Server2 only needs to deploy the
    AccountBean.jar file
    Hope this helps,
    Robert
    kamps wrote:
    Thanks.
    I did include the files using import and they are alsso packaged
    into the jar file .
    I have done this , TradeCheck is the ejb i am trying to reference
    in Trader EJB.
    I package them into the jar file as follows:-
    @REM Compile EJB classes into the build directory (jar preparation)
    javac -d build TradeCheck.java TradeCheckHome.java Trader.java
    TraderHome.java TraderBean.java TradeResult.java
    @REM Make a EJB jar file, including XML deployment descriptors
    cd build
    jar cv0f std_ejb20_basic_statelessSession2.jar META-INF examples
    images
    cd ..
    @REM Run EJBC on jar file
    java -classpath
    %WL_HOME%/lib/weblogic_sp.jar;%WL_HOME%/lib/weblogic.jar weblogic.ejbc
    -compiler javac build\std_ejb20_basic_statelessSession2.jar
    %APPLICATIONS%\ejb20_basic_statelessSession2.jar
    It still gives the same error not finding the stub class.... Could
    you kindly elaborate on what needs to be done.
    I would appreciate your help.
    Thanks,
    Sunitha
    Robert Patrick <[email protected]> wrote:
    The problem is that the client that downloads the stubs
    at runtime cannot
    be another WebLogic Server. We do not support downloading
    classes into a
    running server so you will need to make sure that the
    stubs are
    "available" to the server that is acting as a client (e.g.,
    packaged in
    the EAR file) on the server acting as a client.
    kamps wrote:
    Thanks Mahendra. I am using WebLogic 6.0. Should I importthe package
    in the first ejb which references the 2nd ejb or evenin the client
    which references the first ejb.
    Thanks again,
    Sunitha
    "Mahendra Dhamdhere" <[email protected]> wrote:
    You are not getting the reference of stub.
    try this. In your client program, import the package
    in
    which ejb classes
    are present. As client downloads the stub from weblogic,
    you have to import
    the package where your stubs are present.
    which version of weblogic are you using?
    Mahendra
    kamps <[email protected]> wrote in message
    news:[email protected]...
    Thanks,
    I have 2 ejbs: one is TraderBean and a client RefClient.
    TraderBean in turn calls a method of another bean
    TradeCheckBean.
    I tried making the changes as suggested but I amgetting
    the following
    error on the client side.
    java examples.ejb20.basic.tatelessSession.RefClient"t3://localhost:7001"
    javax.naming.CommunicationException. Root exceptionis
    java.rmi.UnmarshalException:
    failed to unmarshal class java.lang.Object; nested
    exception
    is:
    java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.Trade
    CheckBeanHomeImpl_WLStub: This error could indicatethat a component
    was deployed on
    a cluster member but not other members of that
    cluster.
    Make
    sure that any componen
    t deployed on a server that is part of a cluster
    is
    also deployed
    on all other member
    s of that cluster
    java.lang.ClassNotFoundException:examples.ejb20.basic.statelessSession.TradeCheckBea
    nHomeImpl_WLStub: This error could indicate that
    a
    component was
    deployed on a clus
    ter member but not other members of that cluster.
    Make
    sure that
    any component deploy
    ed on a server that is part of a cluster is also
    deployed
    on all
    other members of tha
    t cluster
    <<no stack trace available>>
    I would appreciate any help.
    Thanks,
    kamps
    "Mahendra Dhamdhere" <[email protected]> wrote:
    you need to get initialcontext of that server.
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    try
    ctx = new InitialContext(ht); // Use
    the
    context
    in your program
    } catch (NamingException e)
    {    // a failure occurred  }
    finally {    try {ctx.close();}
    catch (Exception e)
    {      // a failure occurred    } }
    use url of that other server. After getting initialcontext,
    lookup for your
    ejb.
    Mahendra
    kampu S <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I want to reference an EJB on one host inside
    another
    EJB in another
    host. Even if i hardcode the url of the host on
    which
    the EJB is
    deployed , it gives me the error regarding the
    no
    such
    ejb found.
    I would appreciate your help.
    Thanks

  • How tom invoke an EJB from another EJB using the sun rmi protocl in Weblogi

    Hi,
    I am particularly new to EJB.
    My scenario is
    client invoking-->EJB-----invoking ----(Either a webService or an EJB)
    in WEBLOGIC
    Is it possible that a call from EJB to another EJB or WebService use Sun's RMI as underlying protocol instead of t3 or IIOP which are used in Weblogic ?
    Would be really a great help if you could provide me some sample on it on weblogic.

    Hi Stefan,
    You don't need to provide the InitialContextFactory for running a standalone client. The following should work just fine:
    Context initial = new InitialContext();
    System.out.println("Looking up ...");
    Object objref = initial.lookup(EJB);  //the lookup name should be a global JNDI name      //and not from the java:comp namespace
    System.out.println("Looked up EJB");The JNDI implementation looks for the jndi.properties file in your classpath. So make sure that you have the appserv-rt.jar from your <server_installation>/lib directory in your classpath.
    HTH,
    Sheetal

  • Can an EJB extend another EJB?

    Can an EJB extend another EJB?
    Are there any limitations?
    Thank you in advance, Kostas

    Refer
    http://archives.java.sun.com/cgi-bin/wa?A2=ind0106&L=ejb-interest&F=&S=&P=31185

  • Urgent!! Errors during one EJB calling other EJB in OAS

    Hi, I got the following errors when I try to
    use one Session EJB to call another Session EJB in OAS 4.0.8.1, the EJB is deployed to OAS from JDeveloper 3.0. The code I used to call other EJB is the same as the code in client side:
    public String callAnotherEJB(String strXML)
    throws RemoteException, CreateException {
    String ejbUrl = "oas://scott:8889/Mapping3/Mapping3";
    String result;
    // Setup the environment
    Hashtable environment = new Hashtable();
    // Turn JNDI on to OAS
    environment.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "oracle.oas.naming.jndi.RemoteInitCtxFactory");
    // Lookup the URL
    Mapping3Home homeInterface = null;
    try {
    Context ic = new InitialContext(environment);
    homeInterface = (Mapping3Home)javax.rmi.PortableRemoteObject.narrow(ic.lookup(ejbUrl), Mapping3Home.class);;
    result = remoteInterface.responseEJBCall(strXML);
    return result;
    catch (Exception e) {
    e.printStackTrace();
    return "error during invoking responseEJBCall: "+e.getMessage();
    =====
    The error is as follows:
    Creating an initial context
    CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
    org.omg.CORBA.BAD_OPERATION:
    java.rmi.ServerException: CORBA: org.omg.CORBA.BAD_OPERATION: ; nested exception is:
    org.omg.CORBA.BAD_OPERATION:
    at javax.rmi.oas.corba.CorbaRemoteExceptionHelperValue.OBVObjFrom(Compiled Code)
    at TwoEJB2._stub_APP_T2.callEJBMapping(Compiled Code)
    at TwoEJB2.TwoEJB2Client.main(Compiled Code)
    Can anyone help me?
    Thanks!1
    Scott
    null

    Using arrays instead of vectors, the Oracle WSDL toolkit was able to generate stubs/serializers for all my objects. Thanks for the tip! :)
    For future reference though, is there any way at all for the Oracle WSDL toolkit to auto-generate stubs/serializers for objects wrapped inside a Vector?

  • Calling one EJB form another EJB

    Hi,
    i have 2 EJBs (Session Beans). Inside first EJB in one of its methods, i have to call the second EJB's one method. What are the steps invlovled in this operation?
    Thanks

    It's the same as calling an EJB from a client application. I'm not very good at it, but as much as I know, you need to lookup for the EJB Home object using JNDI and obtain the Remote object from it. Then you can call all the methods on the Remote object.
    If the two EJBs reside in a different container, you would need to obtain a new InitialContext by passing the environment properties of the other container and then lookup as usual.
    The only precaution you need to take is that you need the EJB-client JAR (containing the home and remote interfaces only) for the other EJB available so that ClassNotFoundException and similar exceptions are not thrown.
    I hope I was helpful!
    Regards,
    UW

  • HELP!!! How I can call to EJB from another EJB??

    I have two EJBs, for each EJB I have a jar, how I can call to EJB jar to another???
    I have tried the following, in the first EJB I have import the second EJB jar and call it with context, lookup, PortableRemoteObject etc.. but the instruction lookup not find the second EJB reference.
    The name in the lookup instruction is the JNDI name of the second EJB but not find a reference to it.
    Please help me!!! Thanks!!
    The error is:
    javax.naming.NameNotFoundException: Missing node. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
         at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
         at com.inprise.j2ee.jndi.java.CorbaContext.resolveName(CorbaContext.java:242)
         at com.inprise.j2ee.jndi.java.CorbaContext.lookup(CorbaContext.java:261)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:483)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
         at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:937)
         at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:942)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at ejbclient.EnterpriseClientBean.addition(EnterpriseClientBean.java:115)
         at ejbclient.EnterpriseClientBean.actionPerformed(EnterpriseClientBean.java:97)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
         at avax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstr

    ok.. Here it goes.. I am writing a sample code..
    public class EJB1LogBean implements SessionBean {
    // test is a method of stateless session beam
    public void test ( TestVal val )
    throws RemoteException{
    try {
    EJB2LogHome ejb2Home= (EJB2LogHome)getHome("java:comp/env/ejb/EJB2LogHome",1);
    EJB2Log ejb2Log = ejb2LogHome.create ( val );
    } catch ( CreateException e ) {
         System.out.println("Create Exception occurred ");
         e.printStackTrace();
         } catch ( RemoteException e ) {
         System.out.println( "RemoteException Occured");
    e.printStackTrace();
         throw new RemoteException () ;
         } catch(Exception ee) {
    ee.printStackTrace();
    private EJBHome getHome(String jndiName,int type) {
    try {
    Context context = new InitialContext();
    Object ref = context.lookup( jndiName );
    switch(type)
    case 1:
    EJB2LogHome ejb2LogHome = ( EJB2LogHome )
    PortableRemoteObject.narrow( ref, EJB2LogHome.class );
    return ejb2LogHome;
    } catch ( Exception e ) {
    e.printStackTrace();
    return null;
    }//EJB1LogBean ends
    Here as you can see, EJB1LogBean(session bean) is calling a second EJB, EJB2LogBean (entity bean). TestVal is a sample value object passed. It is plain java class and can vary from app to app and it has got nothing to do with ejbs.
    "java:comp/env/ejb" is a J2EE standard and while getting a home interface, you have to append the home interface class name to "java:comp/env/ejb". Here I am passing "java:comp/env/ejb/EJB2LogHome" and "1" to getHome method, whose job is to get a reference to a home interface. getHome method is a local method. "1" is passed just to give a flexibility to getHome method as you can have more ejbs to invoked. In that case, you can go on adding different case statements for 2, 3 etc.
    The only thing you have to keep in mind is that your deployment descriptor for EJB1LogBean will contain the entires for both the beans i.e. for EJB1LogBean and EJB2LogBean. This is because EJB2LogBean is wrapped by EJB1LogBean.
    Hope this helps.
    Please let me know if you need anything more.
    - Amit

  • How to call an EJB from another EJB

    Hi
    I have a problem here. I need to execute a second EJB which has to get the input from the first EJB as data for execution. So when I call the first EJB, the first EJB should give the data to the second EJB and execute it and provide the result.
    Cheers,
    Raj

    ok.. Here it goes.. I am writing a sample code..
    public class EJB1LogBean implements SessionBean {
    // test is a method of stateless session beam
    public void test ( TestVal val )
    throws RemoteException{
    try {
    EJB2LogHome ejb2Home= (EJB2LogHome)getHome("java:comp/env/ejb/EJB2LogHome",1);
    EJB2Log ejb2Log = ejb2LogHome.create ( val );
    } catch ( CreateException e ) {
         System.out.println("Create Exception occurred ");
         e.printStackTrace();
         } catch ( RemoteException e ) {
         System.out.println( "RemoteException Occured");
    e.printStackTrace();
         throw new RemoteException () ;
         } catch(Exception ee) {
    ee.printStackTrace();
    private EJBHome getHome(String jndiName,int type) {
    try {
    Context context = new InitialContext();
    Object ref = context.lookup( jndiName );
    switch(type)
    case 1:
    EJB2LogHome ejb2LogHome = ( EJB2LogHome )
    PortableRemoteObject.narrow( ref, EJB2LogHome.class );
    return ejb2LogHome;
    } catch ( Exception e ) {
    e.printStackTrace();
    return null;
    }//EJB1LogBean ends
    Here as you can see, EJB1LogBean(session bean) is calling a second EJB, EJB2LogBean (entity bean). TestVal is a sample value object passed. It is plain java class and can vary from app to app and it has got nothing to do with ejbs.
    "java:comp/env/ejb" is a J2EE standard and while getting a home interface, you have to append the home interface class name to "java:comp/env/ejb". Here I am passing "java:comp/env/ejb/EJB2LogHome" and "1" to getHome method, whose job is to get a reference to a home interface. getHome method is a local method. "1" is passed just to give a flexibility to getHome method as you can have more ejbs to invoked. In that case, you can go on adding different case statements for 2, 3 etc.
    The only thing you have to keep in mind is that your deployment descriptor for EJB1LogBean will contain the entires for both the beans i.e. for EJB1LogBean and EJB2LogBean. This is because EJB2LogBean is wrapped by EJB1LogBean.
    Hope this helps.
    Please let me know if you need anything more.
    - Amit

  • Error when Deploying ADF BC as EJB to OC4J Standalone

    Hi,
    I created ADFC BCs and try to deploy them as EJB session beans.
    But I got this erro:
    Processing EJB module: ModelEJB.jar
    application : ModelEJB is in failed state
    Operation failed with error:
         Mising Class : oracle.jbo.server.ejb.StatefulSessionBeanImpl
         Dependent Class : com.technip.server.server.ejb.beanmanaged.ForumAMServer
         Loader : ModelEJB.root:0.0.0
         Code source : /root/Downloads/oc4j10.1.3/j2ee/home/applications/ModelEJB/ModelEJB.jar
         Configuration : <ejb> in /root/Downloads/oc4j10.1.3/j2ee/home/applications/ModelEJB
    I know that it is part of bc4jmtejb.jar but how can I fix it?
    Try to create a SHared OC4J libraries on server side or include the library in the deployment?
    Please advise.
    Thanks
    JO

    Hi,
    I finally succesffuly deployed ADF BC as EJB adding the following libraries to the Deployment profile:
    <library path="C:\JDEV\jdevstudio1013\BC4J\lib\bc4jmtejb.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\bc4jdomorcl.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\jlib\bc4jdatum.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\j2ee\home\lib\ejb.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\adfshare.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\bc4jmt.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\collections.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\bc4jctejb.jar">
         </library>
         <library path="C:\JDEV\jdevstudio1013\BC4J\lib\bc4jct.jar">
         </library>
    Hope it could help other people.
    Thanks
    JO

  • Error when IdentityXML is called

    Hi all!
    I'm working with OAM and trying to call an IdentityXML function to create a new user from outside of product using this API.
    I read de documentation (http://download.oracle.com/docs/cd/B28196_01/idmanage.1014/b25346/toc.htm) and I can't put this to work.
    When I call the function the only answer is a "No Content Length found" error, I try with a client in java, PLSQL, wget and nettool with the same result in all the cases. The same error is loged on Apache Error Log.
    The error is detected even if another function is call or just completely empty the message.
    OAM version 10.1.0.4
    Linux
    Please, I need this working but I can't find a solution, is really urgent.
    Line in Apache Access Log
    =========================
    192.168.3.103 - - [10/Dec/2008:11:25:03 -0600] "POST /identity/oblix/apps/userservcenter/bin/userservcenter.cgi HTTP/1.1" 200 -
    Line in Apache Error Log
    ========================
    [Wed Dec 10 11:25:03 2008] [error] [client 192.168.3.103] [ecid: 1228929900:192.168.1.199:7811:0:1584,0] No Content Length found.: /identity/oblix/apps/userservcenter/bin/userservcenter.cgi
    XML SOAP Msg
    ============
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:oblix="http://www.oblix.com" xmlns:soapenv="http://schemas-xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <oblix:authentication type="basic">
    <oblix:login>oc4jadmin</oblix:login>
    <oblix:password>password</oblix:password>
    </oblix:authentication>
    <oblix:request application="userservcenter" function="workflowSaveCreateProfile" version="NPWSDL1.0">
    <oblix:params>
    <oblix:ObWorkflowName>obworkflowid=wfqs20080919T13275417254,obcontainerId=workflowDefinitions,o=Oblix,dc=biosnettcs,dc=
    com</oblix:ObWorkflowName>
    <oblix:ObDomainName>cn=Users,dc=biosnettcs,dc=com</oblix:ObDomainName>
    <oblix:noOfFields>2</oblix:noOfFields>
    <oblix:AttributeParams>
    <oblix:GenericAttribute>
    <oblix:AttrName>cn</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:AttrNewValue>melli</oblix:AttrNewValue>
    </oblix:GenericAttribute>
    <oblix:GenericAttribute>
    <oblix:AttrName>sn</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:AttrNewValue>melli</oblix:AttrNewValue>
    </oblix:GenericAttribute>
    <oblix:GenericAttribute>
    <oblix:AttrName>uid</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:AttrNewValue>melli</oblix:AttrNewValue>
    </oblix:GenericAttribute>
    <oblix:PasswordAttribute>
    <oblix:AttrName>userPassword</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:AttrNewValue>melli</oblix:AttrNewValue>
    <oblix:AttrConfirmValue>melli</oblix:AttrConfirmValue>
    </oblix:PasswordAttribute>
    <oblix:ChallengeAttribute>
    <oblix:AttrName>genChallengePhrase</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:ChallengeValue>
    <oblix:AttrNewValue>phrase1</oblix:AttrNewValue>
    </oblix:ChallengeValue>
    <oblix:ChallengeValue>
    <oblix:AttrNewValue>phrase2</oblix:AttrNewValue>
    </oblix:ChallengeValue>
    <oblix:ChallengeValue>
    <oblix:AttrNewValue>phrase3</oblix:AttrNewValue>
    </oblix:ChallengeValue>
    </oblix:ChallengeAttribute>
    <oblix:ResponseAttribute>
    <oblix:AttrName>genChallengePhraseResponse</oblix:AttrName>
    <oblix:AttrOperation>ADD</oblix:AttrOperation>
    <oblix:ResponseValue>
    <oblix:AttrNewValue>response1</oblix:AttrNewValue>
    <oblix:AttrConfirmValue>response1</oblix:AttrConfirmValue>
    </oblix:ResponseValue>
    <oblix:ResponseValue>
    <oblix:AttrNewValue>response2</oblix:AttrNewValue>
    <oblix:AttrConfirmValue>response2</oblix:AttrConfirmValue>
    </oblix:ResponseValue>
    <oblix:ResponseValue>
    <oblix:AttrNewValue>response3</oblix:AttrNewValue>
    <oblix:AttrConfirmValue>response3</oblix:AttrConfirmValue>
    </oblix:ResponseValue>
    </oblix:ResponseAttribute>
    </oblix:AttributeParams>
    </oblix:params>
    </oblix:request>
    </soapenv:Body>
    </soapenv:Envelope>

    There is some more data:
    The error is raised with any POST request to webservice endpoint:
    http://host:port/identity/oblix/apps/userservcenter/bin/userservcenter.cgi
    The error is always the same when endpoint is called with a POST (like a webservice!) ... but when is called with GET the User Console Page is returned
    Follow in this post paste a request/response example from HTTP point of view, this was taken from a HTTP Tunnel.
    The api is well used?? I'm using IdentityXML well??
    Thanks for advance.
    Complete HTTP Request Example (see that 2 chars are send in message, there is a empty messge!)
    =======================
    POST /identity/oblix/apps/userservcenter/bin/userservcenter.cgi HTTP/1.1
    Host: localhost:7778
    Content-Length: 2
    Authorization: Basic b3JjbGFkbWluOndlbGNvbWUx
    Cookie: ObSSOCookie=loggedoutcontinue; OBBasicAuth=fromDialog;
    Complete HTTP Response
    ==================
    Content-type: text/html
    <html>
    <body bgcolor="#ffffff">
    <h1>Error!</h1>
    <h3>An error has occurred in the product. Please contact.</h3>
    <h3>Oracle technical support directly or send feedback through.</h3>
    <h3>http://www.oracle.com/support/contact.html</h3>
    <h3>If possible, please include the version number of the software and the error message in your feedback.</h3>
    <h3>Error message: No Content Length found.</h3>
    </body>
    </html>

  • One Class Calling Another Class ......Need Help..ugh

    this is the class that calls another class called cuboid
    package WindowsApplication1;
    * Summary description for Cuboid.
    //Import the classes to allow the use of the array, iterator and listiterator
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.ListIterator;
    public class DisplayCuboidValues
         public static void main(String args[])
              //Create the array list
              ArrayList VolumeList = new ArrayList();
              //Create the counter to loop 4 times and get 4 different volumes. Modify the counter
              //if you need a different values
              int Counter = 1;
              //Initialize the counter to loop 4 times in order to get the 4 objects
              while (Counter < 5)
                   Cuboid mp = new Cuboid(2, 4, 3);
                   //Add the values to the array
                   VolumeList.add(mp);
                   // get the volume again via accessor method(Optional)
                   //int Volume = mp.Volume();
                   //System.out.println(Volume);
                   //Increment the counter to obtain a new value in the array
                   Counter = Counter + 1;
              // Retrieve iterator to the radiuslist
              Iterator itr1 = VolumeList.iterator();
              while (itr1.hasNext())
              // call Cuboid.toString()
              System.out.print(itr1.next());
              System.out.println();
    }this is the cuboid class
    package WindowsApplication1;
    * Summary description for Cuboid.
    public class Cuboid
         private final int length, width, height;
         //1st contructor with 3 arguments
         public Cuboid(int length, int width, int height)
              this.length = length;
              this.width = width;
              this.height = height;
         //2nd constructor with no arguments
    //I BELIEVE THIS PUBLIC CUBOID IS THE ONE THE PROVOKES THE ERROR. BUT I CAN NOT DELETE IT BECAUSE I NEED ANOTHER PUBLIC CUBOID. SO IDK WHAT TO DO......
         public Cuboid()
              this.length = length;
              this.width = width;
              this.height = height;
            public String toString() {
                   return "This cuboid has length x, width y, height z, and has volume of v where X=" + length + " " + "Y=" + width + " " + "Z=" + height + " " + "Volume=" + length * width * height + ".   --   ";
         //Method to calculate the Volume
         public int Volume()
              return length * width * height;
         }This is what i have done. I have created a project named ths(which i do not use it at all). Then, i created one file called DisplayCuboidValues under ths. Then i created the file Cuboid under ths too. But it gives me errors. like this one:
    init:
    deps-jar:
    Created dir: C:\Documents and Settings\Owner\ths\build\classes
    Compiling 1 source file to C:\Documents and Settings\Owner\ths\build\classes
    C:\Documents and Settings\Owner\ths\src\DisplayCuboidValues\Cuboid.java:25: variable length might not have been initialized
    this.length = length;
    *^*
    C:\Documents and Settings\Owner\ths\src\DisplayCuboidValues\Cuboid.java:26: variable width might not have been initialized
    this.width = width;
    *^*
    C:\Documents and Settings\Owner\ths\src\DisplayCuboidValues\Cuboid.java:27: variable height might not have been initialized
    this.height = height;
    *^*
    Note: C:\Documents and Settings\Owner\ths\src\DisplayCuboidValues\DisplayCuboidValues.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    *3 errors*
    BUILD FAILED (total time: 0 seconds)
    Any help you can give me will be appreciated. Thanks.

    yeah. you are right in that. so that means that i have to get rid of it??. because i will need it. and the values assigned to them is in the first class that calls the second class look:
    package WindowsApplication1;
    * Summary description for Cuboid.
    //Import the classes to allow the use of the array, iterator and listiterator
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.ListIterator;
    public class DisplayCuboidValues
         public static void main(String args[])
              //Create the array list
              ArrayList VolumeList = new ArrayList();
              //Create the counter to loop 4 times and get 4 different volumes. Modify the counter
              //if you need a different values
              int Counter = 1;
              //Initialize the counter to loop 4 times in order to get the 4 objects
              while (Counter < 5)
    *//HERE IS WHERE I AM PROVIDING THE OTHER CLASS WITH VALUES. THEREFORE IT SHOULD SENT THOSE VALUES TO MY CLASS CUBOID AND RETRIEVE THE ANSWER TO FOLLOW THE REST OF THIS CODE.*
                   Cuboid mp = new Cuboid(2, 4, 3);
                   //Add the values to the array
                   VolumeList.add(mp);
                   // get the volume again via accessor method(Optional)
                   //int Volume = mp.Volume();
                   //System.out.println(Volume);
                   //Increment the counter to obtain a new value in the array
                   Counter = Counter + 1;
              // Retrieve iterator to the radiuslist
              Iterator itr1 = VolumeList.iterator();
              while (itr1.hasNext())
              // call Cuboid.toString()
              System.out.print(itr1.next());
              System.out.println();
    }

Maybe you are looking for

  • RTF and Greek characters

    Hello I am trying to build a swing application witch displays RTF documents in Greeks from a database. I have try to use jTextPane but the Greeks characters does not displays correct. I have try to paste a document from a word with the same results.

  • Would teaching abroad with only an iPad 2 be an okay idea or do I need a computer?

    I am moving to student teach abroad in 2 months. My 15" MacBook Pro recently died and I am debating on whether to take just my 16gb iPad 2 with me. Would the iPad have enough processing power to handle all lesson plans, pictures, ect. or do I need to

  • Expdp error

    处理对象类型 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS ORA-39125: 在 KUPW$WORKER.UNLOAD_METADATA 中 Worker 发生意外的致命错误 (在调用 DBMS_METADATA.FETCH_XML_CLOB [TABLE_STATISTICS] 时) ORA-22813: 操作数值超出系统的限制 ORA-06512: 在 "SYS.DBMS_SYS_ERROR", line 105 ORA-06512: 在

  • Does Acrobat X Standard let you add web links to PDFs?

    I can't find anywhere on Adobe's website that says whether you can add a hyperlink in X Standard or only in X Pro. If someone knows the answer, that would be very helpful. Thanks!

  • Automatic Workflow Customizing

    HI! I am doing configurations in BI-system for the purpose to create connection between BI-system and SAP source system. According to documentation I must "Perform automatic workflow customizing". May I omit this? Thanks, Olga