• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Tomcat 5.5.20: a mail problem?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I installed Tomcat 5.5.20 again on a local developer's machine and tried to run JForum 2.1.7.

I receive a "NoClassDefFoundError: com/sun/mail/util/BASE64EncoderStream" error when posting a new message in the forum. (I not got this error if I disable mail notification in Admin Console).

I installed mail support in Tomcat 5 by copying mail.jar and activation.jar into "tomcat/common/lib" and removing corresponded jars in "forum/WEB-INF/lib" as described in this document
http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html

Unfortunately I got the same error.

How to resolve this problem with the mailing support in Tomcat 5?

The stack trace is below

<!-- BEGIN ERROR STACK TRACE <br /> net.jforum.exceptions.ForumException: java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.service(JForum.java:191) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) <br /> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) <br /> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) <br /> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) <br /> at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) <br /> at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 22 more <br /> Caused by: java.lang.NoClassDefFoundError: com/sun/mail/util/BASE64EncoderStream <br /> at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:793) <br /> at net.jforum.util.mail.Spammer.prepareMessage(Spammer.java:206) <br /> at net.jforum.util.mail.ForumNewTopicSpammer.init(ForumNewTopicSpammer.java:83) <br /> at net.jforum.view.forum.common.ForumCommon.notifyUsers(ForumCommon.java:191) <br /> at net.jforum.view.forum.PostAction.insertSave(PostAction.java:1150) <br /> ... 22 more <br /> <br /> END ERROR STACK TRACE-->
[originally posted on jforum.net by Evgeny]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check if you have mail.jar and activation.jar. Try putting them in Tomcat's common/lib as well.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rafael,
I already wrote, it doesn't work, strange...

Evgeny wrote:I installed mail support in Tomcat 5 by copying mail.jar and activation.jar into "tomcat/common/lib" and removing corresponded jars in "forum/WEB-INF/lib" as described in this document
http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html

Unfortunately I got the same error.


[originally posted on jforum.net by Evgeny]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I'll get this specific version of Tomcat and try it.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running 5.5.20 on the 1.5.0_09 jdk (with the latest jforum beta) and I'm not seeing this same error. I didn't load anything additional in my classpath either.

The error almost looks like you dont have permission to some of the built in java jars.
[originally posted on jforum.net by TheDruidXpawX]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rafael, thanks.
Please post the result of your check.
[originally posted on jforum.net by Evgeny]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All jars in my setup have the same rights. I think JForum will not work, if an important jar in the WEB-INF/lib will not be available. But it works, except the Mail jar.
Anyawy, thanks for reporing, and I'm waiting for Rafael's detailed check.
[originally posted on jforum.net by Evgeny]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rafael Steil wrote:Ok, I'll get this specific version of Tomcat and try it.

Rafael



Hi Rafael,
I just wanted to know if you tested JForum 2.1.7 with Tomcat 5.5.20 or not, yet?
[originally posted on jforum.net by Evgeny]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's working fine. I hadn't any issues with email or other stuff.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!