db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SML <de-...@lafn.org>
Subject Database not found while in Tomcat / jsp
Date Wed, 10 Nov 2004 11:07:58 GMT
Hello!

I'm trying to integrate a derby db with a jsp page for a school project, and, while I can
access the db via the ij tool, all attempts to access the db from within a jsp page have failed.
I'm starting tomcat from within Eclipse.

I've googled and googled, but cannot find a solution.

The derby database files are located in the project's WEB-INF/lib directory and the jsp page
is located in a directory just under the root.

Many thanks in advance for any help you might be able to offer.



**** the jsp page
<%@ page import="java.sql.*" %>

<%
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
	Connection conn = DriverManager.getConnection("jdbc:derby:RecordAppDB;")
	Statement s = conn.createStatement();	
	String sql = "SELECT * FROM tblStudent";
	ResultSet rs = s.executeQuery( sql );
	rs.close();
	s.close();
	DriverManager.getConnection("jdbc:derby:;shutdown=true");
%>



***** Error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling
this request.

exception
javax.servlet.ServletException: Database 'RecordAppDB' not found.

root cause
SQL Exception: Database 'RecordAppDB' not found.

Mime
View raw message