Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JDBC- Oracle RAC URL

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting "java.sql.SQLException NL Exception was generated" when connecting to Oracle 11.2 Database. Driver used- Oracle Thin,(ojdbc5.jar).
I am using RAC URL like this-

Any idea?
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you copy and paste the SID from somewhere as all those hosts sharing the port looks a bit suspicious to me.

it is where i would start looking.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the hosts could no be reached, it would give a different exception (I'd say). Of course, the connection string can (and should!) be verified using TNSPING.

I've never heard of the NL Exception, but a cursory search on the net shows it is a wild beast. I'll move this question to our Oracle forum, where our Oracle folks hang out.

Also, ojdbc5.jar comes in different versions. You might try to download the most recent one.
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Wendy Gibbons wrote:did you copy and paste the SID from somewhere as all those hosts sharing the port looks a bit suspicious to me.

it is where i would start looking.


I copied from tnsnames.ora file from database server. All port values are 1521. I will try using ojdbc6.jar
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used Service URL and was able to connect.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic