# Mail plugin send failure - java 6 related?

**URL:** https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980
**Category:** Classic Servoy
**Created:** [January 19, 2007, 2:08am UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980 "2007-01-19T02:08:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 19, 2007, 2:08am UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/1 "2007-01-19T02:08:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [January 19, 2007, 7:14am UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/2 "2007-01-19T07:14:13Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 19, 2007, 1:44pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/3 "2007-01-19T13:44:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [January 19, 2007, 1:46pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/4 "2007-01-19T13:46:53Z")

</div>

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 ![;)]( "Wink")

---

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 19, 2007, 2:26pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/5 "2007-01-19T14:26:20Z")

</div>

Ok, I figured it out.

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

[http://java.sun.com/products/javamail/](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.

---

<div class="post-metadata">

### Author: ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)
#### Post date: [January 19, 2007, 2:36pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/6 "2007-01-19T14:36:39Z")

</div>

> thegregor:  
> Ok, I figured it out.
> 
> Just drop the current version of Javamail (mail.jar):
> 
> [http://java.sun.com/products/javamail/](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.

---

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 19, 2007, 3:19pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/7 "2007-01-19T15:19:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [January 19, 2007, 3:26pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/8 "2007-01-19T15:26:10Z")

</div>

> 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](http://java.com)). That means Sun has to release it first and then Servoy needs to do their work on it.

---

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 19, 2007, 3:36pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/9 "2007-01-19T15:36:14Z")

</div>

FYI, Java 6 was officially released in early December.

[http://java.sun.com/javase/6/](http://java.sun.com/javase/6/)

g.

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [January 19, 2007, 3:55pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/10 "2007-01-19T15:55:12Z")

</div>

Yep, I saw that but navigating to [java.com](http://java.com) doesn’t show that so I figured the ‘official’ release was not so ‘official’…

---

<div class="post-metadata">

### Author: ![agiletortoise](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@agiletortoise](https://forum.servoy.com/u/agiletortoise)
#### Post date: [January 24, 2007, 3:34pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/11 "2007-01-24T15:34:14Z")

</div>

> 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.

---

<div class="post-metadata">

### Author: ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)
#### Post date: [January 24, 2007, 5:26pm UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/12 "2007-01-24T17:26:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)
#### Post date: [January 29, 2007, 8:18am UTC](https://forum.servoy.com/t/mail-plugin-send-failure-java-6-related/6980/13 "2007-01-29T08:18:17Z")

</div>

It is also available for download on [http://downloads.servoy.com/downloads/b … n/mail.jar](http://downloads.servoy.com/downloads/bean_plugin/mail.jar)

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