db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <edenc...@gmail.com>
Subject derby embedded
Date Fri, 08 Apr 2005 04:02:52 GMT
Hi,

thanks to all who pointed out I shouldn't be running tomcat as *root*.


I need to clarify this:
If I'm running derby using the EmbeddedDriver class,
I cannot use a connection pool?
Does that make sense, I'd tend to think so.

using this code I get a connection noprobs:
 ___________________________
/
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
Connection con =
DriverManager.getConnection("jdbc:derby:/myPrgs/jav/dby10/lukeDB3");
\____________________________

however the following doesn't give me a connection 
 _____________________
/
Context init = new InitialContext();
Context ctx = (Context)init.lookup ("java:comp/env");
DataSource ds = (DataSource)ctx.lookup("jdbc/lukedb3");
Connection con = ds.getConnection ();
\_______________________
RESOURCES for this *are* defined in context.xml!

and complains at runtime that it:
 _______________________
/
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class
\_______________________




-- 
............._
:|  .| |.|/.|_ 
:|__.|_|.|\.|_
:0421 276 282.

Mime
View raw message