File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Javamail - type exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Javamail - type exception" Watch "Javamail - type exception" New topic

Javamail - type exception

Rich Stepanski
Ranch Hand

Joined: Aug 24, 2004
Posts: 59
I've written a program that uses the javax.mail jar to send email. The program works fine on my desktop computer - but when moved to another station, the Transport.send() method throws an Unsupported Type Exception. Saying therei s no DCH object for my MIME object.
I've seen several posts around with similar problems - the only suggestions are to check the class path. I'm using a jar with all of my mail jars inside, so I don't do any class path setting.
Does anyone know of any hardware problems that could cause this? I was able to open outlook on the other station and send a message.
Here is a cropped portion of the code...

Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
No DataContentHandler, well the only solution to that is to check your classpath... That's almost always the problem, regardless of how sure you are, I really would go and check it again.

I think in one of the jars somewhere there will be a META-INF/mime.types or mime.defaults file, which IIRC tells you the supported mime-types. Perhaps you have conflicting mime.types files due to the installation of java on that 2nd machine.

I have no java certifications. This makes me a bad programmer. Ignore my post.
I agree. Here's the link:
subject: Javamail - type exception
It's not a secret anymore!