Hi Stephen, it works! Thank you so much!
Regards, Mauricio On Thu, Aug 6, 2009 at 12:27 PM, Stephen Connolly<stephen.alan.conno...@gmail.com> wrote: > have you tried adding it as a dependency of the tomcat plugin? > e.g. > > <plugins> > <plugin> > ... > <artifactId>tomcat-maven-plugin</artifactId> > ... > <dependencies> > <dependency> > <groupId>hsqldb</groupId> > <artifactId>hsqldb</artifactId> > <version>1.8.0.7</version> > </dependency> > </dependencies> > > -Stephen > > 2009/8/6 Mauricio Hiroshi Nagaoka <mhnaga...@gmail.com> >> >> Ok, I've added this snippet below to the end of my pom.xml: >> >> <profiles> >> <profile> >> <id>test</id> >> <dependencies> >> <dependency> >> <groupId>hsqldb</groupId> >> <artifactId>hsqldb</artifactId> >> <version>1.8.0.7</version> >> </dependency> >> </dependencies> >> </profile> >> </profiles> >> >> and tried: mvn tomcat:run -Ptest >> >> But I'm still getting the same exception. >> >> On Thu, Aug 6, 2009 at 11:51 AM, Olivier Lamy<ol...@apache.org> wrote: >> > Hi, >> > The best could be add this dependency in a profile (called test or >> > hsqldb ?) and run : tomcat:run -Ptest or -P hsqldb (so test is shorter >> > for fingers :-) ). >> > >> > -- >> > Olivier >> > >> > 2009/8/6 Mauricio Hiroshi Nagaoka <mhnaga...@gmail.com>: >> >> Hi! >> >> >> >> I'm trying to run my web app on a local Tomcat instance using mvn >> >> tomcat:run. However, during the app startup, I got the following >> >> exception: >> >> >> >> 2009-08-06 11:18:35,913 WARN SettingsFactory - Could not obtain >> >> connection metadata >> >> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC >> >> driver class 'org.hsqldb.jdbcDriver' >> >> at >> >> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136) >> >> at >> >> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) >> >> at >> >> org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82) >> >> ... >> >> Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver >> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:200) >> >> at java.security.AccessController.doPrivileged(Native Method) >> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:319) >> >> at >> >> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195) >> >> at >> >> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255) >> >> at >> >> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274) >> >> at >> >> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:254) >> >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402) >> >> at java.lang.Class.forName0(Native Method) >> >> at java.lang.Class.forName(Class.java:169) >> >> at >> >> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130) >> >> ... 69 more >> >> >> >> This is probably because I need to copy the JDBC driver jar file to >> >> the appropriate location. >> >> Usually this file goes on $TOMCAT_HOME/lib folder, but since I'm using >> >> mvn tomcat:run, there is no such $TOMCAT_HOME folder, correct? >> >> So I would like to know where to copy this file to or, if this is not >> >> the case, how to solve this exception. >> >> >> >> Thanks! >> >> Mauricio >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe from this list, please visit: >> >> >> >> http://xircles.codehaus.org/manage_email >> >> >> >> >> >> >> > >> > >> > >> > -- >> > Olivier >> > >> > --------------------------------------------------------------------- >> > To unsubscribe from this list, please visit: >> > >> > http://xircles.codehaus.org/manage_email >> > >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email