I'm trying to run a simple example on JBoss 4.0.4 using EJB 3.0 w/
Sybase 12.5:
Here's the error I'm getting while deploying the EJB:
---------------------- Start: error trace ----------------------
14:14:45,648 INFO [SettingsFactory] JDBC driver: jConnect (TM) for
JDBC (TM), version: jConnect (TM) for JDBC(TM)/6.05(
Build 25828)/P/EBF13044/JDK14/Fri Sep 30 1:05:16 2005
14:14:45,658 WARN [ServiceController] Problem starting service
persistence.units:ear=pun-enterprise.ear,jar=enterprise-
ejb.jar,unitName=punSybaseDB
org.hibernate.HibernateException: Hibernate Dialect must be explicitly
set for database: Adaptive Server Enterprise
at
org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:62)
at
org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at
org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:397)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
---------------------- End: error trace ----------------------
Here's my persistence.xml file:
---------------------- Start: persistence.xml ----------------------
<persistence>
<persistence-unit name="punSybaseDB">
<jta-data-source>java:/jdbc/PunSybaseDB</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="dialect"
value="org.hibernate.dialect.SybaseDialect"/>
</properties>
</persistence-unit>
</persistence>
---------------------- End: persistence.xml ----------------------
Anybody has any clue how to fix this error.
After getting the error I added the 2nd property of dialect, but that
did not fix the problem.
Thanks in advance for your thoughts!
- Puneet
The name of the property should be "hibernate.dialect".
Dan.
--
Daniel Dyer
http://www.uncommons.org
Alternative solution:
i was also able to fix problem by uncommenting/adding
"hibernate.dialect" property in
jboss-4.0.4.GA\server\default\deploy\ejb3.deployer\META-INF\persistence.properties
file as well.
but i'm using your solution, thats more elegant! Thanks again!
-Puneet Maini