Mail plugin send failure - java 6 related?

I’m having trouble sending mail with the mail plugin. Specifically the exception logged is:

javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain

This is Servoy 3.1, Window XP (and 2003), Java 6.

I’ve googled the error and it seems typically to be a problem of conflicting versions of mail.jar (JavaMail) and activation.jar (JAF)…but I can’t seem to sort out versions. I tried downloading the latest of both and using those in /lib, but no joy.

Anyone have any ideas on what to try?

Thanks, greg.

Yep, I think using 1.5 is the solution.
I also tested with 6 briefly without luck and I don’t think you should just switch libs…

Bummer. I don’t really want to drop to 1.5, Java6 is really nice on Windows. Noticeably faster and much smoother graphically.

Anyway, I did research the error a bit. It’s usually do to mismatch versions of JAF (activation.jar) and JavaMail (mail.jar). Since JAF became part of the Java distribution, this seems like the likely cause.

I wonder if there’s a way to manipulate the CLASSPATH to make it work.

Where does the classpath get set for a new instance of Servoy?

g.

Again, I would not go that path!

Maybe you should even consider a bit stronger not touching it when you don’t know where the classpath gets set ;)

Ok, I figured it out.

Just drop the current version of Javamail (mail.jar):

http://java.sun.com/products/javamail/

In your Java6 /lib/ext directory and the mail plugin starts working again.

I’ve been doing all my dev and server testing on Java6 for several weeks and this is the first issue I’ve run into.

greg.

thegregor:
Ok, I figured it out.

Just drop the current version of Javamail (mail.jar):

http://java.sun.com/products/javamail/

In your Java6 /lib/ext directory and the mail plugin starts working again.

That sounds good for a developer environment but what about the clients machines? The autoinstall feature of Servoy would be broken and you’ll have to manually install mail.jar in every single client PC.
I think Marcel is right, it’s too early to adopt java 1.6 in production.

Agreed, I’m only in development at the moment, however. Go-live on this app isn’t until April 1, so hopefully Java 6 will be officially supported by then.

g.

so hopefully Java 6 will be officially supported by the

I would send a direct email to Servoy.

When I am correct J6 is not yet released (at least not by default available at java.com). That means Sun has to release it first and then Servoy needs to do their work on it.

FYI, Java 6 was officially released in early December.

http://java.sun.com/javase/6/

g.

Yep, I saw that but navigating to java.com doesn’t show that so I figured the ‘official’ release was not so ‘official’…

That sounds good for a developer environment but what about the clients machines? The autoinstall feature of Servoy would be broken and you’ll have to manually install mail.jar in every single client PC.
I think Marcel is right, it’s too early to adopt java 1.6 in production.

FYI, this particular workaround does work in the deployed environment, because the mail is sent on the server side. Your point is still valid, however.
g.

The mail-plugin has been updated to fix this issue for java 1.6.
The new version will be included in Servoy 3.1.1

Rob

It is also available for download on http://downloads.servoy.com/downloads/b … n/mail.jar

It must be copied to the servoy plugins directory (note: NOT to the lib directory)