users@glassfish.java.net

glassfish not deploying with hibernate as JPA persistence provider

From: <glassfish_at_javadesktop.org>
Date: Sun, 24 Oct 2010 16:00:31 PDT

Hi,
I'm trying to use hibernate the same way i used JPA in my last project so i went and configured my ConectionPool and i can connect to my schema. I wondered if i could skip the hibernate.cfg.xml that would be great, so I also fixed my persistence.xml to work with Hibernate provider but as soon as i, in my EJB call my persistence-unit i get compilation error:

org.eclipse.core.runtime.CoreException: Deployment Error for module: LaFamilyEar: Error during deployment : org.hibernate.mapping.PersistentClass.getSuperMapp edSuperclass()Lorg/hibernate/mapping/MappedSuperclass;%%%EOL%%%
at com.sun.enterprise.jst.server.sunappsrv.SunAppServ erBehaviour.publishDeployedDirectory(SunAppServerB ehaviour.java:755)
at com.sun.enterprise.jst.server.sunappsrv.SunAppServ erBehaviour.publishModuleForGlassFishV3(SunAppServ erBehaviour.java:591)
at com.sun.enterprise.jst.server.sunappsrv.SunAppServ erBehaviour.publishModule(SunAppServerBehaviour.ja va:281)
at org.eclipse.wst.server.core.model.ServerBehaviourD elegate.publishModule(ServerBehaviourDelegate.java :1025)
at org.eclipse.wst.server.core.model.ServerBehaviourD elegate.publishModules(ServerBehaviourDelegate.jav a:1115)
at org.eclipse.wst.server.core.model.ServerBehaviourD elegate.publish(ServerBehaviourDelegate.java:948)
at org.eclipse.wst.server.core.model.ServerBehaviourD elegate.publish(ServerBehaviourDelegate.java:775)
at org.eclipse.wst.server.core.internal.Server.publis hImpl(Server.java:2889)
at org.eclipse.wst.server.core.internal.Server$Publis hJob.run(Server.java:337)
at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)

here is my persistence.xml

[b]persistence.xml:[/b]

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

<persistence-unit name="LaFamily">

<provider>org.hibernate.ejb.HibernatePersistence </provider>

<jta-data-source>jdbc/__lafamilyPool</jta-data-source>

<properties>

<!-- The database dialect to use -->
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<!-- drop and create tables at deployment -->
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<!-- log the sql generated by hiernate -->
<property name="hibernate.show_sql" value="true"/>
</properties>

</persistence-unit>

</persistence>

My EJB

@PersistenceContext(unitName="LaFamily")
private EntityManager em;

[b]This are the jars i'm using:[/b]

hibernate-entitymanager.jar
hibernate-annotations.jar
javassist.jar
hibernate3.jar
c3p0-0.9.0.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
concurrent-1.3.2.jar
log4j-1.2.11.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
antlr-2.7.6rc1.jar
asm-attrs.jar
asm.jar

[b]Here is the config at the admin side:[/b]
http://www.box.net/shared/cxsji96h80
http://www.box.net/shared/bcpzl24knh

That's it, do you see where the problem is, i'm going crazy with this ??

Thanks in advance
[Message sent by forum member 'erde1017']

http://forums.java.net/jive/thread.jspa?messageID=486090