File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "NoSuchObjectException" Watch "NoSuchObjectException" New topic


shai koren
Ranch Hand

Joined: Nov 04, 2001
Posts: 48
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.
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.
[ 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:
subject: NoSuchObjectException
jQuery in Action, 3rd edition