Invalid or recycled Java (DIIOP) Session

I have an external (non-agent) Java program that connects to a Domino server using DIIOP. It creates a remote internet session, opens some databases, searches for documents, and creates objects equivalent to the documents.When it is done creating each copy of a document, it recycles the document. When it is completely done, it recycles each opened database and finally the session.

I have seen three types of exceptions from this program.

I’m trying to figure out what might cause them and what if anything I can do to prevent these situations from happening (and handle them better if they do).

It appears that the Session is being recycled. I know that there is a configurable timeout on Sessions. Doesn’t that timer reset every time you call a method on any Document or Database obtained from a Session - not just methods on the Session itself?

Exception #1 - Session timeout? - session being recycled now?

2006.11.08 02:03:09 VMP_VDSCDC (DataConnector) - (tpatterson): Throwable: java.net.SocketException: Connection reset: Connection closed: Host: 172.16.1.3 Port: 63148

org.omg.CORBA.COMM_FAILURE: java.net.SocketException: Connection reset: Connection closed: Host: 172.16.1.3 Port: 63148 vmcid: 0x0 minor code: 1 completed: Maybe

at lotus.priv.CORBA.iiop.IIOPConnection.purge_calls(Unknown Source)

at lotus.priv.CORBA.iiop.ReaderThread.run(Unknown Source)

Exception #2: Invalid object reference - session was already recycled?

2006.11.08 02:03:09 VDSC_DRIVER_NOTES (ServerLogWrapper) - NotesConnection.recycle()

org.omg.CORBA.INV_OBJREF: vmcid: 0x49423000 minor code: 2449 completed: No

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:308)

at java.lang.Class.newInstance(Class.java:261)

at lotus.priv.CORBA.iiop.ReplyMessage.getSystemException(Unknown Source)

at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)

at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)

at lotus.domino.corba._IDatabaseStub.recycle(Unknown Source)

at lotus.domino.cso.Base.recycle(Unknown Source)

at com.vaultus.vms.domino.driver.NotesDatabase.recycle(NotesDatabase.java:244)

at com.vaultus.vms.domino.driver.NotesDbDirectory.recycle(NotesDbDirectory.java:228)

at com.vaultus.vms.domino.driver.NotesConnection.recycle(NotesConnection.java:407)

Exception #3: Bulk recycler is not running - session already recycled?

Caused by: NotesException: Bulk recycler is not running

at lotus.domino.cso.RecycleThread.checkError(Unknown Source)

at lotus.domino.cso.Base.checkValid(Unknown Source)

at lotus.domino.cso.Document.validate(Unknown Source)

at lotus.domino.cso.Document.getUniversalID(Unknown Source)

at com.vaultus.vms.domino.driver.NotesDocument.getUniversalID(NotesDocument.java:54)

at com.vaultus.vms.domino.driver.NotesDocument.close(NotesDocument.java:74)

at com.vaultus.vms.domino.driver.NotesDocument.release(NotesDocument.java:66)

Thanks for any help anyone can offer.

Chuck

Subject: Invalid or recycled Java (DIIOP) Session

Apparently, I can and perhaps should call Session.isValid before bothering the call Session.recycle.Apparently, there is no similar property on Database,

and the isValid property on Document just means that the document was not initially deleted.

When my program is done doing the work it needs to do,

I can certainly see if the session was already recycled out from under me before attempting to clean up (by using Session.isValid).

My real question is why would a session be recycled in the middle of using it (what defines a timeout) and how can I detect and handle that without always calling Session.isValid?

The documentation for Session.isValid says this in the remarks:

For a remote operation, this method determines if the DIIOP server task considers the session valid.

For a remote operation, iteratitive use of this method impacts performance.

Thanks,

Chuck

Subject: RE: Invalid or recycled Java (DIIOP) Session

There is an idle timeout in the server config document under Internet Protocols > IIOP. Default is 60 minutes.

It is certainly possible to keep sessions open for long periods, days on end. So you should be able to rule that out by setting the config

Simon

Subject: RE: Invalid or recycled Java (DIIOP) Session

Thanks for your reply.

I know that there is a timeout setting defined on the server document, I know where to find it, and I know the default is 60 minutes. I guess you’re saying to avoid the problem that I seem to be in (that my sessions appear to be expiring), I should simply increase it a lot?

My questions are:

a) What actions must you take to reset the timer to avoid a timeout (i.e. direct calls to the session, or simply calls on the Database or Documents ultimately derived from that session).

b) What is the proper way to detect that a session has been recycled/invalidated? There is the isValid property on Session.

The documentation warns not to call it too often. I could certainly call it for before each database operation. It would be prohibitive to call it before each Document or Item call.

Chuck

Subject: Invalid or recycled Java (DIIOP) Session

para resolver el problema es necesario hacer una limpieza de la base de datos Certlog.nsf depurando documentos duplicados, documentos en blanco, y documentos que al comparar con la base de datos Names.Nsf no existan, actualizar el conector de JAVA y correr de nuevo la tarea. Y listo… solucionado este error me sucedio pero con el minor code 2462

Subject: Invalid or recycled Java (DIIOP) Session

Another important question I have is this:

Is this exactly what happens when a DIIOP session is terminated due to timeout?

If not, what else could cause this?

Exception #1 - Session timeout? - session being recycled now?

2006.11.08 02:03:09 VMP_VDSCDC (DataConnector) - (tpatterson): Throwable: java.net.SocketException: Connection reset: Connection closed: Host: 172.16.1.3 Port: 63148

org.omg.CORBA.COMM_FAILURE: java.net.SocketException: Connection reset: Connection closed: Host: 172.16.1.3 Port: 63148 vmcid: 0x0 minor code: 1 completed: Maybe

at lotus.priv.CORBA.iiop.IIOPConnection.purge_calls(Unknown Source)

at lotus.priv.CORBA.iiop.ReaderThread.run(Unknown Source)

Thanks,

Chuck

Subject: RE: Invalid or recycled Java (DIIOP) Session

This is not a session timeout. Google around for org.omg.CORBA.COMM_FAILURE and you will see its an ORB incompatibility.

What the solution is? Not a clue. But its not session timeouts.

Simon