wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes NoSuchObjectException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "NoSuchObjectException" Watch "NoSuchObjectException" New topic
Author

NoSuchObjectException

shai koren
Ranch Hand

Joined: Nov 04, 2001
Posts: 48
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 gets the stubs alright, but when a method of this stub is executed a
java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 0[]
is thrown.
code:
...
<%
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>
<%=e.getMessage()%><br>
<%
e.printStackTrace();
log.writeStackTrace(e);
}
catch (Exception e) {
%>
FAIL (Exception) <br>
<%=e.getMessage()%><br>
<%
e.printStackTrace();
log.writeStackTrace(e);
}

%>

log:

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(UtilImpl.java:99)
at com.inprise.vbroker.rmi.CORBA.UtilImpl._mapSystemException(UtilImpl.java:368)
at com.inprise.vbroker.rmi.CORBA.UtilImpl.mapSystemException(UtilImpl.java:572)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at com.perceptionbe.crc.ejb._UserManager_Stub.sayHello(_UserManager_Stub.java:272)
at _0002fSessionTest_0002ejspSessionTest_jsp_0._jspService(_0002fSessionTest_0002ejspSessionTest_jsp_0.java:119)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
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.
Thanks
shai
[ August 05, 2002: Message edited by: shai koren ]

Shai koren<br />SCJP2 <br />SCEA (well yea only part 1 so far)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoSuchObjectException
 
Similar Threads
RMI application on Jboss
Calendar.roll() questions
Problem with Start up Bean in WebSphere
CORBA OBJECT_NOT_EXIST 0[] in Servlet
Weblogic stop and start - problem - object does not exist error