Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8125347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:47:08+00:00 2026-06-06T06:47:08+00:00

I am trying to connect to a remote oracle database server in Java with

  • 0

I am trying to connect to a remote oracle database server in Java with the following code:

public static Connection getConexionOracle () {
    Connection con = null;
    try {
        Class.forName("oracle.jdbc.driver.OracleDriver");
        con = DriverManager.getConnection("jdbc:oracle:thin:@//oracle.vital.com.mx:1521:XE","username","password");
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    } catch (SQLException e) {
        e.printStackTrace();
    }
    return con;
}

I am using Oracle g11 Releas 2 and I already included the ojdbc.jar in my build path.
When trying to establish the connection, I get the following stack trace error:

java.sql.SQLException: Error de E/S: The Network Adapter could not establish the connection
 [java]     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
 [java]     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
 [java]     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
 [java]     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
 [java]     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
 [java]     at java.sql.DriverManager.getConnection(Unknown Source)
 [java]     at java.sql.DriverManager.getConnection(Unknown Source)
 [java]     at vital.tde.general.Conexion.getConexionOracle(Conexion.java:22)
 [java]     at vital.tde.general.Prueba.doGet(Prueba.java:35)
 [java]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 [java]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 [java]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
 [java]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 [java]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
 [java]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
 [java]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 [java]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
 [java]     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
 [java]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 [java]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
 [java]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
 [java]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
 [java]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
 [java]     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
 [java]     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 [java]     at java.lang.Thread.run(Unknown Source)
 [java] Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
 [java]     at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
 [java]     at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
 [java]     at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
 [java]     at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
 [java]     at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
 [java]     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
 [java]     ... 26 more
 [java] Caused by: java.net.UnknownHostException: //oracle.vital.com.mx
 [java]     at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
 [java]     at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
 [java]     at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
 [java]     at java.net.InetAddress.getAllByName0(Unknown Source)
 [java]     at java.net.InetAddress.getAllByName(Unknown Source)
 [java]     at java.net.InetAddress.getAllByName(Unknown Source)
 [java]     at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:117)
 [java]     at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
 [java]     at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:370)
 [java]     ... 31 more

I already tried the following and I still get the error:

  1. Ping oracle.vital.com.mx (get response)
  2. Telnet oracle.vital.com.mx 1521 (get response)
  3. Disable Server Firewall

Which solution do you suggest to this problem? I would really appreciate your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:47:09+00:00Added an answer on June 6, 2026 at 6:47 am
     [java] Caused by: java.net.UnknownHostException: //oracle.vital.com.mx
    

    Try removing “//” in your connection string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to a remote database using the following java code, but
I'm trying to connect to a remote database. Here's my code:- php $con =
I am trying to connect to my mysql database on a remote server (via
I am trying to connect to my remote oracle database, and it is locked
Hey guys im trying to connect to my remote mysql database and my code
I'm trying to connect to a remote MySQL server via SSH in my Java
I'm trying to connect to a MySQL database on a remote server using MySQLdb
I'm trying to connect to remote MySQL server with SSL from PHP using mysql_connect:
I am trying to connect to a remote mysql database from an iPhone. I
When I am trying to connect to my SVN repository on some remote server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.