Skip to content
Advertisement

No suitable driver found for Oracle Database connection

I have small Java Application, which execute every day and checks for data in database using Cronj Schedular and everything works fine, but recently I have observed that, it is failing due to

JavaScript

At the same time, when I run my test code to check Database connectivity that works fine without above exception. I’m unable to figure it out. Although, there was just slight code change, but that was nowhere related to Database or Database connection. Anyone, help me on this ?

dbconf.java

JavaScript

I’m using ojdbc6.jar and Oracle11g

Edited – Application Log file

JavaScript

So, you can see, It failed on 3rd and 6th July. But, in between it ran fine.

==Update 1==

It seems, nobody is reading my question properly, I have clearly mentioned that, It is running fine for someday, but someday it is failing. If it was classpath issue, then It shouldn’t have ran any day.

===Update 2===

Many of below answers were pointless, but few were having some logical view. I have used printStracktrace and tried to debug each point and finally I got some clue. 3 Days back, I deployed new version of application on the same server (included printStackTrace and SysOut), First 2 days It ran fine, today it Failed with following error.

JavaScript

Advertisement

Answer

As someone approached me for the solution of this issue. I’m posting it now.

  1. I undeployed the application, which was having this issue and cleaned up all related files from the server.
  2. Then, I restarted the tomcat server. So that, it will flush up all temporary files and cache.
  3. Then, I deployed the same application and it started working without any issue.
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement