NotesException: Object has been removed

Did a test trying to figure out where the problems came from when i used the recycle method for almost any object…

Now I really don’t know anymore.

I tried this using a jsp page, with an ncso-notesconnection:

<%@ page import=“com.jacobs.util.,java.util.,lotus.domino.*”%>

<%@ taglib uri=“domtags.tld” prefix=“domino” %>

<domino:session id=“mySession” duration=“session”>

<%

Database tmpdb=mySession.getDatabase(null, “somedatabase.nsf”);

Document tmpdoc=tmpdb.getDocumentByUNID(“B2D87D87CD9D3CF3C1256DF100354859”);

RichTextItem tmpri=(RichTextItem)tmpdoc.getFirstItem(“pictures”);

out.println(WebFunc.getUrlcontent(“http://somedomain/test2.jsp”));

// this jsp does the same as this jsp because i want to find out whether the

// recycling of the same objects interfere with each other.

out.println(tmpdoc.getItemValueString(“title”));

Vector pictures=tmpri.getEmbeddedObjects();

try {tmpri.recycle();} catch (Exception e) {}

try {tmpdoc.recycle();} catch (Exception e) {}

try {tmpdb.recycle();} catch (Exception e) {}

%>

</domino:session>

When i load the page normally this gives no errors, just prints the titles of the documents… no problems…

Now when i stresstest this page, refreshing many many times, i get lots of “NotesException: Object has been removed” errors on getEmbeddedObject()… ?

Is this a bug? Anybody have a clue on this recycling and when to use it and when not???

Subject: NotesException: Object has been removed

Couple of questions:

Is the code you provide from test2.jsp, so that this jsp is recursing, or are there 2 files - test1.jsp and test2.jsp - and you provided the code from test1.jsp?

I have seen similar behavior in a local Domino session (Notes.jar, not NCSO), and I fixed it for 6.0.4/6.5.2. Just to confirm, this was not using a local Domino server?

How do you do your stress testing? Is the user logged in or anonymous?

If you could perform an experiment for me, I would like to know if it still happens when you change the session’s duration attribute to “request”.

Thanks!

Steve

Subject: RE: NotesException: Object has been removed

  1. no it’s not recursing it are 2 different jsps2. not a local domino server, remote with a diiop connection

  2. stress testing: clicking like a madman on my internet explorer refresh button…

  3. doesnt’ happen on duration=request, but slows the application because creating a diiop connection takes a lot of time

I found out what was wrong… the domino tag,

<domino:session id=“mySession” duration=“session”>

shares the dominosession among the jsp’s in the same jspwebusersession (duration=session). (I did this because i wanted to get rid of the delays of creating a new diiop session every request…)

But now you have 2 jsps in the same dominosession, the first opens a document in a database, the second recycles the same database and the first tries to read an item of the document, which has then been recycled by the database-recycle…

Now i wrote my own tag, which makes use of a dominosession-pool and every jsp, gets his own dominosession from that pool… this works fine.

Subject: RE: NotesException: Object has been removed

Hi,

Actually I’m having the same problem as you.

It appeared on both 6.0.3 (Windows 2000) & 6.0.1 (AIX).

So, did you reach a solution for this?

Thanx,

Hagar