• Nightly agent removes Google messages<> does not create newsitems

    By Philippe Creytens 2 decades ago

    DB has Google email messages. Nightly agent to convert messages to News items removes messages but no news items are inserted in the DB.

    Message conversion does not work …



    BTW setup: Domino Linux 6.0.3

    • it barfs on See all stories on this topic:

      By Alan Bell 2 decades ago

      e.g. it can't parse the following:



      DENSO Earns 2004 Climate Protection Award from US Environmental …

      PRNewswire (press release) - USA

      … The US Environmental Protection Agency (EPA) last night awarded a 2004

      Climate Protection Award to the Electrical Inverter Air Conditioning Team,

      comprised of …

      <http://www.prnewswire.com/cgi-bin/stories.pl?ACCT=109&STORY=/www/story/04-14-2004/0002151327&EDATE=>

      See all stories on this topic:

      <http://news.google.com/news?ie=utf8&oe=utf8&persist=1&num=30&hl=en&client=google&newsclusterurl=http://www.prnewswire.com/cgi-bin/stories.pl%3FACCT%3D109%26STORY%3D/www/story/04-14-2004/0002151327%26EDATE%3D>





      the error in the java log is

      NotesException: Rich text item niLink already exists


      at lotus.domino.local.Document.NcreateRichTextItem(Native Method)<br/>
      


      at lotus.domino.local.Document.createRichTextItem(Unknown Source)<br/>
      


      at JavaAgent.processGoogleAlerts(JavaAgent.java:123)<br/>
      


      at JavaAgent.NotesMain(JavaAgent.java:24)<br/>
      


      at lotus.domino.AgentBase.runNotes(Unknown Source)<br/>
      


      at lotus.domino.NotesThread.run(NotesThread.java:215)
      
      • fixed it

        By Alan Bell 2 decades ago

        I added the line:

                     iPosition=88;//stop processing until restarted by finding a blank line         <br/>
        

        towards the end of the agent Process Incoming Alerts just after it saves the document so the end of it reads:




                    strEmailTextLine = new String(stEmailText.nextToken());<br/>
                        strEmailLinkLine2 = strEmailTextLine.substring(0, strEmailTextLine.length() - 2);<br/>
                    } else {<br/>
                        strEmailLink = strEmailTextLine.substring(1, strEmailTextLine.length() - 2);<br/>
                    }<br/>
                    RichTextItem rtiLink = docNews.createRichTextItem(&quot;niLink&quot;);<br/>
                    rtiLink.appendText(strEmailLink + strEmailLinkLine2);<br/>
                                  <br/>
                       //Now that the HTML has been harvested, save the document<br/>
                        docNews.save(true, false);<br/>
                         iPosition=88;//stop processing until restarted by finding a blank line         <br/>
                   } else {<br/>
                                    <br/>
                       //This is one of the story group lines that has the story abstract in it.<br/>
                        sbAbstract.append(strEmailTextLine + &quot; \n&quot;);<br/>
                   }<br/>
            }<br/>
        }<br/>
        

        }

        • I found that one yesterday also...

          By Thomas W Duff 2 decades ago

          I'll have to include that code in the next release. Thanks!

          • might be best to pop it in a field

            By Alan Bell 2 decades ago

            personally I just wanted to discard it but some people might find it useful.

    • This was a problem with the email agent security. He fixed it himself.

      By Thomas W Duff 2 decades ago