Hi,
I am using the JBoss3.0.6 mail service.
I have a servlet which has a sendmail API that is borrowed from the JBoss documentation.
When invoking that servlet I keep getting java.lang.NoClassDefFoundError: javax/activation/DataSource
I really do not get it because i took a printout of the classpath and it does include activation.jar.
Also the mail-service.xml has a classpath tag which includes activation.jar
Any help in this regards would be greatly appreciated.
================
Trace:
================
Error for /webmailtest/mailer
java.lang.NoClassDefFoundError: javax/activation/DataSource
at webmailtest.Mailer.sendMail(Mailer.java:57)
at webmailtest.Mailer.doPost(Mailer.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360
)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:280)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
53)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1656)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:549)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1606)
at org.mortbay.http.HttpServer.service(HttpServer.java:862)
at org.jboss.jetty.Jetty.service(Jetty.java:497)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:752)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:769)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
202)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
Thank you,
Sony
Hi,
you must check that you didn't have copy neither activation.jar nor mail.jar on JAVA_HOME/jre/lib/ext folder.
The problem is that there are more than one activation.jar or mail.jar in the classpath.
Pablo
:-)