db-derby-user mailing list archives

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

thanks for the reply,
you put me in the right direction.

I only had 'derby.jar' and 'derbytools.jar' in WEB-INF/lib *not* in
commons/lib,

with the jars in WEB-INF/lib the application works only with the
Class.forName construct,

whereas with the jars in common/lib it works with both that and
connection pooling.

I'm curious about why that is, anybody able to explain?

thanks,
kr,
Luke

PS. mails seem to be comin' thru now

On Apr 8, 2005 1:49 PM, Arda M <mardacay@yahoo.com> wrote:
> I remember being able to use the Derby driver in Apache tomcat connection
> pool. But I think I also went through the errors you are getting. Are the
> derby jars in your servers common lib directory? If so, then i think the
> jars should not be in web-inf lib. 
> regards, 
> arda
>  
>   
> 
> 
> edencane@gmail.com wrote: 
> 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.
> 
> 
>  ________________________________
> Do you Yahoo!?
>  Better first dates. More second dates. Yahoo! Personals 
> 
> 


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

Mime
View raw message