简体   繁体   中英

JBoss7 datasource Connection to Oracle DB Outside Company Firewall - Not Working

I am upgrading from JBoss 5 to JBoss 7. The Oracle DB datasource connection set up in JBOSS 5 works smoothly both inside and ourside company firewall. The Oracle DB datasource connection set up in JBOSS 7 only works inside the firewall. But when I work from home and try to test the datasource connection from outside firewall, I am getting the following error on JBOSS 7 console:


Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
  .........................
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454)
    ........................
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) [rt.jar:1.7.0_45]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) [rt.jar:1.7.0_45]

Here is our datasource config in the standalone.xml file:


<datasources>
  <datasource jta="true" jndi-name="java:/myc3p0DataSource" pool-name="myc3p0DataSource" enabled="true" use-java-context="true" use-ccm="true">
  <connection-url>jdbc:oracle:thin:@dddddbbbbb.company.com:1521:testdb</connection-url>
  <driver>ojdbc6</driver>
  <pool>
      <prefill>true</prefill>
      <use-strict-min>false</use-strict-min>
      <flush-strategy>FailingConnectionOnly</flush-strategy>
  </pool>
  <security>
      <user-name>xxxxxxxxxxxxx</user-name>
      <password>yyyyyyyyyyyyyy</password>
  </security>
 </datasource>
 <drivers>                    
  <driver name="ojdbc6" module="com.oracle">
   <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
  </driver>
  <driver name="ojdbc14" module="com.oracle.ojdbc14">
   <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  </driver>
 </drivers>
</datasources>

Please provide guidance and advice in revolving this issue. Thank you so much and happy holidays.

Check connection to your DB using Oracle SQL Developer, or JPA wizzard or anything else. It may be that your company security policy blocks connections. Or maybe you are connecting through proxy? Or, shouldn't you be connected through VPN? Anyway, check db connection first. If that will work, check if your standalone.xml hasn't definied proxies in it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM