-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate.cfg.xml not recognizing dialect
PostPosted: Thu Oct 02, 2003 5:29 am 
Newbie

Joined: Thu Oct 02, 2003 5:17 am
Posts: 2
Im sure that this has been visited before but I could not find an answer in the forum.

I am configuring hibernate using a hibernate.cfg.xml file that lives at the top of the classes. It is finding it okay because it is able to add the mappings for my classes. But then it states that no dialect is set and so is defaulting to GenericDialect.

I am running a JUnit test in ANT...

[junit] (cfg.Environment 403 ) Hibernate 2.0.3
[junit] (cfg.Environment 432 ) hibernate.properties not found
[junit] (cfg.Environment 452 ) using CGLIB reflection optimizer
[junit] (cfg.Environment 462 ) JVM proxy support: true
[junit] (cfg.Configuration 703 ) Configuration resource: /hibernate.cfg.xml
[junit] (cfg.Configuration 270 ) Mapping resource: org/hsf/elex/core/Contest.hbm.xml
[junit] (cfg.Binder 178 ) Mapping class: org.hsf.elex.core.Contest -> Contest
[junit] (cfg.Configuration 885 ) Configured SessionFactory: java:comp/env/hibernate/SessionFactory
[junit] (cfg.Configuration 492 ) processing one-to-many associationmappings
[junit] (cfg.Configuration 503 ) processing foreign key constraints
[junit] (impl.SessionFactoryImpl 132 ) building session factory
[junit] (impl.SessionFactoryImpl 148 ) No dialect set - using GenericDialct: The dialect was not set. Set the property hibernate.dialect.
[junit] (dialect.Dialect 83 ) Using dialect: net.sf.hibernate.dialect.GenericDialect
[junit] (connection.DriverManagerConnectionProvider 41 ) Hibernate connection pool size: 5
[junit] (connection.DriverManagerConnectionProvider 56 ) JDBC Driver class not found:

My hibernate.cfg.xml file is...

<hibernate-configuration>

<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory
name="java:comp/env/hibernate/SessionFactory">

<!-- properties -->
<!--property name="connection.datasource">java:comp/env/jdbc/antbuildtest</property-->
<property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://NODENAME</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>

<property name="show_sql">false</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>

<!-- mapping files -->
<mapping resource="org/hsf/elex/core/Contest.hbm.xml"/>

</session-factory>

</hibernate-configuration>


This is very similar to the hibernate.cfg.xml file specified in the documentation.

Any ideas what might be wrong?
Thanks.
TomTommer.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 03, 2003 4:14 am 
Newbie

Joined: Thu Oct 02, 2003 5:17 am
Posts: 2
No relies?
I have now changed to using a hibernate.properties file and have moved beyond the dialect problem to a different problem...

[junit] (impl.SessionFactoryImpl 132 ) building session factory
[junit] (dialect.Dialect 83 ) Using dialect: net.sf.hibernate.dialect.HSQLDialect
[junit] (connection.DriverManagerConnectionProvider 41 ) Hibernate connection pool size: 5
[junit] (connection.DriverManagerConnectionProvider 56 ) JDBC Driver class not found:

hibernate.properties file...

hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.connection.url=jdbc:hsqldb:hsql:\test\antbuildtest
hibernate.connection.username=sa
hibernate.connection.password=
hibernate.connection.pool_size=5
hibernate.statement_cache.size=10
hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect

Is it because I am running hibernate as part of a JUnit test in ANT?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 03, 2003 6:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Your having class path problems - so yes is the answer.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.