• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail Problems  RSS feed

 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been working a lot recently with JavaMail. It is relatively straightforward, yet, I continue to hit the same wall each time I set up JavaMail and I end up going down a different path (not JavaMail).

I am using NetBeans as my IDE, and I have no problems compiling and building any of my servlets containing JavaMail references (eg. Message msg = new MimeMessage), however each time I execute a JSP which in part invokes the servlet I receieve a NoClassDefFoundError which points to activation\DataSources.

I have both the mail.jar and activation.jar in the following areas:

web-inf\lib directory of application
common\lib directory of tomcat

Any suggesstions? I think this may be a Netbeans "user error" because I know this seems like a CLASSPATH issue, but I have been fumbling with it for days with no resolution. Any help would be appreciated!
 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My fault...I was correct and incorrect at the same time. It was definitely a CLASSPATH issue, but I am using the SUN J2EE appserver plug in and the activation.jar\mail.jar files needed to reside within ALL libraries on the server as well...not just the <SUN_HOME>\appserver\lib directory....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!