• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to Send Java mail  RSS feed

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

We tried a Java mail program and ran it in Unix box and windows Machine it's working fine. I used SMTP protocol.

But when I tried to run the same from ORACLE JVM it's failing. Please assist me.

Exception we got:

java.lang.NullPointerException
at javax.activation.DataHandler.getCommand(DataHandler.java:480)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1104)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:865)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:254)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1114)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1930)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1911)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1611)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:537)




trans.sendMessage(this.message,this.message.getAllRecipients()); ----- Exactly Failing at this line

I loaded the Program in Schema using loadjava command and invoked from Pl/SQL. We tryed in DEV machine thats too worked fine. But in Production we are getting null pointer exception. Any Permission is missing ? Please assist us.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please assist us.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried a non-empty headerPart?
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally we traced the issue and I like to share the information

"DataHandler exception is because of Attachment file", We tried without file attachment and it worked. I guess some firewall is running on the ORACLE Database.

Any other suggestions ?
 
Paul Clapham
Sheriff
Posts: 22505
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I missed where the Oracle database was involved in this problem. Could you explain that a bit more?
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

I loaded the java mail Program in Schema using loadjava command and invoked from Pl/SQL.

So the code is running in the Oracle JVM.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!