Why JBoss throws SecurityException Access to default session denied ?

Solution Unverified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content