Bug 1018939 - Seam 2.2 JPA example migration incomplete
Summary: Seam 2.2 JPA example migration incomplete
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: EAP 6.2.0
Assignee: sgilda
QA Contact: Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-14 18:29 UTC by Marek Schmidt
Modified: 2014-08-14 15:22 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 14877, Migration Guide-6.2-1 Build Date: 02-10-2013 13:32:44 Topic ID: 4952-460374 [Latest]
Last Closed: 2013-12-15 16:13:36 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Schmidt 2013-10-14 18:29:09 UTC
Title: Migrate the Seam 2.2 JPA Example to JBoss EAP 6

Describe the issue:

The steps described in Migrate the Seam 2.2 JPA Example to JBoss EAP 6
 are incomplete and the result will not be a fully functional JPA example application.

Suggestions for improvement:

Missing steps are

* adding hibernate exclusions to jboss-dependency-structure.xml:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
  <deployment>
      <exclusions>
          <module name="javax.faces.api" slot="main"/>
          <module name="com.sun.jsf-impl" slot="main"/>
          <module name="org.hibernate" slot="main"/>
      </exclusions>
      <dependencies>
          <module name="org.apache.log4j" />
          <module name="org.dom4j" />
          <module name="org.apache.commons.logging" />
          <module name="org.apache.commons.collections" />
          <module name="javax.faces.api" slot="1.2"/>
          <module name="com.sun.jsf-impl" slot="1.2"/>
      </dependencies>
  </deployment>
</jboss-deployment-structure>

* adding <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />  to the persistence.xml

* changing the default datasource JNDI to java:jboss/datasources/ExampleDS

Additional information:

(see also http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6.2/html/Migration_Guide/sect-Migrate_Seam_2.2_Applications.html )

Comment 1 Marek Schmidt 2013-10-15 08:42:23 UTC
(the application deploys, but attempting to book a hotel will fail, with the following error in the server log:

10:40:56,558 ERROR [org.hibernate.engine.transaction.internal.SynchronizationRegistryImpl] (http-/127.0.0.1:8080-3) HHH000260: Exception calling user Synchronization [TransactionSuccessEvent(bookingConfirmed)] : javax.persistence.PersistenceException: org.hibernate.TransactionException: reuse of Transaction instances not supported

Comment 2 sgilda 2013-10-21 18:44:37 UTC
Hi Marek,

The jboss-deployment structure is documented in step 4, however, it was missing the "org.hibernate" exclusion.

Modifed topic 4952: Migrate the Seam 2.2 JPA Example to JBoss EAP 6

Comment 4 Marek Schmidt 2013-10-29 13:12:44 UTC
The changes are fine, however I have missed one detail:

The list of jars in "3. Add Seam 2.2 dependencies" is incomplete, "antlr.jar" needs to be added to the list, so the full list of jars to copy should be:

    antlr.jar
    slf4j-api.jar
    slf4j-log4j12.jar
    hibernate-entitymanager.jar
    hibernate-core.jar
    hibernate-annotations.jar
    hibernate-commons-annotations.jar
    hibernate-validator.jar 


(otherwise you get java.lang.ClassNotFoundException: antlr.RecognitionException after trying to login)

Comment 5 sgilda 2013-10-29 13:50:37 UTC
Thanks Marek Fixed topic 4952.

Comment 6 sgilda 2013-10-31 14:40:48 UTC
Migration Guide has not been staged.

Comment 7 sgilda 2013-11-05 20:06:44 UTC
Migration Guide has still not been staged.

Comment 9 Marek Schmidt 2013-11-18 13:32:44 UTC
Verified on EAP 6.2.0.CR2 preview


Note You need to log in before you can comment on or make changes to this bug.