[jboss-user] [Management, JMX/JBoss] - MBean trying to send email fails with javax.activation.Unsup
pholli
do-not-reply at jboss.com
Wed Jun 13 12:15:04 EDT 2007
I have both an MBean method and an EJB method that hits the same POJO object via JNDI lookup.
The call results in an email being sent out.
It works from the EJB.
It works from the MBean when I use the jboss jmx-console web interface.
It does NOT work when the call for the MBean is via JConsole.
I am not using the jboss mail service. The activation.jar and mail.jar are provided via a codebase set in the jboss-service.xml.
I can only assume this must be a class path issue.
Any help would be appreciated.
Thanks.
Stack Trace:
11:51:24,060 ERROR [TestMailModule] Exception sending message: Exception trying to send a text email message...exception: IOException while sending message...exception: IOException while sending message
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
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:98)
at com.xxi.framework.mailmodule.impl.MailModule.sendMessage(MailModule.java:188)
at com.xxi.framework.mailmodule.impl.MailModule.sendMail(MailModule.java:245)
at com.xxi.framework.mailmodule.impl.MailModule.sendMail(MailModule.java:127)
at com.xxi.framework.mailmodule.impl.MailModule.sendTestEmail(MailModule.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:279)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1424)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1262)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1357)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:786)
at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:870)
at javax.activation.DataHandler.writeTo(DataHandler.java:301)
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)
... 34 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054058#4054058
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054058
More information about the jboss-user
mailing list