CORBA INV_OBJREF Exception

I am using the notes api (ncso.jar) to connect to the Domino server using an adapter written in java. I get a java.lang.reflect.InvocationTargetException caused by:

org.omg.CORBA.INV_OBJREF: vmcid: 0x49423000 minor

code: 2449 completed: No

Can anyone tell me what this minor code means? Is there anything else I can do to resolve this problem?

Subject: CORBA INV_OBJREF Exception

David -

See this for a few more low level details – really not much help though. The minor code (i.e., 2249) is a return code that CORBA vendors, presumably Lotus/IBM in this case, provide. I’ve looked for a list of these and their definitions several times with no luck. What is the context in which the error occurs? Have you traced it to a single line?

dgg

Subject: RE: CORBA INV_OBJREF Exception

I’ve done a bit more work on trying to recreate the error outside of my application. It appears that somehow my Session is becoming invalid after I get an instance of the database object. And any further calls to any methods of the database object throws the INV_OBJREF exception. So my example that duplicated the problem is:==========================================

Session s = NotesFactory.createSession(“NOTESSERVER”,“”,“”);

Database db = s.getDatabase(“NOTESSERVER”,“mydb.nsf”);

//this makes the session invalid.

s.recycle();

//this next line throws the error

Document doc = db.createDocument();

============================================

Is there anyway to automatically make the session valid again? I am using this in a webMethods adapter that works fine until I run the code in debug mode. When debugging I get these errors, so maybe the session is created on the server and when the database object is passed back to the development IDE in debug mode the session becomes invalid, because its losing its reference to it? I don’t know, any help would be appreciated.

Thanks

Subject: RE: CORBA INV_OBJREF Exception

Ahh . . . I see your problem. In the Notes/Java API, objects have a parent/child relationship. For example:Session = parent object of a Database object

Database = parent object of a Document object,

Document = parent object of an Item object,

etc, etc.

The recycle method is designed so that when it is called on a parent object, all of its child objects are also recycled. The only exception to this rule that I’ve ever found is the EmbeddedObject class (see here for details). Anyway, when you recycle the Session object, the Database object is also recycled. So the solution is pretty simple: don’t recycle the Session until you’re code is done.

hth,

dgg

Subject: RE: CORBA INV_OBJREF Exception

I’m not explicitly calling the recycle on the Session object. I’m using webMethods and it appears that when I am in debug mode, the Session and Database objects are created on the Unix box and then passed back to my workstation so i can step through my code. It looks like the Session is becoming invalid when its passed back to the workstation. I was hoping there would be a way around the Session becoming invalid when passed from the server to the client.

Subject: There is

You could change the DIIOP server setting:

Idle session timeout:

60 minutes

It is under Internet Protocols and DIIOP tabs.

If you haven’t found the article yet, this might help:

.

Java access to the Domino Objects, Part 1
An introduction to Domino Objects for Java programmers, this article covers the basics of local and remote access, then addresses access control. This article focuses on developing Java applications.

Java access to the Domino Objects, Part 2
Part 2 of 2: This article covers advanced topics in developing Java applications using Domino Objects including SSL encryption, servlets, connection pooling, single sign-on, session timeouts, and recycling, and suggests some troubleshooting techniques.

Subject: RE: CORBA INV_OBJREF Exception

Oh . . . ok, well I guess I’ve got to retract my statement about the solution being “pretty simple” then. I have been able to debug a few Notes/Domino Java stand-alone (i.e., CORBA-based) programs from within JBuilder and Eclipse without problem. Maybe your IDE’s debugger is the determining factor? Sorry I can’t really offer too much in the way of advice.dgg