Hi!
Take a look at http://beta.groovy-lang.org/docs/groovy-2.3.0/html/documentation/#_groovy_integration_mechanisms
There is a section that explains how to work around the thread safety issue.
Groovy 2.3.0 Java 6
Since I’ve upgraded my dev environment to 2.3.0 I’ve noticed that the groovy classloader via @Grab is much more restrictive
Here is an example for a problem I’m having with smtp
When I get mailapi.jar and smtp.jar from a Grab I now get these errors.
15:45:53,132 ERROR SMTPMailer - javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_2145764153.1399664752712"
Before 2.3.0 the classes resolved correctly and I did not get these errors
I can fix this by …
1. adding @GrabConfig(systemClassLoader=true)
2. throwing mailapi.jar and smtp.jar into ~/.groovy/lib .
This is not just restricted to smtp. I’m also getting the problem using the wink rest client
What has changed with the @Grab classloader?
Edits…
From: Nelson, Erick [HDS]
Sent: Friday, May 09, 2014 1:00 PM
To: us...@groovy.codehaus.org
Subject: @Grab classloader seems different in 2.3.0
Groovy 2.3.0 Java 6
Since I’ve upgraded my dev environment to 2.3.0 I’ve noticed that the groovy classloader via @Grab is much more restrictive
Here is an example for a problem I’m having with smtp
When I get mailapi.jar and smtp.jar from a Grab I now get these errors.
15:45:53,132 ERROR SMTPMailer - javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_2145764153.1399664752712"
Before 2.3.0 the classes resolved correctly and I did not get these errors
I can fix this by …
1. adding @GrabConfig(systemClassLoader=true)
or