-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: JPA/Hibernate 3.5.5 and WebSphere Application Server 7
PostPosted: Mon Aug 30, 2010 12:19 pm 
Newbie

Joined: Sun Aug 29, 2010 7:32 pm
Posts: 2
Hello, I am getting the below exception when I deploy my Web/EJB/JPA Hibernate application in WAS7 .


Exception Message:

Code:
[8/30/10 10:27:39:312 EDT]     FFDC Exception:java.lang.NoSuchMethodError SourceId:com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits ProbeId:353 Reporter:com.ibm.ws.jpa.management.JPAPxmlInfo@4fb74fb7
java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:621)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
   at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1474)
   at com.ibm.ws.jpa.management.JPAPUnitInfo.createEntityManagerFactory(JPAPUnitInfo.java:1315)
   at com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits(JPAPxmlInfo.java:393)
   at com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit(JPAScopeInfo.java:140)
   at com.ibm.ws.jpa.management.JPAApplInfo.processModulePUs(JPAApplInfo.java:169)
   at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule(JPAComponentImpl.java:878)
   at com.ibm.ws.jpa.management.JPAComponentImpl.stateChanged(JPAComponentImpl.java:722)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1074)
   at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1298)
   at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:220)
   at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:620)
   at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:940)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:725)
   at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2046)
   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:439)
   at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:382)
   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:110)
   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:949)
   at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)


I have the below hibernate jar files in my lib

Code:
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate3.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
slf4j-jdk14-1.5.8.jar
slf4j-log4j12-1.5.6.jar
slf4j-nop-1.5.2.jar
slf4j-simple-1.5.8.jar


My Persistence.xml file content is below:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
   <persistence-unit name="ToolsPersistenceUnit">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>jdbc/tooluserDs</jta-data-source>
       <properties>
          <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
          <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.CMTTransactionFactory" />
          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      </properties>
   </persistence-unit>
</persistence>


Orm.xml file content is below:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
      <persistence-unit-metadata>
      <persistence-unit-defaults>
         <schema>TOOLUSER</schema>
      </persistence-unit-defaults>
   </persistence-unit-metadata>
</entity-mappings>


Can anyone please help me to find out what am I missing here?

Thanks
San


Top
 Profile  
 
 Post subject: Re: JPA/Hibernate 3.5.5 and WebSphere Application Server 7
PostPosted: Wed Sep 01, 2010 6:16 am 
Newbie

Joined: Wed Sep 01, 2010 6:08 am
Posts: 3
Moved to https://forum.hibernate.org/viewtopic.php?f=1&t=1006769, as my app was not deployed on WebSphere Application Server 7.


Last edited by peterbollen on Wed Sep 01, 2010 7:57 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: JPA/Hibernate 3.5.5 and WebSphere Application Server 7
PostPosted: Wed Sep 01, 2010 7:21 am 
Newbie

Joined: Sun Aug 29, 2010 7:32 pm
Posts: 2
Looks like, the below feature pack needs to be applied in WAS 7 to get support for JPA2.0, otherwise, try to use Hibernate 3.2, JPA 1.0 which comes with WAS 7 by default. I didn't apply feature pack yet to test it
http://www-01.ibm.com/software/webservers/appserv/was/featurepacks/osgi/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.