Oracle XA 客户端的 JDBC URL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3765596/
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-18 21:33:12  来源:igfitidea点击:

JDBC URL for Oracle XA client

oracleurljdbc

提问by Synesso

Using the JDBC driver oracle.jdbc.xa.client.OracleXADataSource, what is the correct format of the JDBC URL? The thin format of

使用 JDBC 驱动程序 oracle.jdbc.xa.client.OracleXADataSource,JDBC URL 的正确格式是什么?瘦格式

jdbc:oracle:thin:@host:port:sid 

does not work. WebSphere is reporting that the given url (which is otherwise correct) is invalid.

不起作用。WebSphere 报告给定的 url(否则是正确的)无效。

The test connection operation failed for data source Oracle MyDB (XA) on 
server nodeagent at node MY_node with the following exception: 
java.sql.SQLException: Invalid Oracle URL specifiedDSRA0010E: SQL State = 99999, 
Error Code = 17,067. View JVM logs for further details.

There is nothing in the JVM logs.

JVM 日志中没有任何内容。

采纳答案by Pascal Thivent

Whether you use a XA Driver or not, the JDBC connection string is the same (and the format of your question is correct).

无论您是否使用 XA 驱动程序,JDBC 连接字符串都是相同的(并且您的问题的格式是正确的)。

回答by vishnu viswanath

For me the issue resolved by adding alias name, username and password in JAAS - J2C authentication data. And also selecting this entry as Component-managed authentication alias.

对我来说,问题是通过在 JAAS - J2C 身份验证数据中添加别名、用户名和密码来解决的。并且还选择此条目作为组件管理的身份验证别名。

回答by Synesso

In case this happens to anyone else. The problem went away after restarting websphere.

万一其他人发生这种情况。重新启动 websphere 后问题就消失了。

回答by Alex

In my case, the problem went away when I change the authentication property of the jdbc resource reference from Authentication=Applicationto Authentication=Container

就我而言,当我将 jdbc 资源引用的身份验证属性从Authentication=Application更改为Authentication=Container

回答by Eduard Korenschi

Had the same issue. Dont know about simple deployments, but on a two nodes cluster, I restarted the first node, and the connection started working on it (not on the second). Restarted the second node, and the connection started working there too.

有同样的问题。不知道简单的部署,但是在一个双节点集群上,我重新启动了第一个节点,并且连接开始在它上面工作(而不是在第二个节点上)。重新启动第二个节点,连接也开始在那里工作。

So just restart the nodes (I also restarted the nodeAgents, but i don't know if it's necessary).

所以只需重新启动节点(我也重新启动了 nodeAgents,但我不知道是否有必要)。

回答by Amit Sharma

if you are doing using wsadmin command then you need to stop manager,stop node,start manager, sync node and then start node (I mean full sync). Hopefully this will resolve the issue. I dont know why but this resolves my issue.

如果您正在使用 wsadmin 命令,那么您需要停止管理器、停止节点、启动管理器、同步节点,然后启动节点(我的意思是完全同步)。希望这将解决问题。我不知道为什么,但这解决了我的问题。