WebSphere 到 Oracle - 不接受正确的密码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3765568/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 02:47:15  来源:igfitidea点击:

WebSphere to Oracle - doesn't accept correct password

oraclejdbcwebsphereora-01017

提问by Synesso

In WebSphere 6.1 I have created a datasource to an Oracle 11g instance using the thin JDBC client.

在 WebSphere 6.1 中,我使用瘦 JDBC 客户端为 Oracle 11g 实例创建了一个数据源。

In Oracle I have two users, one existing and another newly created.

在 Oracle 中,我有两个用户,一个是现有用户,另一个是新创建的用户。

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:

如果我使用现有用户的组件管理的身份验证别名,我的 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.

There is nothing in the JVM logs. I have grepped all websphere logs and they do not mention my connection at all.

JVM 日志中没有任何内容。我已经搜索了所有 websphere 日志,但他们根本没有提到我的连接。

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.

我可以通过 SQLPlus 或通过 SQuirreL 登录(以证明 JDBC 连接正常)来确认用户名和密码是否正确。

I have checked in Oracle that the new user has all the system privs that the existing user has.

我已经在 Oracle 中检查新用户拥有现有用户拥有的所有系统权限。

Any thoughts on what is going on or how I can debug this further?

关于发生了什么或我如何进一步调试的任何想法?

回答by Isaac

Just FYI. I am guessing you are running WebSphere in Network Deployment mode. This behavior you're experiencing is actually by design.

仅供参考。我猜您正在网络部署模式下运行 WebSphere。您遇到的这种行为实际上是设计使然。

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.

原因是您在管理控制台上看到的“测试连接”按钮从Node Agent进程中调用 JDBC 连接测试。J2C 别名信息无法在不重新启动的情况下传播到节点代理;一些配置对象在您将配置保存到主存储库后立即在 WebSphere 中生效,而一些仅在重新启动时生效。J2C 别名在重新启动时生效。

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.

在 Network Deployment 拓扑中,您​​可能拥有由同一个节点代理控制的任意数量的服务器实例。您可以根据需要重新启动服务器实例,但除非您重新启动节点代理本身,否则“测试连接”按钮将永远不会起作用。

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 限制......它也存在于 7.0 版中,所以当您在下一次迁移期间测试它时不要感到惊讶。:-)

回答by Synesso

If this happens to anyone else, I restarted WebSphere and all my problems went away. It's a true hallmark of quality software.

如果其他人发生这种情况,我会重新启动 WebSphere,然后我所有的问题都消失了。这是优质软件的真正标志。

回答by Gaius

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.

通常,当人们告诉我他们无法使用正确的密码登录 Oracle 11g 时,我知道他们已经被 10g 和 11g 之间的密码区分大小写所吸引。

回答by andrea

Try this : data source definition security use the j2c alias both autentication managed by component and autentication managed by container

试试这个:数据源定义安全使用 j2c 别名,由组件管理的身份验证和由容器管理的身份验证

回答by mon

IBM WAS 8.5.5 Knowledge Center -
Managing Java 2 Connector Architecture authentication data entries for JAAS

IBM WAS 8.5.5 知识中心 -
管理 JAAS 的 Java 2 连接器架构认证数据条目

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.

如果您创建或更新指向新创建的 J2C 认证数据别名的数据源,那么测试连接将无法连接,直到您重新启动部署管理器

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.

重新启动部署管理器后,J2C 认证数据将反映在运行时配置中。对 J2C 认证数据字段的任何更改都需要重新启动部署管理器才能使更改生效。

The node agent must also be restarted.

还必须重新启动节点代理

回答by Radhadatta

I have point my data source to componenet-manage authentication as well as container-managed authentication.Its working fine now........

我已将我的数据源指向组件管理身份验证以及容器管理身份验证。它现在工作正常......