Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GlassFishV3 Hibernate library issue

I am trying to deploy a JAR file in a GlassFishv3 server. This results in the error:

com.sun.enterprise.admin.cli.CommandException: 
remote failure: 
Exception while preparing the app : 
java.lang.RuntimeException:
java.lang.ClassNotFoundException: 
org.hibernate.ejb.HibernatePersistence

I thought that the class "org.hibernate.ejb.HibernatePersistence" is missing and tried to add libraries containing it to the folder "glassfish\domains\domain1\lib". I took them from my NetBeans folder "NetBeans 6.9\java\modules\ext\hibernate". The result is, that glassfish is not starting any longer. It runs into a timeout. The last log entry is

INFO|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName=Thread-1;|{felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv301\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\DOKUME~1\me\LOKALE~1\Temp\fileinstall-8074722487477598658, felix.fileinstall.filter = null}|#]

The autodeploy\bundles folder mentioned in that entry is empty.

Any idea how to move formard?

like image 679
kuester2000 Avatar asked Jul 01 '10 16:07

kuester2000


2 Answers

If you want to use Hibernate as the JPA provider, my advice would be to install the Hibernate JPA module via the GlassFish v3 Update Center:

alt text http://a.yfrog.com/img80/5218/screenshot009z.png

The other way would be to package Hibernate EntityManager inside your application. Didn't experiment this though.

like image 125
Pascal Thivent Avatar answered Nov 14 '22 03:11

Pascal Thivent


And for the record, the command-line version to add the Hibernate package is :

bin/pkg install hibernate
like image 23
Alexis MP Avatar answered Nov 14 '22 05:11

Alexis MP