This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to connect using JDBC

 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • 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.
 
Sai Rao
Greenhorn
Posts: 4
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • 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("jdbcracle:thin:@<IP/URL of database>:1599:TEST",USERNAME,PASSWORD);
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic