-
Jun 25th, 2008, 06:44 AM
#1
com.sun.activation.registries.MailcapFile.getMailc apList
I have deployed a war file into the platform that worked fine in Tomcat. When it tries to send an email I get an Exception:
java.lang.NoSuchMethodError: com.sun.activation.registries.MailcapFile.getMailc apList(Ljava/lang/String
Ljava/util/Hashtable;
javax.activation.MailcapCommandMap.createDataConte ntHandler(MailcapCommandMap.java:486)
javax.activation.DataHandler.getDataContentHandler (DataHandler.java:568)
javax.activation.DataHandler.getContent(DataHandle r.java:501)
javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1151)
javax.mail.internet.MimeMessage.updateHeaders(Mime Message.java:2002)
javax.mail.internet.MimeMessage.saveChanges(MimeMe ssage.java:1970)
org.springframework.mail.javamail.JavaMailSenderIm pl.doSend(JavaMailSenderImpl.java:398)
org.springframework.mail.javamail.JavaMailSenderIm pl.send(JavaMailSenderImpl.java:342)
org.springframework.mail.javamail.JavaMailSenderIm pl.send(JavaMailSenderImpl.java:338)
I googled this exception and it seems that it is to do with an out of date activation.jar file.
It seems odd that this does not happen in tomcat. I wonder if the platform is loading a different verison of mail.jar or activation.jar than the one bundled with the WAR.
Any ideas?
-
Jun 27th, 2008, 03:30 AM
#2
com.sun.activation.registries.MailcapFile.getMailc apList
Hi Matthew,
That's a good catch! And it's a bit complicated, but let me explain what's happening...
> It seems odd that this does not happen in tomcat. I wonder if the platform is loading
> a different verison of mail.jar or activation.jar than the one bundled with the WAR.
This doesn't happen in a standard Tomcat installation, because there is only one version of activation.jar present on the classpath for your web application. In OSGi, however, you can have multiple versions of JARs or packages _available_. In the Platform we have version 1.1.0 of activation.jar in the repository. In addition, the JVM provides a potentially different version of the javax.activation packages.
With regard to your WAR deployed on the Platform, you have provided your own version of activation.jar in the /WEB-INF/lib folder; however, for WARs the Platform automatically imports the version of the javax.activation packages exported by the OSGi system bundle (i.e., the version provided with the JDK on which the Platform is currently running). In OSGi, packages specified via Import-Package take precedence over any packages which may be available in JARs on the Bundle-ClassPath. Thus, even though you package your own version of activation.jar within your WAR, it does not get used.
I hope this helps to clarify the issue for you, and we'll look into providing a better solution for this scenario in a future release.
Regards,
Sam
-
Jun 30th, 2008, 08:08 AM
#3
com.sun.activation.registries.MailcapFile.getMailc apList
FYI: I've created a JIRA issue to track this topic.
https://issuetracker.springsource.com/browse/PLATFORM-101
Regards,
Sam
-
Jul 3rd, 2008, 03:13 AM
#4
com.sun.activation.registries.MailcapFile.getMailc apList
Thanks Sam,
I shall be interested in where this goes as there may be other classes that are loaded differently in the Platform to standard Tomcat.
It would be nice if deploying a traditional WAR to the platform was guaranteed to work the same as any standard web container.
That way you can enable people to move their legacy code onto the platform without the headache of removing jars from libs etc...
This is especially problematic if you use something like Maven 2 as the jar may come in as part of a transitive dependency.
Thanks again for the reply
-
Jul 3rd, 2008, 03:16 AM
#5
com.sun.activation.registries.MailcapFile.getMailc apList
Hi Matthew,
We've provided a fix in the beta9 release. So once that goes out, please give it a try and let us know if it solves the issues you were facing.
Thanks in advance!
Sam
-
Jul 5th, 2008, 01:02 AM
#6
com.sun.activation.registries.MailcapFile.getMailc apList
Hi Sam,
I have got this exception when I send mail by using the imported mail libs (com.springsource.javax.activation-1.1.0.jar,com.springsource.javax.mail-1.4.0.jar) provided by SAP. And there is no ohter mail lib jars in the web application path. Perhaps the two jar files have been loaded by different ClassLoader. So can the the beta9 release solve this problem ?
The exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
The MANIFEST.MF config file likes this:
Import-Bundle:
com.springsource.javax.activation;version="[1.1.0,2.0.0)",
com.springsource.javax.mail;version="[1.4.0,2.0.0)",
-
Jul 9th, 2008, 11:23 PM
#7
com.sun.activation.registries.MailcapFile.getMailc apList
Hi,
I have tried the SAP beta9 for the mail sending problem. And when I put the activation.jar and mail.jar in the webapp lib dir I got the error below:
java.lang.NoSuchMethodError: com.sun.activation.registries.MailcapFile.getMailc apList(Ljava/lang/String
When I import the packages of mail process classes, I got the error below:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=UTF-8
Is there any advice for this ?
Thanks
solo
-
Jul 11th, 2008, 08:11 AM
#8
com.sun.activation.registries.MailcapFile.getMailc apList
Hi solo,
We are looking into this issue. In addition, I've created a JIRA issue which you can track here:
https://issuetracker.springsource.com/browse/PLATFORM-130
Regards,
Sam
-
Jul 22nd, 2008, 05:53 PM
#9
com.sun.activation.registries.MailcapFile.getMailc apList
Any additional insight into this issue? We are having the exact same problem and i see the bug is targeted for 1.0 but i don't see any activity sense the 11th.
-
Jul 23rd, 2008, 09:09 AM
#10
com.sun.activation.registries.MailcapFile.getMailc apList
Hi Kabriel,
We have identified that there are some issues surrounding mail support, and we are looking into it. We'll update the JIRA as soon as we've made concrete progress.
Regards,
Sam
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules