• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Newbie problem with Hibernate/WL/Eclipse

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!

I did an Enterprise Application Project with Eclipse for learning purposes. It consist in a simple web module containing a couple of jsf pages and a simple EJB module containing a session bean.
I configured a JPA implementation library in Eclipse.
I added the JPA facet to the EJB module chossing the library previously configured when prompted about the implementation.

When I pick the Run On Server option and the application is deployed on the WL server an exception is throwed:

Error instantiating the Persistence Provider class org.hibernate.ejb.HibernatePersistence of the PersistenceUnit ABMJSF-ejbPU: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

If I copy manually the Hiberntate's and Hibernate's dependencies JARs in the
EarContent\APP-INF\lib the exception throwed is another one (An exception saying that a Hibernate dialect must be specified).

The EJB module is configured to depend of the Hibernate library created by me. Why the H. library is not deployed? I assumed that the dependencies are deployed automatically. Am I wrong?

Another clue: I must deploy the jsf libraries manually in the WebContent\WEB-INF\lib directory. The jsf library is configured as a
web module dependency.

Thank in advance!

Regards
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your post is little confusing,

I really didnt understard, whether are you giving some information or are you asking some questions.

I have similar environment, WebServices running on Weblogic10, Hibernate, SQL Server.

First importabt bit you might be missing, before your start your weblogic server please make sure you copied all the JAR files into the LIB folder of your server - how to test this - after finishing this step if you restart the server you can view on the weblogic console all these JAR files getting loaded.

Regarding dilect error, please check your Hibernate config file. Aaccording to your DataBase you should have something like bellow line

Hope this helps.
Thanks,VJay
 
Pablo Caballero
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay, thank you very much for you response!

Originally posted by Vijay Gadde:
Your post is little confusing,


I'am sorry but my english is not good.

I will try to be more specific.

If I copy the hibernate's (and hibernate's dependencies) jars in the
C:\bea\wlserver_10.3\server\lib directory (and restart the server) I obtain the same error:

Error instantiating the Persistence Provider class
org.hibernate.ejb.HibernatePersistence of the PersistenceUnit ABMJSF-ejbPU:
java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

If I copy the same files in the ....MyEnterpriseApp\EarContent\APP-INF\lib directory I obtain the dialect error:

org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

My application has no hibernmate's configuration file. It use JPA. The contents of the persisnten.xml are:



The same application is working OK in GlassFish

[ November 19, 2008: Message edited by: Pablo Caballero ]

[ November 19, 2008: Message edited by: Pablo Caballero ]
[ November 19, 2008: Message edited by: Pablo Caballero ]
 
Pablo Caballero
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the line <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" /> to the persistence.xml file and now I get the following error:

org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager

Any ideas?
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic