RMI Exception between EJB calls

Hi folks,
After adding some methods to an existing EJB, we are getting RMI exception,
as follows:
at
weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
at
omega.fidens.ventas.WFVentaSessionBeanEOImpl_WLStub.recuperarPersona(WFVenta
SessionBeanEOImpl_WLStub.java:3328)
Our architecture is the following
1. A Statefull EJB, is calling a stateless EJB. The first one is
WFVentaSessionBean, the second , VentaSessionBean.
2. The same WF is calling another EJB, stateless also, and everything is ok.
Any hint?
Regards
Ivan

Looking at: [no sapjcorfc in java.library.path]
it seems like the environment that has the class with the method m does not have the platform dependent part of the JCO setup.
Try to create a standalone program on the same server that just uses JCO and see if it works first.
Cheers,
Kalle

Similar Messages

  • 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

  • Cast Exception from EJB returning Collection

    Still can't understand why I'm getting a cast exception when I call an object method when the object has been returned in a Collection from an EJB.
    The object CountryModel is a serialised object, returned in a Collection from home.findAllCountries.....
    I understood RMI returns the object in serialised form, why does called the CountryModel object method getCountryName() cause a ClassCast method? This object casting works ok for a non-rmi application.
    Collection boris = home.findAllCountries();
          Iterator i = boris.iterator();
          System.out.println( boris.size());              //gets right results
          while( i.hasNext()) {
            Object obj = i.next();
            CountryModel leModel = (CountryModel)obj;
            System.out.println(leModel.getCountryName());  //causes ClassCastException
          }Any help appreciated. Thanks, lebo

    Still can't understand why I'm getting a cast
    exception when I call an object method when the object
    has been returned in a Collection from an EJB.
    The object CountryModel is a serialised object,
    returned in a Collection from
    home.findAllCountries.....
    I understood RMI returns the object in serialised
    form, why does called the CountryModel object method
    getCountryName() cause a ClassCast method? This
    object casting works ok for a non-rmi application.
    Collection boris = home.findAllCountries();
    Iterator i = boris.iterator();
    System.out.println( boris.size());
    e());              //gets right results
    while( i.hasNext()) {
    Object obj = i.next();
    CountryModel leModel = (CountryModel)obj;
    System.out.println(leModel.getCountryName());
    ame());  //causes ClassCastException
    }Any help appreciated. Thanks, lebo
    Cast exceptions mostly occur when the same class is being loaded by two classloaders, and thus a conflict. I believe that the statement
    CountryModel leModel = (CountryModel)obj;
    is throwing the exception and not the method call.
    Kindly try to check that out.
    Moreover instead of using the iterator use the toArray method and then try to access the elements. This would give an indication as what is going wrong.
    Kindly do the above and update the topic.
    Regards
    Rohit Parik
    [email protected]

  • EJB call from one domain to another, authentication problem

    Two Weblogic servers. WLS A and WLS B. Different domains. Trust relationship between the domains can't be established.
    I have an EJB in WLS B and there is a Web Application deployed to WLS A. There are method-permission declarations in the EJB descriptor xml.
    Step 1. User authenticates to Servlet in Web Application (WLS A). Authentication is done with Http Basic Authentication.
    Step 2. Servlet makes a JNDI lookup to get a handle to the EJB. Handle can not be fetched with the authentication information which was provided by user to servlet. This means that I need to specify a different username and password, which should be used for authentication at WLS B.
    Step 3. After getting a handle to the EJB Servlet calls a method of the EJB.
    Everything seems extremely simple. And it should be. But no.
    At step 2 servlet propagates authentication information from WLS A to WLS B. This authentication information is valid only inside WLS A, not in WLS B. Result: SecurityException: Invalid Subject.
    Setting SECURITY_PRINCIPAL and SECURITY_CREDENTIALS to InitialContext while creating it still results in propagation of authentication information. Same exception.
    So I tried something else.
    Tthe code doing the JNDI lookups and EJB calls was wrapped inside Security.runAs(new Subject(), ....) -block. Authentication information is no longer propagated to WLS B. So JNDI lookup succeeds, excellent!
    But we only got one step further. Now we still need to make the call to EJB method at step 3.
    Now that EJB method call results in Security Violation: User: <anonymous> has insufficient permission to access my method.
    It's a bit strange, because username and password (for WLS B) were provided for InitialContext while creating it. If the password is invalid, the InitialContext can't be created. So it seems that atleast the username and password ARE checked at WLS B.
    Any help and/or suggestions would be highly appreciated.
    Here is a misc list of some misc wondering:
    -Step 2. Should we make the JNDI lookup to JNDI tree of WLS A instead of WLS B. If we do so, then we should use ejb-ref's at web.xml. This was also quickly tested with no results.
    -Would run-as-identity (or some similar element) help? Maybe we could set up some Credential Mapper to WLS A, which would provide username/password when making calls to EJB's of WLS B. Documentation about Credential Mappers seems to be quite useless.

    There was a time, and it was quite some time ago when something similar was tried and it didn't meet with much success. Sure, it may not have been Domain files, it may have been something more like, say, rocks, but the general principle still applies. If you look at the XML and media parts that make up a Domain file, you can think of those pieces as analogous to the atoms in your average run-of-the-mill rock. Though the atoms in two given average run-of-the-mill rocks may seem quite similar, and cracking them open reveals innards that are almost entirely, but not quite, the same, it's still quite difficult to make one whole rock out of the two.
    Now, some say alchemists might be able to accomplish this quite daunting task, but, until a study of use for Domain files (perhaps XMLchemy?) is initiated and studied most earnestly, we shall probably remain unable to bring about the union of one Domain file and another. Or were we talking about the rocks? (You can't melt Domain files, can you? The thought just hit me is all...)
    How's that for a long answer?

  • 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

  • RMI failed between 2 Linux macines (Red Hat 9)

    follwing exception is occurs when trying to communicate RMI between Linux.
    Communication failure while contacting agent platform: An RMI exception occurred [nested Connection refused to host: 127.0.0.1; nested exception is:
            java.net.ConnectException: Connection refused]

    Perhaps yoc can try this:
    when you run the rmiregistry use this command:
    rmiregistry -J-Djava.security.policy=xxx.policy
    xxx.policy is your policy file to use when the client try to connect to the server. Both the client and the server program must apply to this policy. When you start your server program type this command:
    java -Djava.security.policy=xxx.policy rmiServerClass
    and then start the client with the same command, just replace the rmiServerClass with your client class. the xxx.policy files must exist in both your server and client directory(you can invoke the rmiregistry command from anywhere).

  • "Multicast" support for EJB-EJB calls to cluster

    What I have to work with:
    + WebLogic Server 5.1 cluster
    + Stateless session EJBs
    What I want to do:
    + Be able to know list of available servers in the cluster
    and use this list to broadcast same information to all EJBs
    with same name in cluster
    + I understand that the cluster-aware EJB stub has this list
    when a client gets a home reference to the EJB Object
    + I have not seen any specific WebLogic API to get this list
    either by accessing the cluster-aware JNDI table or the
    cluster-aware EJB stub.
    + Othwerwise, I would then need to implement my own server
    list manager to get this list. Such task should not be that difficult.
    Why I want to do the above:
    + I would like to implement a EJB sendAll() method that will
    send the same request to all EJBs of the same JNDI name in the cluster.
    + Please correct me if I am wrong but I have not seen anywhere
    in the WebLogic 5.1 documentation regarding the automatic multicast
    ability of broadcasting EJBs calls via EJB-to-EJB communication to a
    cluster.
    + I understand that multicasting is only used internally, ie,
    heartbeats.
    Plus, I believe that RMI does not support multicasting.

    I'd like to hear a bit more about what you are trying to do. (at a
    higher level)
    RMI / EJB is a point-to-point model. A client is making an RMI call to
    a server. Granted, in our clustering solution, there may not be one
    physical server, but the idea is to give the appearance of one big,
    reliable server.
    -- Rob
    Ren Bitonio wrote:
    >
    What I have to work with:
    + WebLogic Server 5.1 cluster
    + Stateless session EJBs
    What I want to do:
    + Be able to know list of available servers in the cluster
    and use this list to broadcast same information to all EJBs
    with same name in cluster
    + I understand that the cluster-aware EJB stub has this list
    when a client gets a home reference to the EJB Object
    + I have not seen any specific WebLogic API to get this list
    either by accessing the cluster-aware JNDI table or the
    cluster-aware EJB stub.
    + Othwerwise, I would then need to implement my own server
    list manager to get this list. Such task should not be that difficult.
    Why I want to do the above:
    + I would like to implement a EJB sendAll() method that will
    send the same request to all EJBs of the same JNDI name in the cluster.
    + Please correct me if I am wrong but I have not seen anywhere
    in the WebLogic 5.1 documentation regarding the automatic multicast
    ability of broadcasting EJBs calls via EJB-to-EJB communication to a
    cluster.
    + I understand that multicasting is only used internally, ie,
    heartbeats.
    Plus, I believe that RMI does not support multicasting.--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • Simplest way to restrict access to remote EJB calls

    I'm using weblogic 10.3 and I'm new to security in weblogic. I was looking at the documentation at http://docs.oracle.com/cd/E13222_01/wls/docs103/ConsoleHelp/taskhelp/security/ManageSecurityForDD.html
    but got a little overwhelmed by the many options on how to implement security. Plus, I am getting confused between JDNI security and EJB Layer security (they're not the same thing, right?)
    Can someone explain what the simplest way would be to prevent an "unauthorized" client to make remote EJB calls? For example, I know of the ConnectionFilters that you can implement, which can prevent remote callers from making T3 or IIOP calls if they're not from an authorized IP, etc. This is a good start but ideally I would want to password protect the EJBs, and any EJB client would have to provide this username/password somehow. Or possibly use two-way SSL for t3? The client app would have to provide a certificate to prove that it's trusted.
    To be clear, I don't think I need weblogic to handle any fine-grained access control. I just want to make sure that the client (e.g., a webapp) is a trusted one. Once the EJB container is satisfied that the client is trusted (preferably by user/pass) then the client is free to execute any EJB methods.
    Thanks in advance.
    Edited by: user10123426 on Mar 14, 2012 10:26 AM

    I'm don't think you can do a posture check by MAC address.  If you're using SSLVPN, and you're running Windows,  you can do a Host Scan check for the following registry key:
    HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Domain
    Then set up a Pre-Login policy that goes Windows->Registry Check->Success->RegCheckOK
                                                                                                         |->Fail->RegCheckFail
    At this point you've just verified that you can read that key and the value is stored for later use.  You're not making an allow/deny decision yet. 
    Then in your Dynamic Access policy you do a Policy check for Location=RegCheckFail, that says "Unable to read registry".  The following DAP policy check looks for Location=RegCheckOK, and validates that the value is your AD domain. 
    Alternatively, you could put a NAC box (ISE or Clean Access) 'behind/after' the VPN box, so although anyone can connect only domain machines (and/or whatever other posture checks you want to make, e.g. Antivirus status) make it through to the rest of the network.

  • How to map sync EJB call to async JMS req/resp pair

    Folks,
    Basically, we have the situation our session bean synchronous
    transactions map to asynchronous JMS transactions.
    In other words, a session bean method call would have the
    following implementation logic:
    1. marshall params and send async JMS message.
    2. wait around for a reply message to be ready
    3. receive a reply JMS message, unmarshall response.
    4. return.
    The problem, clearly, is that we can't do step 2 in the EJB method itself for fear
    of tying up threads.
    This seems like a classic problem of mapping synchronous EJB calls to asynchronous
    backends.
    Any suggestions how to do this?
    Thanks,
    Jabir

    I don't know if there are any great solutions, short of making everything
    async
    (even to the EJB client) which should be considered if possible. E.g., EJB
    sends
    JMS message and immediately returns. Then an MDB gets the JMS response,
    and calls back the client. If you can't modify the client, maybe you can
    write a
    "proxy" service between the client and the EJB layer.
    Otherwise you'll need to bump the number of threads, knowing that a certain
    amount of them will be sleeping.
    regards,
    -Ade
    "Jabir" <[email protected]> wrote in message
    news:3d2d14aa$[email protected]..
    >
    Folks,
    Basically, we have the situation our session bean synchronous
    transactions map to asynchronous JMS transactions.
    In other words, a session bean method call would have the
    following implementation logic:
    1. marshall params and send async JMS message.
    2. wait around for a reply message to be ready
    3. receive a reply JMS message, unmarshall response.
    4. return.
    The problem, clearly, is that we can't do step 2 in the EJB method itselffor fear
    of tying up threads.
    This seems like a classic problem of mapping synchronous EJB calls toasynchronous
    backends.
    Any suggestions how to do this?
    Thanks,
    Jabir

  • RMI Exception in OraBPEL~OC4J_BPEL~default_island~1 log file

    Hi,
    I am facing following rmi exception in my OraBPEL~OC4J_BPEL~default_island~1 log file:
    09/04/09 19:16:50 java.lang.NullPointerException
    09/04/09 19:16:50      at com.evermind.server.rmi.RMIServer.run(RMIServer.java:464)
    09/04/09 19:16:50      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    This exception is restricting me to call BPEL Service from java.
    I ckecked all rmi configuration but dont find exact place where the wrong configuration is.
    Your help is really appreciated,
    Rupesh.
    Edited by: user10994198 on Apr 9, 2009 7:04 AM

    Hi Rupesh,
    Please follow this link : http://orasoa.blogspot.com/2007/06/calling-bpelesb-webservice-from.html, and see this configuration will help you overcome NPE.
    Hope this helps!
    Cheers
    Anirudh Pucha

  • ADF 11, USING EJB, CALL STORE PROCEDURE, A PROBLEAM?

    ADF 11, USING EJB, CALL STORE PROCEDURE, A PROBLEAM?
    I have a store procedure:
    CREATE OR REPLACE PACKAGE BODY PK_HR1
    IS
    FUNCTION FUNC04
    RETURN CUR_RESULT
    IS
    X_CUR CUR_RESULT;
    BEGIN
    OPEN X_CUR FOR
    select mako, tenko, diachiko from kho;
    RETURN X_CUR;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END FUNC04;
    END PK_HR1;
    In the entities class, I have a NamedStoredProcedureQuery:
    @Entity
    @NamedStoredProcedureQuery(name="Kho.FUNC04",
              resultClass=Kho.class,
              procedureName="PK_HR1.FUNC04" )
    public class Kho implements Serializable {
    In session bean, i have a method
    public class SessionEJBBean implements SessionEJB, SessionEJBLocal
    public void test() throws Exception{
    try {
    //code here ...
    List<Kho> listKho = em.createNamedQuery("Kho.FUNC04").getResultList();
    System.out.println("aaaa");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    I try running, but always show errror
    this errors:
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00221: 'FUNC04' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call: BEGIN PK_HR1.FUNC04(); END;
    Query: ReadAllQuery(jp.co.mfr.sgs.bean.Kho)
    help help me?

    You need to use a CallableStatement for this.
    --olaf                                                                                                                                                                                                           

  • Relation between EJB and CORBA

    Hi,
    I'm confused as to the relation between EJB and CORBA. Some books I've read say that CORBA is used to implement the underlying RMI protocol in EJB while others say it is an alternative to EJB.
    Could someone please clarify.
    Thanks

    Could you pleae restate your question.
    I'm assuming you want to bind a Corba object to a
    CosNaming service from within a j2ee component. JNDI
    supports this case fully via their CosNaming service provider
    (see http://java.sun.com/products/jndi/serviceproviders.html) JNDI is part of J2SE, so it's fully available to any J2EE component.
    Amlan on behalf of Kenneth Saks

  • Propagation of ctx between EJB and JSP

    Hello,
    Does anybody know how to propagate the Security
    Context between EJB and JSP so that when I login in my JSP page the user will be after recognized in my EJB system ?
    Thanks
    Francesco

    try this...as a test..
    take a simple Contact ejb (as simple as you can make it, just a name and email address). In the ejb-jar.xml set up a role, for example, user, and restrict the access to only this role for all methods.
    try to access the ejb from a jsp, and you should get the login form identified in your web.xml file.
    make sure that the ejb is noted in the web.xml file, also.
    this should work...
    no try this...identify a role in your web.xml file, (user, for example) and restrict the access to the a particular jsp which is not calling the ejb. IF you navigate to this jsp, you should get the login prompt...
    this should work....
    now the tough part
    in your application.xml create a role with the same name, user. By doing this, you have created a global role, and connect the two together.
    Now point your browser to the restricted jsp with no calls to the ejb...you should get the login, so login in.
    now navigate to your jsp which is unrestricted, but calls the restricted ejb...
    there should now be no login prompt.
    This should work.

  • Bytes taken for a EJB call

    Folks -- I looked around for a while but did not find any thing convincing. So if some one can help me here it would be great.
    For example when the client makes an EJB call like
    this
    String getXXX(String yyy) on a RemoteIF -- Many bytes are send back and forth for this call?
    Also if some one can point me as to how many bytes does each of the Wrapper version of the primitives take for Remote calls!
    For example String, Integer, Long -- individually.
    It would really be awesome to get a quick response ;)
    Thanks, vk

    I'm quite sure the original poster meant the overhead involved with the process of making the call, not the size of some object being transferred either as parameter or as a return value.
    I have a feeling it might be rather appserver dependent since it generates the stub/skeleton objects. Overhead for making just the RMI call (disregarding everything else) should be constant, though I don't know what it is.

  • Exception happened when calling deliver API for BI Publisher Bursting

    Hi All,
    I have developed a BI Publisher report on OBIEE standalone instance (Oracle Business Intelligence 11.1.1.5.0).
    I am able to generate the report and burst the output to emails successfully.
    But when I tried to burst the output directly to the printer or to save the output FILEs to local machine, am getting the below error/exception.
    For PRINT type...error is below
    Document delivery failed
    [INSTANCE_ID=bisrv.oracleads.com.1305914111196] [DELIVERY_ID=1182]Error deliver document to printer::Exception happened when calling deliver API::Error deliver document to printer::Exception happened when calling deliver API::oracle.xdo.delivery.DeliveryException: oracle.xdo.delivery.DeliveryException: java.net.UnknownHostException: blr-ibc-7a-prn1 oracle.xdo.service.delivery.DeliveryException: oracle.xdo.delivery.DeliveryException: oracle.xdo.delivery.DeliveryException
    for FILE type.... error is below
    Document delivery failed
    [INSTANCE_ID=bisrv.oracleads.com.1305914111196] [DELIVERY_ID=1192]Error deliver document to file::FILE=[D:\Harish:9930609876-10001969343.pdf::Exception happened when calling deliver API::FILE=[D:\Harish:9930609876-10001969343.pdf::Exception happened when deliver to file:: FILE_NAME= D:\Harish/9930609876-10001969343.pdf] ::oracle.xdo.delivery.DeliveryException: java.io.FileNotFoundException: D:\Harish/9930609876-10001969343.pdf (No such file or directory)oracle.xdo.ser
    Can anyone please help on this?
    Thanks,
    Harish

    Hi Varma,
    thanks for the reply.
    Here are the below sql scripts I used.
    -- Printer
    SELECT BILL_NUMBER      KEY,
    'Layout'           TEMPLATE,     
    'en-US'                     LOCALE,
    'PDF'                          OUTPUT_FORMAT,
    'PRINT'                     DEL_CHANNEL,
    BILL_NUMBER                OUTPUT_NAME,
    'true'                          SAVE_OUTPUT,
    'Direct Printers'           PARAMETER1,
    'LocalPrinter'               PARAMETER2,
    1                               PARAMETER3,
    'd_single_sided'           PARAMETER4,
    'default'                     PARAMETER5
    FROM XXXX_BILL_TAB;
    -- File
    SELECT BILL_NUMBER           KEY,
    'VLayout'           TEMPLATE,
    'RTF'               TEMPLATE_FORMAT,
    'en-US'           LOCALE,
    'PDF'           OUTPUT_FORMAT,
    'FILE'           DEL_CHANNEL,
    'true'           SAVE_OUTPUT,
    'Monthly Bill for ' || MOBILE_NUMBER OUTPUT_NAME,
    'D:\Harish'      PARAMETER1,
    MOBILE_NUMBER||'-'||BILL_NUMBER     PARAMETER2
    FROM XXXX_BILL_TAB;
    Thanks,
    Harish
    Edited by: 899863 on Dec 16, 2011 4:01 AM

Maybe you are looking for