[logback-user] SMTPAppender OSGi-Problem within Glassfish v3.1.1 (Apache Felix)

cinhtau cinhtau at gmail.com
Wed Jan 4 15:03:04 CET 2012



Thorbjørn Ravn Andersen-4 wrote:
> 
> I did a google search for the exception text and found that this problem
> has
> been reported by others.  You might find 
> 
> http://stackoverflow.com/questions/1969667/send-a-mail-from-java5-and-java6
> relevant.
> 
> Thorbjørn
> 

Thank you. But this isn't the core problem

I add the option -Djavax.activation.debug=true and this is printed out.
<pre>
14:57:55,872 |-INFO in ch.qos.logback.classic.net.SMTPAppender[EMAIL] -
SMTPAppender [EMAIL] is tracking [1] buffers
MailcapCommandMap: createDataContentHandler for text/plain
  search DB #1
  search fallback DB #1
MailcapCommandMap: createDataContentHandler for text/plain
  search DB #1
  search fallback DB #1
MailcapCommandMap: createDataContentHandler for multipart/mixed
  search DB #1
  search fallback DB #1
14:57:55,913 |-ERROR in ch.qos.logback.classic.net.SMTPAppender[EMAIL] -
Error occurred while sending e-mail notification.
javax.mail.MessagingException: IOException while sending message;
  nested exception is:
	javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
multipart/mixed; 
	boundary="----=_Part_4_29409898.1325685475873"
	at javax.mail.MessagingException: IOException while sending message
	at 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1141)
	at 	at javax.mail.Transport.send0(Transport.java:195)
	at 	at javax.mail.Transport.send(Transport.java:124)
	at 	at
ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:352)
	at 	at
ch.qos.logback.core.net.SMTPAppenderBase$SenderRunnable.run(SMTPAppenderBase.java:600)
	at 	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at 	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at 	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for
MIME type multipart/mixed; 
	boundary="----=_Part_4_29409898.1325685475873"
	at 	at
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
	at 	at javax.activation.DataHandler.writeTo(DataHandler.java:302)
	at 	at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1476)
	at 	at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1772)
	at 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1099)
	at 	... 7 common frames omitted
</pre>

As I told, sending from scratch is ok. If I use SMTPAppender it might be a
classloading problem of SMTPAppender, or at least I assume it. Have to look
at the source
(ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:352))
then.
-- 
View this message in context: http://old.nabble.com/SMTPAppender-OSGi-Problem-within-Glassfish-v3.1.1-%28Apache-Felix%29-tp33078034p33079255.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list