Bug 362370 - Cannot send email attachments using Orbit bundle with JRE1.5
Summary: Cannot send email attachments using Orbit bundle with JRE1.5
Status: NEW
Alias: None
Product: Orbit
Classification: Tools
Component: bundles (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Orbit Bundles CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 360250
  Show dependency tree
 
Reported: 2011-10-28 16:41 EDT by Sebastien Dubois CLA
Modified: 2012-01-20 17:21 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Dubois CLA 2011-10-28 16:41:19 EDT
It seems that the javax.activation bundled with Geronimo is not compatible with javax.mail.  When using an Eclipse running on a JRE1.5 VM, it is not possible to send emails with Multipart attachments and an exception is generated.  When using JRE1.6, the javax.activation included in rt.jar (which is Sun's implementation and is different than the one included with Geronimo) supersedes the Orbit one and mail attachments are working fine.

java.lang.NoClassDefFoundError: javax/mail/MessagingException
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:470)
	at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:255)
	at javax.activation.DataHandler.writeTo(DataHandler.java:76)
	at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1142)
	at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1112)
	at org.apache.geronimo.javamail.transport.smtp.SMTPTransport.sendData(SMTPTransport.java:1419)
	at org.apache.geronimo.javamail.transport.smtp.SMTPTransport.sendMessage(SMTPTransport.java:648)
	at javax.mail.Transport.send(Transport.java:95)
	at javax.mail.Transport.send(Transport.java:48)
	at org.eclipse.mylyn.reviews.r4e.mail.smtp.mailVersion.Smtp.createAndSendEmail(Smtp.java:325)
	at org.eclipse.mylyn.reviews.r4e.mail.smtp.mailVersion.Smtp.sendEmail(Smtp.java:111)
	at org.eclipse.mylyn.reviews.r4e.mail.smtp.mailVersion.Smtp.createMeetingRequest(Smtp.java:192)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.utils.MailServicesProxy.sendMeetingRequest(MailServicesProxy.java:1103)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.SendNotificationHandler$1.runInUIThread(SendNotificationHandler.java:128)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 1 David Williams CLA 2012-01-20 14:39:18 EST
Could this be related to the discussion in bug 348155? 

I'm not sure what the fix would be, here. Any ideas? (If not related to bug 348155)
Comment 2 Sebastien Dubois CLA 2012-01-20 17:17:41 EST
(In reply to comment #1)
> Could this be related to the discussion in bug 348155? 
> 
> I'm not sure what the fix would be, here. Any ideas? (If not related to bug
> 348155)

Yes it seems to be a similar problem, but for a different package.  Ideally, the solution would be to bundle the correct javax.activation (i.e. the one found in the 1.6 RT.jar) with Geronimo in Orbit, but I'm not sure if that would not cause other compatibility problems.  

I'm actually surprised nobody reported that earlier, because it means you basically cannot send any mail attachment when using Geronimo with 1.5 JVM