Why JBoss throws SecurityException Access to default session denied ?
Issue
- Sometimes the following error is seen when using
getDefaultInstance()
method in EAP 6
15:46:25,006 ERROR [stderr] (Thread-158) Exception in thread "Thread-158" java.lang.SecurityException: Access to default session denied
15:46:25,007 ERROR [stderr] (Thread-158) at javax.mail.Session.getDefaultInstance(Session.java:320)
15:46:25,007 ERROR [stderr] (Thread-158) at aaa.bbb.ccc.ddd.eee.xyz(eee.java:57)
15:46:25,007 ERROR [stderr] (Thread-158) at aaa.bbb.ccc.fff.pqr(fff.java:1704)
15:46:25,007 ERROR [stderr] (Thread-158) at aaa.bbb.ccc.fff.run(fff.java:897)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.