Hi all,

I'm developing a bundle where i need to use javax.activation and javax.mail packages.

I'm using JDK 1.6 and in my bundle i've imported javax.activation and all javax.mail packages.

My bundle code simply exposes a http connector that receives a request and try to generate a http response.

The problem arise when in my bundle code i try creating a mutlipart/related httpresponse ( i.e. i'm returning attachments to
a http client ).

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.

Any idea??

Andrea


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to