jboss with oracle db - connection issue

瘦欲@ 提交于 2019-12-24 16:24:57

问题


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...

来源:https://stackoverflow.com/questions/5148367/jboss-with-oracle-db-connection-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!