You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by George Sexton <ge...@mhsoftware.com.INVALID> on 2022/07/25 04:08:07 UTC
JavaMail Under Security Manager
Everyone,
I'm running Tomcat 9 under the security manager and when I try to use
JavaMail to send a message, I'm getting:
javax.mail.MessagingException: IOException while sending message; nested
exception is:
javax.activation.UnsupportedDataTypeException:
no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_1399981359.1658719078369"
I've confirmed the code works as expected without the security manager.
From searching around, it seems like the issue is that the Activation
jar can't read configuration settings in javax-mail-1.6.2.jar/META-INF
javax-mail-1.6.2.jar is in $CATALINA_BASE/lib
I've tried various workarounds (setting mailcap values, and setting
class loader) that are suggested on Stack Exchange but they don't help.
Does anyone have any ideas of what I should put in the catalina.policy
to allow this? Should I move the javax-mail.jar?
System Information:
Tomcat: 9.0.65
OS: OpenSuse
Java Mail Version: 1.6.2
JDK: OpenJDK 11.0.15 22-04-19
Any help would be appreciated.
--
George Sexton
(303) 438 9585 x102
MH Software, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JavaMail Under Security Manager
Posted by George Sexton <ge...@mhsoftware.com.INVALID>.
One other fine point.
The call hierarchy is:
application/app.jar
lib/wrapper.jar
App.jar is signed and has java.security.AllPermission based on signedBy
lib/wrapper.jar is in ${catalina.base}/lib which has
java.security.AllPermission because it's in ${catalina.base}/lib and
there's an explicit grant.
On 7/24/2022 10:08 PM, George Sexton wrote:
> Everyone,
>
> I'm running Tomcat 9 under the security manager and when I try to use
> JavaMail to send a message, I'm getting:
>
> javax.mail.MessagingException: IOException while sending message;
> nested exception is:
> javax.activation.UnsupportedDataTypeException:
> no object DCH for MIME type multipart/mixed;
> boundary="----=_Part_0_1399981359.1658719078369"
>
> I've confirmed the code works as expected without the security
> manager. From searching around, it seems like the issue is that the
> Activation jar can't read configuration settings in
> javax-mail-1.6.2.jar/META-INF
>
> javax-mail-1.6.2.jar is in $CATALINA_BASE/lib
>
> I've tried various workarounds (setting mailcap values, and setting
> class loader) that are suggested on Stack Exchange but they don't
> help. Does anyone have any ideas of what I should put in the
> catalina.policy to allow this? Should I move the javax-mail.jar?
>
> System Information:
>
> Tomcat: 9.0.65
> OS: OpenSuse
> Java Mail Version: 1.6.2
> JDK: OpenJDK 11.0.15 22-04-19
>
> Any help would be appreciated.
>
>
--
George Sexton
(303) 438 9585 x102
MH Software, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org