Cannot create JDBC driver of class '' for connect URL 'null' (Postgres DB with Tomcat server)?

Up vote 0 down vote favorite share g+ share fb share tw.

I'm trying to run some code on my webapp that connects to a Postgres SQL database, but when I execute my code, I keep getting this exception: org.apache.jasper. JasperException: javax.servlet. ServletException: org.apache.commons.dbcp.

SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet. JspServletWrapper. HandleJspException(JspServletWrapper.

Java:491) org.apache.jasper.servlet. JspServletWrapper. Service(JspServletWrapper.

Java:401) org.apache.jasper.servlet.JspServlet. ServiceJspFile(JspServlet. Java:313) org.apache.jasper.servlet.JspServlet.

Service(JspServlet. Java:260) javax.servlet.http.HttpServlet. Service(HttpServlet.

Java:717) root cause javax.servlet. ServletException: org.apache.commons.dbcp. SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.runtime.PageContextImpl.

DoHandlePageException(PageContextImpl. Java:862) org.apache.jasper.runtime.PageContextImpl. HandlePageException(PageContextImpl.

Java:791) org.apache.jsp. ResellerApplications_jsp. _jspService(resellerApplications_jsp.

Java:251) org.apache.jasper.runtime.HttpJspBase. Service(HttpJspBase. Java:70) javax.servlet.http.HttpServlet.

Service(HttpServlet. Java:717) org.apache.jasper.servlet. JspServletWrapper.

Service(JspServletWrapper. Java:377) org.apache.jasper.servlet.JspServlet. ServiceJspFile(JspServlet.

Java:313) org.apache.jasper.servlet.JspServlet. Service(JspServlet. Java:260) javax.servlet.http.HttpServlet.

Service(HttpServlet. Java:717) root cause org.apache.commons.dbcp. SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.commons.dbcp.BasicDataSource.

CreateConnectionFactory(BasicDataSource. Java:1452) org.apache.commons.dbcp.BasicDataSource. CreateDataSource(BasicDataSource.

Java:1371) org.apache.commons.dbcp.BasicDataSource. GetConnection(BasicDataSource. Java:1044) db.

DbConnectionPool. GetConnection(DbConnectionPool. Java:36) model.AdminModel.

GetResellerApplications(AdminModel. Java:20) org.apache.jsp. ResellerApplications_jsp.

_jspService(resellerApplications_jsp. Java:98) org.apache.jasper.runtime.HttpJspBase. Service(HttpJspBase.

Java:70) javax.servlet.http.HttpServlet. Service(HttpServlet. Java:717) org.apache.jasper.servlet.

JspServletWrapper. Service(JspServletWrapper. Java:377) org.apache.jasper.servlet.JspServlet.

ServiceJspFile(JspServlet. Java:313) org.apache.jasper.servlet.JspServlet. Service(JspServlet.

Java:260) javax.servlet.http.HttpServlet. Service(HttpServlet. Java:717) root cause java.lang.

NullPointerException org.postgresql.Driver. ParseURL(Driver. Java:567) org.postgresql.Driver.

AcceptsURL(Driver. Java:412) java.sql.DriverManager. GetDriver(DriverManager.

Java:268) org.apache.commons.dbcp.BasicDataSource. CreateConnectionFactory(BasicDataSource. Java:1437) org.apache.commons.dbcp.BasicDataSource.

CreateDataSource(BasicDataSource. Java:1371) org.apache.commons.dbcp.BasicDataSource. GetConnection(BasicDataSource.

Java:1044) db. DbConnectionPool. GetConnection(DbConnectionPool.

Java:36) model.AdminModel. GetResellerApplications(AdminModel. Java:20) org.apache.jsp.

ResellerApplications_jsp. _jspService(resellerApplications_jsp. Java:98) org.apache.jasper.runtime.HttpJspBase.

Service(HttpJspBase. Java:70) javax.servlet.http.HttpServlet. Service(HttpServlet.

Java:717) org.apache.jasper.servlet. JspServletWrapper. Service(JspServletWrapper.

Java:377) org.apache.jasper.servlet.JspServlet. ServiceJspFile(JspServlet. Java:313) org.apache.jasper.servlet.JspServlet.

Service(JspServlet. Java:260) javax.servlet.http.HttpServlet. Service(HttpServlet.

Java:717) I've looked all over the internet for a solution, and I'm pretty sure it's probably something wrong with one of my configuration XML files, but I'm not really sure which one. Either that, or somehow I'm misplacing my . Jar file for the Postgres JDBC driver (but I have it under (Tomcat directory)/common/lib)... I see this line in my logs but I'm not sure if it's relevant or not.

SEVERE: The web application /GreenOnionsSupply registered the JBDC driver org.postgresql. Driver but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

META-INF/context. Xml: WEB-INF/web. Xml: ... Database Resource jdbc/GreenOnions javax.sql.

DataSource Container ... tomcat6/server. Xml Sorry for the giant wall of text, but I really hope someone can help me here! This is driving me nuts... java postgresql tomcat jdbc link|improve this question asked Jan 6 at 1:02Raymond6219 89% accept rate.

I guess I should've read StackOverflow more clearly... stackoverflow.com/questions/7274722/… – Raymond Jan 9 at 19:41.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions