You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jason <jd...@renci.org> on 2013/09/25 20:49:11 UTC

geronimo java mail

Hi all,

I wrote a Karaf command to generate a png file that then would be 
emailed to a specified recipient.  I used java mail & added the png as 
an attachment.  When I tried to run this, I get the following:

java.lang.NullPointerException

         at javax.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:62)[:2.2.0]

         at javax.activation.FileTypeMap.getDefaultFileTypeMap(FileTypeMap.java:53)[:2.2.0]

         at javax.activation.FileDataSource.getContentType(FileDataSource.java:69)[:2.2.0]

         at javax.activation.DataHandler.<init>(DataHandler.java:41)[:2.2.0]


I did some searching and found this:

https://issues.apache.org/jira/browse/GERONIMO-6484

How do I go about resolving this?  Remove the spec jar found in 
lib/endorsed & replace with this snapshot jar?

Thanks,
Jason

Re: geronimo java mail

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jason,

yes, putting the SNAPSHOT in lib/endorsed should do the trick.

Regards
JB

On 09/25/2013 08:49 PM, Jason wrote:
> Hi all,
>
> I wrote a Karaf command to generate a png file that then would be
> emailed to a specified recipient.  I used java mail & added the png as
> an attachment.  When I tried to run this, I get the following:
>
> java.lang.NullPointerException
>
>          at javax.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:62)[:2.2.0]
>
>          at javax.activation.FileTypeMap.getDefaultFileTypeMap(FileTypeMap.java:53)[:2.2.0]
>
>          at javax.activation.FileDataSource.getContentType(FileDataSource.java:69)[:2.2.0]
>
>          at javax.activation.DataHandler.<init>(DataHandler.java:41)[:2.2.0]
>
>
> I did some searching and found this:
>
> https://issues.apache.org/jira/browse/GERONIMO-6484
>
> How do I go about resolving this?  Remove the spec jar found in
> lib/endorsed & replace with this snapshot jar?
>
> Thanks,
> Jason

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com