I was not aware of the format you suggested so I googled and found a link [ http://www.orafaq.com/wiki/JDBC ] with relevant information that gave me clue what you meant to convey. Then I came to know about TNSNAMES.ORA file [ link http://www.orafaq.com/wiki/Tnsnames.ora ], when I opened this file I found that I was giving wrong HOST name. Here is the code in TNSNAMES.ORA file
I tried multiple combination for connection.url property but with no luck. I tried below combination:
but still getting No suitable driver found for oracle:jdbc:thin:@//AmritP.nbin.local:1521/XE Or No suitable driver found for oracle:jdbc:thin:@AmritP.nbin.local:1521:XE respectively for above two combination.
With further curiosity, I wrote a JDBC program using oracle driver and used the same url what I was putting in hibernate.cfg file. The program was running fine without any exception. Here is the connection I used in my jdbc program [I changed <HOST> value in TNSNAMES.ORA file from "AmritP.nbin.local" to "localhost"]
As the URL in both the places [JDBC program/ hibernate.cfg] are same , can there any problem with loading of "OracleDriver" in hibernate (as we are not using class.forename() explicitly in hibernate- just a guess) ??
Amrit, what i said earlier, I'm saying now. In your JDBC program, you have the connection url as "jdbc:oracle:thin:@localhost:1521:XE", and in your hibernate cfg file, it is "oracle:jdbc:thin:@localhost:1521:xe". Can you spot the difference?
Googling doesn't make you a genius. But not Googling makes you dumber.
Hmmmm.... Got your point.. Many many thanks Prabhaharan!! Committing this kind of mistake is a crime...Such a silly mistake!! I changed the URL , now I am not getting that issue but still I am getting other issues related to cglib library. If you see the 1st error log I had posted, was another exception that was being thrown
I updated the build path with "cglib2.2.jar". Later I was getting "asm" related exception which was resolved by updating the build path with the jar "asm-4.0.jar". Now there is a new exception that is thrown when I am trying to run the application. The error trace is:
Thanks & Regards,
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop