-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.HibernateException: Dialect class not found
PostPosted: Thu Mar 18, 2010 7:07 pm 
Newbie

Joined: Thu Mar 18, 2010 6:57 pm
Posts: 8
reading the 2008 Harnessing Hibernate

the first example

when I ran and db (which requires the classpath) or ant prepare - it ran OK

but when I ran ant schema - got the following error

[hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.HSQLDialect hibernate.connection.driver_class=org.hsqldb.jdbcDriver

BUILD FAILED
org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.HSQLDialect hibernate.connection.driver_class=org.hsqldb.jdbcDriver
at org.hibernate.dialect.Dialect.instantiateDialect(Dialect.java:239)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:228)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:86)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
at org.hibernate.tool.hbm2x.Hbm2DDLExporter.doStart(Hbm2DDLExporter.java:78)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

in build.xml
<artifact:dependencies pathId="dependency.classpath">
<dependency groupId="hsqldb" artifactId="hsqldb" version="1.8.0.7"/>
<dependency groupId="org.hibernate" artifactId="hibernate"
version="3.2.6.ga">
<exclusion groupId="javax.transaction" artifactId="jta"/>
</dependency>
<dependency groupId="org.hibernate" artifactId="hibernate-tools"
version="3.2.3.GA"/>
<dependency groupId="org.apache.geronimo.specs"
artifactId="geronimo-jta_1.1_spec" version="1.1"/>
<dependency groupId="log4j" artifactId="log4j" version="1.2.14"/>
</artifact:dependencies>
<!-- Set up the class path for compilation and execution -->
<path id="project.class.path">
<pathelement location="${class.root}" />
<path refid="dependency.classpath"/>
</path>

<!-- Teach Ant how to use the Hibernate Tools -->
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="project.class.path"/>

/>

this obviously set the classpath

can you please let me know what is wrong?


Thanks


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

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.