-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problems with hibernate tutorial
PostPosted: Thu Feb 14, 2008 9:29 am 
Newbie

Joined: Thu Feb 14, 2008 4:47 am
Posts: 2
Hello!

Hibernate version:
Code:
Build Hibernate-3.2.6.ga (2008-02-14 09:42:02)


Name and version of the database you are using:
Code:
HSQLDB 1.8.0.7


I am doing the tutorial http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html
right now. Everything is fine until this point:
Code:
C:\hibernateTutorial\>ant run -Daction=store


Then i got the following error:
Full stack trace of any exception that occurs:
Code:
...
     [java] 14:08:02,467  INFO DriverManagerConnectionProvider:41 - Using Hibern
ate built-in connection pool (not for production use!)
     [java] 14:08:02,467  INFO DriverManagerConnectionProvider:42 - Hibernate co
nnection pool size: 1
     [java] 14:08:02,467  INFO DriverManagerConnectionProvider:45 - autocommit m
ode: false
     [b][java] Initial SessionFactory creation failed.org.hibernate.HibernateExcept
ion: JDBC Driver class not found: org.hsqldb.jdbcDriver
     [java] 14:08:02,467 FATAL DriverManagerConnectionProvider:65 - JDBC Driver
class not found: org.hsqldb.jdbcDriver
     [java] Exception in thread "main" java.lang.ExceptionInInitializerError
     [java] java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver[/b]
     [java]     at util.HibernateUtil.<clinit>(Unknown Source)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at events.EventManager.createAndStoreEvent(Unknown Source)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at events.EventManager.main(Unknown Source)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java] Caused by: org.hibernate.HibernateException: JDBC Driver class not f
ound: org.hsqldb.jdbcDriver
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at org.hibernate.connection.DriverManagerConnectionProvider.conf
igure(DriverManagerConnectionProvider.java:66)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

     [java]     at org.hibernate.connection.ConnectionProviderFactory.newConnect
ionProvider(ConnectionProviderFactory.java:124)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java]     at org.hibernate.connection.ConnectionProviderFactory.newConnect
ionProvider(ConnectionProviderFactory.java:56)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

     [java]     at org.hibernate.cfg.SettingsFactory.createConnectionProvider(Se
ttingsFactory.java:414)
     [java]     at java.lang.Class.forName0(Native Method)
     [java]     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFacto
ry.java:62)
     [java]     at java.lang.Class.forName(Class.java:169)
     [java]     at org.hibernate.cfg.Configuration.buildSettings(Configuration.j
ava:2073)
     [java]     at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.j
ava:100)
     [java]     at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1298)
     [java]     at org.hibernate.connection.DriverManagerConnectionProvider.conf
igure(DriverManagerConnectionProvider.java:61)
     [java]     ... 3 more
     [java]     at org.hibernate.connection.ConnectionProviderFactory.newConnect
ionProvider(ConnectionProviderFactory.java:124)
     [java] Caused by: java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver
     [java]     at org.hibernate.connection.ConnectionProviderFactory.newConnect
ionProvider(ConnectionProviderFactory.java:56)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at org.hibernate.cfg.SettingsFactory.createConnectionProvider(Se
ttingsFactory.java:414)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFacto
ry.java:62)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at org.hibernate.cfg.Configuration.buildSettings(Configuration.j
ava:2073)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

     [java]     at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1298)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

     [java]     at util.HibernateUtil.<clinit>(Unknown Source)
     [java]     at java.lang.Class.forName0(Native Method)
     [java]     at events.EventManager.createAndStoreEvent(Unknown Source)
     [java]     at java.lang.Class.forName(Class.java:169)
     [java]     at events.EventManager.main(Unknown Source)
     [java]     at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.j
ava:100)
     [java]     at org.hibernate.connection.DriverManagerConnectionProvider.conf
igure(DriverManagerConnectionProvider.java:61)
     [java]     ... 9 more
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 1 second


What did I wrong? Hope to get some help here! :)


Top
 Profile  
 
 Post subject: Driver
PostPosted: Thu Feb 14, 2008 10:52 am 
Newbie

Joined: Thu Feb 14, 2008 9:43 am
Posts: 3
Hi!

You need to put the hsqldb jar into your classpath!

tkz..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.