java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]


EJB programming & troubleshooting: java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]

  1. hello

    I did see few messages with such problem but none was replied...
    We are trying to deploy our application on the client's environment
    (Borland 4.5.1 on Solaris).
    We have a problem with the ejb's deployment and to isolate the problem
    we wrote different test jsps. We found that the lookups are fine and the container
    actually got the stub alright, but when a method of this stub is executed a
    java.rmi.NoSuchObjectException is thrown.


       UserManagerHome userManagerHome;
        UserManager userManager ;
        String str = null;
         try {
                javax.naming.Context context = new javax.naming.InitialContext();
                 Object ref = context.lookup(JNDI_USERMANAGER);
                //log.debug(thisClass + " got the ref " + ref);
                userManagerHome = (UserManagerHome) javax.rmi.PortableRemoteObject.narrow(ref, UserManagerHome.class);
                //log.debug(thisClass + " before calling create " + userManagerHome);
               userManager = userManagerHome.create();
                //log.debug(thisClass + " got the userManager " + userManager );
    str = userManager.sayHello(); // this method should return "hello world" string

    OK got the String <%=str%><br>

            catch (javax.naming.NamingException e) {
    FAIL (NamingException) <br>
            catch (Exception e) {
                FAIL (Exception) <br>



    2002-07-26 06:01:34.672 Trace [Thread-10] SessionTest.jsp ==========started========= 2002/07/26 06:01:34
    2002-07-26 06:01:34.689 DEBUG [Thread-10] SessionTest.jsp got the ref Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,key=PersistentId[repId=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,objectName=com/perceptionbe/crc/ejb/UserManager,poaName=/persistent],codebase=null]
    2002-07-26 06:01:34.690 DEBUG [Thread-10] SessionTest.jsp before calling create Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,key=PersistentId[repId=RMI:com.perceptionbe.crc.ejb.UserManagerHome:0000000000000000,objectName=com/perceptionbe/crc/ejb/UserManager,poaName=/persistent],codebase=null]
    2002-07-26 06:01:34.695 DEBUG [Thread-10] SessionTest.jsp got the userManager Stub[repository_id=RMI:com.perceptionbe.crc.ejb.UserManager:0000000000000000,key=ServiceId[service=/EJB[crc]com\/perceptionbe\/crc\/ejb\/UserManager,id={4 bytes: (0)(0)(0)(2)}],codebase=null]
    java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at com.inprise.vbroker.rmi.CORBA.UtilImpl.newInstance(
    at com.inprise.vbroker.rmi.CORBA.UtilImpl._mapSystemException(
    at com.inprise.vbroker.rmi.CORBA.UtilImpl.mapSystemException(
    at javax.rmi.CORBA.Util.mapSystemException(
    at com.perceptionbe.crc.ejb._UserManager_Stub.sayHello(
    at _0002fSessionTest_0002ejspSessionTest_jsp_0._jspService(
    at org.apache.jasper.runtime.HttpJspBase.service(
    at javax.servlet.http.HttpServlet.service(
    at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(
            at ...

    few more points about it:
    - The same code runs nicely on number of different environments ( NT/Linux , Borland/Orion etc..), which suggest it is an environment specific problem
    - The same thing happens with Entity but then it happens on the Home's stub.
    - From looking in the spec i realized that this exception is thrown by the container as a wrapper to "lower level" or
      CORBA exception that occured or when the refered object does not exists.
    - In the event_log i see that there is one session bean in READY state.
    - looking in the stub's code where the exception thrown in line 272 shows that :
        catch (org.omg.CORBA.SystemException ex) {
          throw javax.rmi.CORBA.Util.mapSystemException(ex);

    I doubt if it's anything to do with the deployment descriptors, could it?
    What could have gone wrong that triggered the org.omg.CORBA.SystemException to begin with?
    Could it be related to environment settings or configuration?
    Has anyone faced this problem before?

    Any ideas, sugestions or thoughts will be very appreciated.

  2. Shai,

    The error (as indicated by the exception) is that the given object reference is invalid. I'd suggest you check up on the osagent port numbers used by the client to communicate with the server (they should be the same).

    I also suspect you might be running more than one instance of the server (or EJB Container) in your subnet on the same osagent port.

    The property used to control the port number that the server binds on is vbroker.agent.port=xxxxx and is passed as a JVM param to the server [and the client]. This would along the lines of:


    Ensure of course that an osagent is indeed running on xxxxx somewhere in your subnet. Borland AppServer tries to cluster when you run servers on the same port and this behavior might not be desirable in your scenario.

  3. thank you very much krish.