-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Annotations test can not work
PostPosted: Wed Jan 19, 2005 3:12 am 
Newbie

Joined: Tue Jan 18, 2005 2:48 am
Posts: 3
Hibernate version:

hibernate3.0beta1

hibernate-metadata test case

Mapping documents:

<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft qlserver://localhost:1433;DatabaseName=sjpt2005</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="show_sql">true</property>
<property name="transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="hibernate.cache.provider_class">
org.hibernate.cache.EhCacheProvider
</property>
</session-factory>

Full stack trace of any exception that occurs:

org.hibernate.test.metadata.Flight
org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:419)
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:859)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:613)
at org.hibernate.cfg.AnnotationBinder.processElementsOfAClass(AnnotationBinat junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)




Name and version of the database you are using:

sql server2000



Hibernate Annotations test can not work , i don't konw how to work with testcase ,who can tell me please?


Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 7:57 am 
Newbie

Joined: Thu Jan 13, 2005 1:53 pm
Posts: 6
Shouldn't

<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>

be

<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>

?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 11:00 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Makes no difference.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 11:02 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is a known bug. It is fixed in CVS. As a workaround set the dialect in hibernate.properties

_________________
Emmanuel


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