Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

kishor Das

Greenhorn
+ Follow
since Nov 04, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kishor Das

Tried above code on eclipse as well. But faced same issue.
On registering DriverManager explicitly the issue was resolved:


Can someone tell me why that was required when driver registration was supposed to be done automatically?
2 years ago
Hi Friends,
I am using Netbeans 8.2
Below is the code that I am using for a test program:


I have added ojdbc7 jar using project > properties > libraries > add jar/folder option

If I am executing my DAO class code using main method, It is able to connect to DB.
but when triggered by jsp > servlet > dao. It leads to below error:


Mar 03, 2018 12:47:22 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/SimpleProject] has started
Mar 03, 2018 12:47:22 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 03, 2018 12:47:22 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/SimpleProject] is completed
User Name:m
Password :n
DEBUG   2018-03-03 12:47:30,298 [http-apr-9001-exec-65] dao.UserLoginDao  - Query executed :Insert into test1(name,id) values(?,?)
ERROR   2018-03-03 12:47:30,298 [http-apr-9001-exec-65] dao.UserLoginDao  - Error due to :java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1521:xe
Log4J configuration file :E:\tomcat\bin\log4j.properties
DEBUG   2018-03-03 12:47:30,314 [http-apr-9001-exec-65] dao.UserLoginDao  - Created user:0