Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail Problem Help!!

 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers

Can anyone help me with this problem:

I have created a servlet using javamail api. When I test the servlet I get a null pointer exception thrown by the InternetAddress class. See the source code comment //******. The mail is sent and received succesfully by the recipient although a null pointer is thrown. The stack trace states the problem occurs at line 569 of InternetAddress.java. I dont have the source code.

I have disguised the problem behind a friendly error page that refreshes and redirects back to the home page.

Source code as follows:


Regards
Stephen Batsas
SCPJ
SCWCD

[ Jess added UBB [code] tags to perserve whitespace ]
[ September 02, 2004: Message edited by: Jessica Sant ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Must be a null returned here. As part of the InternetAddress(String address) constructor the address is parse to check validity - if there's no address then the parsing will complain.
 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for prompt reply.

Regards
Stephen Batsas
SCPJ
SCWCD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic