Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

JBoss 4.0.4 Entity Bean using EJB 3.0 w/ Sybase 12.5

Thread view: 
puneet.maini@gmail.com - 16 Nov 2006 19:59 GMT
Hey Guys,

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
Daniel Dyer - 16 Nov 2006 20:21 GMT
> Here's my persistence.xml file:
> ----------------------  Start: persistence.xml ----------------------
[quoted text clipped - 13 lines]
> After getting the error I added the 2nd property of dialect, but that
> did not fix the problem.

The name of the property should be "hibernate.dialect".

Dan.

Signature

Daniel Dyer
http://www.uncommons.org

puneet.maini@gmail.com - 16 Nov 2006 21:25 GMT
Thanks! it fixes the problem...

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

> > Here's my persistence.xml file:
> > ----------------------  Start: persistence.xml ----------------------
[quoted text clipped - 17 lines]
>
> Dan.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.