WebSphere 到 Oracle - 不接受正确的密码
在 WebSphere 6.1 中,我使用瘦 JDBC 客户端创建了 Oracle 11g 实例的数据源。
在 Oracle 中,我有两个用户,一个是现有用户,另一个是新创建的。
如果我使用现有用户的组件管理的身份验证别名,我的 websphere 数据源没问题,但如果我使用新用户的别名,则会失败并显示“无效的用户/密码”消息。错误消息是:
The test connection operation failed for data source MyDB (Non-XA) on
server nodeagent at node MY_node with the following exception:
java.sql.SQLException: ORA-01017: invalid username/password;
logon denied DSRA0010E: SQL State = 72000, Error Code = 1,017.
View JVM logs for further details.
JVM 日志中没有任何内容。我已经 grep 了所有 websphere 日志,但它们根本没有提到我的连接。
我可以通过 SQLPlus 登录或通过 SQuirreL 登录(以证明 JDBC 连接正常)来确认用户名和密码是否正确。
我已经在 Oracle 中检查过,新用户拥有现有用户拥有的所有系统权限。
关于发生了什么或者我如何进一步调试这个问题有什么想法吗?
In WebSphere 6.1 I have created a datasource to an Oracle 11g instance using the thin JDBC client.
In Oracle I have two users, one existing and another newly created.
My websphere datasource is OK if I use the component-managed authentication alias of the existing user, but fails with "invalid user/password" message if I use the alias of the new user. The error message is:
The test connection operation failed for data source MyDB (Non-XA) on
server nodeagent at node MY_node with the following exception:
java.sql.SQLException: ORA-01017: invalid username/password;
logon denied DSRA0010E: SQL State = 72000, Error Code = 1,017.
View JVM logs for further details.
There is nothing in the JVM logs. I have grepped all websphere logs and they do not mention my connection at all.
I can confirm that the username and password are correct by logging in via SQLPlus or (to prove the JDBC connection is OK) via SQuirreL.
I have checked in Oracle that the new user has all the system privs that the existing user has.
Any thoughts on what is going on or how I can debug this further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
仅供参考。我猜您正在网络部署模式下运行 WebSphere。
您遇到的这种行为实际上是设计使然。
原因是您在管理控制台上看到的“测试连接”按钮从节点代理进程内调用 JDBC 连接测试。如果不重新启动节点代理,则无法将 J2C 别名信息传播到节点代理;有些配置对象在将配置保存到主存储库后立即在 WebSphere 中生效,有些配置对象仅在重新启动时生效。 J2C 别名在重新启动时生效。
在网络部署拓扑中,您可以拥有由同一节点代理控制的任意数量的服务器实例。您可以根据需要重新启动服务器实例,但除非重新启动节点代理本身,否则“测试连接”按钮将永远不会起作用。
这是一个已知的 WebSphere 限制...版本 7.0 中也存在该限制,因此当您在下次迁移期间测试它时,请不要感到惊讶。 :-)
Just FYI. I am guessing you are running WebSphere in Network Deployment mode.
This behavior you're experiencing is actually by design.
The reason for it is that the "Test Connection" button you see on the admin console, invokes the JDBC connection test from within the process of the Node Agent. There is no way for the J2C Alias information to propagate to the Node Agent without restarting it; some configuration objects take effect in WebSphere as soon as you save the configuration to the master repository, and some only take effect on a restart. J2C aliases take effect on restarts.
In a Network Deployment topology, you may have any number of server instances controlled by the same Node Agent. You may restart your server instances as you'd like, but unless you restart the Node Agent itself, the "test connection" button will never work.
It's a known WebSphere limitation... Which also exists on version 7.0, so don't be surprised when you test it during your next migration. :-)
如果其他人也遇到这种情况,我会重新启动 WebSphere,所有问题都会消失。这是高质量软件的真正标志。
If this happens to anyone else, I restarted WebSphere and all my problems went away. It's a true hallmark of quality software.
通常,当人们告诉我他们无法使用正确的密码登录 Oracle 11g 时,我知道他们已经被 10g 和 11g 之间的密码区分大小写所困扰。
Oftentimes when people tell me they can't log into Oracle 11g with the correct password, I know they've been caught out by passwords becoming case-sensitive between 10g and 11g.
试试这个:
数据源定义
安全
使用 j2c 别名,由组件管理的身份验证和由容器管理的身份验证
Try this :
data source definition
security
use the j2c alias both autentication managed by component and autentication managed by container
IBM WAS 8.5 .5 知识中心 -
管理 JAAS 的 Java 2 连接器架构身份验证数据条目
如果您创建或更新指向新创建的 J2C 身份验证数据别名的数据源,测试连接将无法连接直到您重新启动部署管理器。
重新启动部署管理器后,J2C 身份验证数据将反映在运行时配置中。对 J2C 身份验证数据字段的任何更改都需要重新启动 Deployment Manager 才能使更改生效。
还必须重新启动节点代理。
IBM WAS 8.5.5 Knowledge Center -
Managing Java 2 Connector Architecture authentication data entries for JAAS
If you create or update a data source that points to a newly created J2C authentication data alias, the test connection fails to connect until you restart the deployment manager.
After you restart the deployment manager, the J2C authentication data is reflected in the runtime configuration. Any changes to the J2C authentication data fields require a deployment manager restart for the changes to take effect.
The node agent must also be restarted.
我已将我的数据源指向组件网络管理身份验证以及容器管理身份验证。它现在工作正常........
I have point my data source to componenet-manage authentication as well as container-managed authentication.Its working fine now........