Hi,
I’ve managed to create a java agent which sends an email with an attachment. Everything works great if I run the agent from the notes client. But… it does not work when I run it from the web!!!
At the beginning it was terminating at
Properties props = System.getProperties();
but then I’ve changed this to
Properties props = new Properties();
Now, the agent stops at:
Transport.send(message);
The error is:
java.lang.NoClassDefFoundError
at sun.net.www.http.HttpClient.(HttpClient.java:260)
at sun.net.www.http.HttpClient.(HttpClient.java:280)
at sun.net.www.http.HttpClient.New(HttpClient.java:292)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:881)
at java.net.URLConnection.getContentType(URLConnection.java:372)
at javax.activation.URLDataSource.getContentType(URLDataSource.java:75)
at javax.activation.DataHandler.getContentType(DataHandler.java:197)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1013)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:790)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:216)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1021)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1841)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822)
at javax.mail.Transport.send(Transport.java:80)
at MailClient.sendMail(MailClient.java:51)
at JavaAgent.NotesMain(JavaAgent.java:32)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(NotesThread.java:208)
I’ve played with all various agent and acl permissions, but does not help. Runs PERFECTLY in notes, does not run from web…
Can anyone help? Much appreciated!