-->
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 Maven 1.1 and hibernate:schema-gen task
PostPosted: Tue Nov 01, 2005 7:46 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:31 am
Posts: 42
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
2.1.8
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
HSQL db 1.8.0.1
The generated SQL (show_sql=true):

Hello all,
i am using Maven 1.1-beta1 with maven-hibernate-plugin version 1.3

i am trying to run the task hibernate:schema-gen and i am receiving following error:

Code:
net.sf.hibernate.HibernateException: The dialect was not set. Set the property h
ibernate.dialect.
        at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:370)
        at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:391)
        at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:5
7)
        at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:4
8)
        at org.apache.maven.hibernate.beans.SchemaExportBean.executeSchema(Schem
aExportBean.java:59)
        at org.apache.maven.hibernate.beans.SchemaBeanBase.execute(SchemaBeanBas
e.java:145)
        at org.apache.maven.hibernate.jelly.SchemaTagBase.execute(SchemaTagBase.
java:49)
        at org.apache.maven.hibernate.jelly.SchemaTagBase.doTag(SchemaTagBase.ja
va:64)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:78)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:109)
        at org.apache.maven.werkz.Goal.fire(Goal.java:656)
        at org.apache.maven.werkz.Goal.attain(Goal.java:592)
        at org.apache.maven.werkz.WerkzProject.attainGoal(WerkzProject.java:210)

        at org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(MavenAttai
nGoalTag.java:114)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:78)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:109)
        at org.apache.maven.werkz.Goal.fire(Goal.java:656)
        at org.apache.maven.werkz.Goal.attain(Goal.java:592)
        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
693)
        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
        at org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:36
8)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:78)
        at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:109)
        at org.apache.maven.werkz.Goal.fire(Goal.java:656)
        at org.apache.maven.werkz.Goal.attain(Goal.java:592)
        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
693)
        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
        at org.apache.maven.cli.App.doMain(App.java:511)
        at org.apache.maven.cli.App.main(App.java:1258)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
net.sf.hibernate.HibernateException: The dialect was not set. Set the property h
ibernate.dialect.
        at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:370)


that's weird, sicne this is my hibernate.properties

Code:
hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.connection.url=jdbc:hsqldb:foo
hibernate.connection.username=sa
hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect


anyone could help me out?


thanks in advance and regards
marco


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 9:39 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:31 am
Posts: 42
hello all,
i solved my problem

i had to specify the location of the hibernate.properties

maven.hibernate.properties=Backend/src/conf/hibernate.properties

thanks anyway and regards
marco


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.