• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java Mail Problem Help!!

 
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 ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic