我正在努力在连接到我的Oracle数据库的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)
//等
由以下原因引起:
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
你知道在哪里看吗?
我还将默认的localhost从ds文件修改为我的ip:
(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.168.105)(PORT = 1521))
所以主机和端口是正确的。
还有什么原因......?
非常感谢...