jboss 与 oracle db - 连接问题
我花了两个小时在连接到 Oracle DB 的 Jboss 服务器上部署应用程序。
dbname-ds.xml 具有:
<datasources>
<local-tx-datasource>
<jndi-name>dbnameDatasource</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:oracle:thin:@192.168.168.105:1521:XE</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>system</user-name>
<password>password</password>
</local-tx-datasource>
</datasources>
凭据正常,因为我已经使用 Oracle 的 DataBase 主页工具对其进行了测试。
我在 jboss 中收到的错误是:
00:14:28,383 INFO [ConnectionProviderFactory] Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
00:14:28,389 INFO [InjectedDataSourceConnectionProvider] Using provided datasou
rce
00:14:49,476 WARN [JBossManagedConnectionPool] Throwable while attempting to ge
t a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (java.sql.SQLException: Io exception: The Network Adapter could not
establish the connection)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.g
etLocalManagedConnection(LocalManagedConnectionFactory.java:225)
//etc
并由以下原因引起:
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not es
tablish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
你知道去哪里看吗?
我还将 ds 文件中的默认 localhost 修改为我的 ip:
(地址 =(协议 = TCP)(主机 = 192.168.168.105)(端口 = 1521))
因此主机和端口是正确的。
还有什么原因......?
多谢...
I'm struggling for two hours to deploy an application on Jboss server which connects to my Oracle DB.
The dbname-ds.xml has:
<datasources>
<local-tx-datasource>
<jndi-name>dbnameDatasource</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:oracle:thin:@192.168.168.105:1521:XE</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>system</user-name>
<password>password</password>
</local-tx-datasource>
</datasources>
The credentials are ok because I've tested them using DataBase home page tool from Oracle.
The error I receive in jboss is:
00:14:28,383 INFO [ConnectionProviderFactory] Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
00:14:28,389 INFO [InjectedDataSourceConnectionProvider] Using provided datasou
rce
00:14:49,476 WARN [JBossManagedConnectionPool] Throwable while attempting to ge
t a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (java.sql.SQLException: Io exception: The Network Adapter could not
establish the connection)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.g
etLocalManagedConnection(LocalManagedConnectionFactory.java:225)
//etc
and caused by:
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not es
tablish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
Do you have any idea where to look?
I've also modified the default localhost to be my ip from ds file:
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.105)(PORT = 1521))
so the host and port is correct.
What else can be the cause...?
Thanks a lot...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论