• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Java mail error

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,
Below is the error I'm receiving when posting a message (this only occurs when the "Send an email to nofity users when a topic reply is post" is set to true). Any idea what's causing it?


<!-- BEGIN ERROR STACK TRACE <br /> 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:324) <br /> at net.jforum.Command.process(Command.java:106) <br /> at net.jforum.JForum.service(JForum.java:298 ) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) <br /> at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96) <br /> at com.caucho.server.http.Invocation.service(Invocation.java:312) <br /> at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) <br /> at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342) <br /> at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272) <br /> at com.caucho.server.TcpConnection.run(TcpConnection.java:137) <br /> at java.lang.Thread.run(Thread.java:534) <br /> Caused by: java.lang.NoSuchMethodError: javax.mail.Session.getDefaultInstance(Ljava/util/Properties; )Ljavax/mail/Session; <br /> at net.jforum.util.mail.Spammer.<init>(Spammer.java:102) <br /> at net.jforum.util.mail.TopicSpammer.<init>(TopicSpammer.java:63) <br /> at net.jforum.view.forum.common.TopicsCommon.notifyUsers(TopicsCommon.java:227) <br /> at net.jforum.view.forum.PostAction.insertSave(PostAction.java:653) <br /> ... 14 more <br /> <br /> END ERROR STACK TRACE-->
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you have a different version of javamail. This is likely to happen when you use some shared library instead the one which shipts with JForum.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What can I do to fix it?
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it depends of your environment. JForum works fine with the javamail which comes in the download package. However, if you have put JForum in the same context of some another application you have and which uses javamail, but a different version, then we have a big problem.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I see which version of javamail I have installed and which version comes with jForum?
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you installed JForum? If you have unpacked into a its own directory, then it was supposed to work. If you put it in the same context of another application, see if there isn't another jar from javamail in the class WEB-INF/lib.
The other step is to check the shared libraries dir from the container you're using. If it is Tomcat, look at TOMCAT_HOME/common/lib

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help... I'm using Resin 2.1. I manually installed JForum into it's own directory. There are no other apps with it. I don't see any javamail.jar files - only mail.jar? Could I be missing something?
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it is mail.jar. Please do a search into Resin's directories, looking for some mail.jar ( or mail-xxx.jar ).

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Attached is the contents of the Resin\lib. Does anything look strange or missing?
[originally posted on jforum.net by Didas]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I don't have any idea why it isn't working for you. For now, you may want to disable email notification. To do that, open WEB-INF/config/SystemGlobals.properties and set the value of the key mail.notify.answers to "false".

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I had tested that feature before. Everything seems to work except the email notification - which is an important feature. It's annoying that I can't resolve it. Co̱o nojoda!
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, can you install Tomcat and try JForum with it? This is to be sure that is something only related to Resin (or not).

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using the free www.myjavaserver.com and when I use a simple jsp to send emails it works, but when I want JForum to send activation emails I have a no go (email is not send and I see no errors).
I'm using JForum 2.1.4

Thanks for the help
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you correctly configured email options in Admin Panel -> Configurations ?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the jsp with which sending emails work:

I only changed the email address in the code.

Here is my JForum configuration in Admin Panel -> Configurations:

SMTP Server: smtp.myjavaserver.com
SMTP Server eist authorisatie?( = need authentication ?) : False
SMTP loginnaam : <empty>
SMTP wachtwoord : <empty>

I am correct to say that I don't need authentication, right ?
PS: I'll try to see if I can create a program that changes phpBB templates to JForum templates, is there a document that explains the JForum template-setup ?

Thanks again, JForum is a great program
[originally posted on jforum.net by Anonymous]
 
I just had the craziest dream. This tiny ad was in it.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic