• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Unable to connect using JDBC

 
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I am connecting to Oracle 11g from JDBC, but I get TimedOut Exception.



Below is my Connection String



Below is my TNS entries,



But I am able to establish a connection from Sql*Plus.

Any thoughts on this exception.
 
Greenhorn
Posts: 4
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ashwin,
Is this a local database? If not can you please try entering the DB URL instead of localhost in the connection parms, or the IP address of the database
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP of the database>)(PORT = 1599))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = Test)
)


Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@<IP/URL of database>:1599:TEST",USERNAME,PASSWORD);
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sai,

The DB Url also throws me the same exception. I tried to do a tnsping, I am able to retreive the some bytes. I am planning to re-install Oracle.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic