• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

excepttion in thread "main" java.sql.SQLException: Io exception: The Network Adapter

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
know this has been posted repeatedly. However, I have tried all the generic solutions Mine is a little different.

1. I can connect with SQLPLUS to the database. I am on windows XP connecting to Oracle 10g on a Solaris box. So the listener is running.

2. Here is my tnsnames.ora entry which works with SQLPLUS:
I can tnsping this address





I am trying to run the following sample code:



I also used the following IP
 
Ryan G Johnson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also use the following:

 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you grabbed the latest driver from Oracle? Just to be sure, I'd also double check to make sure the orrect driver jar was being used.
 
Ryan G Johnson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using the same driver as other people i work with who can connect.
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oracle service names and SIDs aren't the same thing. I wonder if the problem may be related to that? Your tnsnames entry describes the value as a service name, but in the oracle-style connection structure you say it is a SID. If you know the listener uses the same value for both SID and service name obviously it shouldn't matter, but if they differ, I suspect that is what you may be tripping over. You should only need to use the simpler form, the URL-based on, in any case. For 10g I'm pretty sure you specify the service name in the URL, not the SID, if you find the listener values differ.
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Reid M. Pinchback:
Oracle service names and SIDs aren't the same thing.


What Reid said...

If you're using a service name, the URL syntax changes; the port is seperated from the service name by a "/".

Try:

See:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#05_04
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic