-->
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: SchemaExport: Could not instantiate dialect class
PostPosted: Tue Feb 01, 2005 7:24 pm 
Newbie

Joined: Tue Feb 01, 2005 7:12 pm
Posts: 1
Hibernate version:
Hibernate 2.1.4
Hibernate-ext 2.1.3

Full stack trace of any exception that occurs:
/home/bart/data/workspace/Time/build.xml:55: Schema text failed: Could not instantiate dialect class
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: net.sf.hibernate.HibernateException: Could not instantiate dialect class
at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:383)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:57)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:209)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:136)
... 10 more
Caused by: java.lang.ClassCastException
at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:377)
... 13 more
--- Nested Exception ---
net.sf.hibernate.HibernateException: Could not instantiate dialect class
at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:383)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:57)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:209)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:136)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ClassCastException
at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:377)
... 13 more

Name and version of the database you are using:
Postgres 7.4.6 with jdbc3-postgresql

Debug level Hibernate log excerpt:
[schemaexport] INFO - Hibernate 2.1.4
[schemaexport] INFO - loaded properties from resource hibernate.properties: {hibernate.connection.username=bart, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql://localhost/example, hibernate.connection.driver_class=org.postgresql.Driver}
[schemaexport] INFO - using CGLIB reflection optimizer
[schemaexport] INFO - Mapping file: /home/bart/data/workspace/Time/classes/com/om/Time/User.hbm.xml
[schemaexport] DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
[schemaexport] DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
[schemaexport] INFO - Mapping class: com.om.Time.User -> users
[schemaexport] DEBUG - Mapped property: id -> id, type: long
[schemaexport] DEBUG - Mapped property: name -> name, type: string
[schemaexport] INFO - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect

BUILD FAILED
/home/bart/data/workspace/Time/build.xml:55: Schema text failed: Could not instantiate dialect class


User.hbml.xml
.. xml info here
<hibernate-mapping>
<class name="com.om.Time.User" table="users">
<id name="id" column="id" type="long">
<generator class="sequence">
<param name="sequence">id_sequence</param>
</generator>
</id>
<property name="name" column="name" type="string"/>
</class>
</hibernate-mapping>

Comment
First of all i am a java newbie. I followed a tutorial in James Elliott's "Developer Notebook" and run into this error. I tried also change the dialect to MySQL or Sybase, nothing worked.

Please, put me in the right direction.

Thanks Bart


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.