EJB error due to NoPermissionException on JNDI lookup of JDBC datasource
(Doc ID 878116.1)
Last updated on AUGUST 26, 2020
Applies to:
Oracle WebLogic Server - Version 8.1 and laterInformation in this document applies to any platform.
***Checked for relevance on 17-Jul-2013***
Symptoms
When trying to lookup JDBC datasource inside EJB create method, the following NoPermissionException was thrown:
com.examples.sessionbean.client.Client" com.examples.sessionbean.client.ClientException in thread "main" javax.naming.NoPermissionException: <USERNAME> does not have permission on StatelessHello to perform lookup operation. [Root exception is javax.naming.NoPermissionException: <USERNAME> does not have permission on StatelessHello to perform lookup operation.]
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jndi.internal.ServerNamingNode_1001_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:379)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.examples.sessionbean.client.Client.main(Client.java:34)
Caused by: javax.naming.NoPermissionException: User <anonymous> does not have permission on StatelessHello to perform lookup operation.
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jndi.internal.ServerNamingNode_1001_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:379)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.examples.sessionbean.client.Client.main(Client.java:34)
Caused by: javax.naming.NoPermissionException: User <anonymous> does not have permission on StatelessHello to perform lookup operation.
Changes
In admin console, JNDI under security policies group was changed from "everyone" to a specified group for testing.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |