javax.naming.NoPermissionException:用户匿名没有 JNDINAME 执行查找操作的权限
我在我的 weblogic 服务器(版本 10.3)上配置了 3 个 JDBC 连接池。我可以看到池在服务器中正确初始化,但是每当我尝试从 Spring 服务进行查找时,我都会得到以下信息:
调用init方法失败;嵌套异常是 javax.naming.NoPermissionException:用户匿名没有 JNDINAME 执行查找操作的权限。 JNDINAME 是 JNDI 名称。
这里可能有什么问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在域配置/安全中,选中“启用匿名管理员查找”
in domain configuration /security, check "Anonymous Admin Lookup Enabled"
您的线程正在使用未知或匿名用户运行,并且该用户无权在 jndi 树上查找数据 src。
我会检查数据源和域的安全设置。在 weblogic 中,您可以通过管理控制台、数据源设置或 jndi 树来执行此操作。
如果是远程查找,您将需要在域之间设置信任。
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.