db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: newbie: Eclipse Java EE 1.2.1 and Derby 10.5.3: DataSource invalid
Date Tue, 05 Jan 2010 12:44:06 GMT

Hi Mikael,

this is an Eclipse issue as far as I can see: The Derby client driver
is not on the classpath for some reason, so
org.apache.derby.jdbc.ClientDriver cant be found. I suggest you ask
some Eclipse experts.


Mikael Byström <micke.bystrom@gmail.com> writes:

> Hi, 
> I followed this article: "Creating Database Web Applications with
> Eclipse" <http://www.eclipse.org/articles/article.php?file=Article-
> EclipseDbWebapps/index.html> using Eclipse Java EE 
> Apache Derby 10.5.3 and jakarta-taglibs-standard-1.1.2 to the letter,
> except using later versions of Eclipse and Derby. All this running in
> Apache Tomcat 5.5.28 under builtin J2SE-05 of OS X 10.5 (Leopard).
> At "Testing the Application" when I run the demo.jsp on Server I get the
> following root cause error: 
> javax.servlet.ServletException: Unable to get connection, DataSource
> invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load
> JDBC driver class 'org.apache.derby.jdbc.ClientDriver'"
> 	org.apache.jasper.runtime.PageContex
> tImpl.doHandlePageException(PageContextImpl.java:841)
> 	org.apache.jasper.runtime.PageContex
> tImpl.handlePageException(PageContextImpl.java:774)
> 	org.apache.jsp.demo_jsp._jspService(demo_jsp.java:101)
> 	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> 	org.apache.jasper.servlet.JspServlet
> Wrapper.service(JspServletWrapper.java:331)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> possibly indicating some problem with the jdbc driver. However  if I
> startup "ij" I can use the connection string: 
> connect 'jdbc:derby://localhost:1527/sample'; 
> which is the same DB URL as in my context.xml file and I can then
> execute SQL commands within that connection. 
> I'm not a newbie to core java, but I am new to both the Eclipse Java EE
> app and Derby. Any pointers in finding start points for analyzing these
> errors or a better approach for creating a database connection reliably
> in Eclipse Java EE with derby would be most helpful.
> /MB

Dag H. Wanvik, staff engineer
Sun Microsystems, Java Core and Desktop - Java DB/Derby
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101
Sun IM: dw136674, Yahoo IM: dag_h_wanvik

View raw message