Search code examples
weblogicjndiweblogic-10.x

javax.naming.NoPermissionException: User anonymous does not have permission on JNDINAME to perform lookup operation


I have configured 3 JDBC connection pools on my weblogic server (version 10.3) . I can see the pools getting correctly initialised in the server, however whenever I am trying to do a lookup from my spring service I am getting the following:

Invocation of init method failed; nested exception is javax.naming.NoPermissionException: User anonymous does not have permission on JNDINAME to perform lookup operation. JNDINAME is the JNDI name.

What could be the issue here?


Solution

  • Your thread is running using an unknown or anonymous user, And that user doesn't have access to lookup the data src on the jndi tree.

    I would check the security settings on the data src, and the domain. In weblogic you can do that via the admin console, in the data src settings or the jndi tree.

    If its a remote lookup you will need to setup a trust between the domains.