[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orbit-dev] Is there any bundle in orbit with both mail and activation package??
|
Yes Antoine,
I know perfectly the * theory * on how osgi bundles should work.... that
it's better to use import package an so on....
and i will do as expected as OSGi recommends where it's possible...
BTW the problem right now is that there are some libraries that are
simply * not osgi friendly * and for certain situation
you could find workarounds... for others you simply can't.
The javax.activation and mail packages represents one of this
situations. If you try to use DataHandlers and you keep it in separated
bundles
you 're going to have problems like the one described in the a message
tha i've post on osgi mailing list. ( I've extract it and put at the end
of the message my original post ). then i fyou add to this the usage of
jdk1.6 this will make things more complicated.
The only solution i've found is to merge activation and mail packages in
the same bundle and make this bundle exporting a specific
version of the two packages and then adjust all my client bundles to
import this version.
Cheers
Andrea
Extracted from one of my post on osgi-dev mailing list.
I've the following exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME
type multipart/related; type="text/xml"; start="<body-part>";
boundary="----=_Part_1_2112460.1259331494937"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1403)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1745)
Searching in the net it seems a problem because javax.activation and
javax.mail are not in the same classloader.
As i'm using JDK1.6 javax.activation is exported by the system bundle,
instead javax.mail is exported by
the bunndle i got from spring source repository.
My question is, which is the right solution for that problem??? It seems
someone resolved this having one bundle with both
javax.activation and javax.mail but i'm using jdk1.6 and
javax.activation is exported by the system bundle so i don't know
how to solve this.