FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
Sam DeNies 29.May.08 01:59 PM a Web browser Domino Designer All Releases All Platforms
I'm quite new to Java, so it is likely my problem is fairly obvious. I am writing a Java Agent that will ultimately take a file attachment from a web form and make a thumbnail for it. I am planning on using Jimi for the image scaling, but can't seem to get that far.
This is the error I am getting,
NotesException: Notes error: A database handle to a remote database cannot be used by more than one thread. (C:\DOCUME~1\******~1\LOCALS~1\Temp\eo67005552tm)
at lotus.domino.local.EmbeddedObject.NextractFile(Native Method)
at lotus.domino.local.EmbeddedObject.extractFile(Unknown Source)
at lotus.domino.local.EmbeddedObject.getInputStream(Unknown Source)
at lotus.domino.AgentBase.runNotes(Unknown Source)
// List all file type items
Vector items = currentDoc.getItems();
for (int i=0; i< items.size(); i++)
Item item = (Item) items.elementAt(i);
if (item.getType() == Item.ATTACHMENT)
String filenameString = item.getValueString();
EmbeddedObject attachmentObj = currentDoc.getAttachment(filenameString);
InputStream inputStream = attachmentObj.getInputStream();
// I'll be doing something else in here...
The error happens any time I use getInputStream(), either to set an InputStream variable or send it to a Jimi class. I am able to use the other EmbeddedObject functions, getName, getFileSize. The em********tm file may not be created, otherwise it is deleted quickly, because I never find it (even before I was doing garbage collection).