06/23/2009

View Error

Category lotus error view

Again, java hate me !

here is the last error after trying to execute the last java agent on the server:

A picture named M2

I can not open a view in the database where agent run.

Never seen this error before.

in english, the text is: Attempt to reopen an open container.

the problem was fixed by dropping all users from the database.

but during the execution of the java agent, a note was corrupted and a fixup deleted it.

Java seems to be more complicated than excpected.

06/23/2009

getItemValueString() bug ?

Category java lotus

Hi all,

Can someone please say to me what's wrong with this code ? (on lotus designer 6.5.4)

View viewparam = db.getView("Parametres");
lotus.domino.Document docparam = viewparam.getFirstDocument();
       while (docparam != null) {
       String cntsuivi = docparam.getItemValueString("CltFollow");
               if (cntsuivi != "NON") {
                       String cntnom = docparam.getItemValueString("Name");
                       String cntprenom = docparam.getItemValueString("FirstName");
                       String cntemail = docparam.getItemValueString("Email");
                       System.out.println("Envoi du mail à " +cntprenom+" "+cntnom+" - "+cntemail);
                         }
.....


Of course, there is a problem as the println never occurs.
The CltFollow Field is a simple text field, and the documents have the "OUI" Value in it.

The only thing that seems to work is:
Item cntsuivi = docparam.getFirstItem("CltFollow");
String cntsuivivalue = cntsuivi.getValueString();
       if (cntsuivivalue.indexOf("OUI") == 0 ) {


And i do not understand why as i have on the same agent, these lines that are working well:
     String cdtmailaction = doc.getItemValueString("MailAction");
     if (cdtmailaction != "NON") {


Is this a getItemValueString() bug or something else ?