My mistakes

Posts Tagged ‘software

SEVERE: Servlet.service() for servlet EmailServlet threw exception
java.lang.SecurityException: Access to default session denied

Please try the below solutions
1) Verify there is no duplication of javamail.jar in the tomcat or in your application.

Check the tomcat_home/lib , your_app/WEB-INF/lib

2)  Verify you are using only one email configuration to call the Session.getDefaultInstance through out the site.

Because as per the http://docs.oracle.com/javaee/6/api/javax/mail/Session.html#getInstance%28java.util.Properties documentation the replication of the configuration with getDefaultInstance will cause an error.

In such case if you want to insist with the new configuration then use Session.getInstance instead of Session.getDefaultInstance.

Advertisements
Tags:

Blogs I Follow

February 2018
M T W T F S S
« Aug    
 1234
567891011
12131415161718
19202122232425
262728  
Advertisements