• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Error when sending emails

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure, but my first WAG would be that you might have multiple copies / versions of the mail and activation jars. This can run up against some of the webapp server security rules.

Try removing them from the WEB-INF/lib directory and seeing if these removes the conflict.
[originally posted on jforum.net by monroe]
 
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
Hi,

I've got the following exception when JForum sends an email (when a moderated message is validated for example) :
09:38:22,187 ERROR [Spammer ] Error while dispatching the message.javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:120)
at net.jforum.util.mail.Spammer.dispatchMessages(Spammer.java:192)
at net.jforum.util.mail.EmailSenderTask.run(EmailSenderTask.java:63)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
at javax.activation.DataHandler.writeTo(DataHandler.java:305)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:585)
... 6 more

Here is my configuration in SystemGlobals.properties :



and in jforum-custom.conf :


[originally posted on jforum.net by toomtooms]
 
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 don't have multiple copies or versions of the activation and mail jars in WEB-INF/lib.
[originally posted on jforum.net by toomtooms]
 
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
But you might have copies in other directories in the class path... e.g. there might be one in the JVM you're using, or in the shared or common directories of your application engine.

For various security reasons, if a class is loaded at a "higher level", it can't dynamically create a class from a "lower level" jar (this would let application people inject code into the system level and do intentional or unintentional "bad things")

So, what may be happening is that a root class from the activation package is being created at a higher level first (maybe by another webapp or the system), then when internally it tries to dynamically load/create a class, the class is being found at a lower level. This is then denied by the security mechanism and generally gets reported as a "class not found" error.
[originally posted on jforum.net by monroe]
 
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
Thank you for your explanation !

So I tried to remove the 2 jars in WEB-INF/lib but I've got the same exception
[originally posted on jforum.net by toomtooms]
 
ice is for people that are not already cool. Chill with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic