developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks




Transport.send() problem in web client
Vahe Ayvazyan 03/09/2007 11:40 AM
Applications Development 6.0.2 CF2 Windows XP


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.<init>(HttpClient.java:260)
at sun.net.www.http.HttpClient.<init>(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!

Go back