This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1019138 - Following the "Debug and Resolve Seam 2.2 Booking Archive Runtime Errors and Exceptions" application still doesn't work properly
Following the "Debug and Resolve Seam 2.2 Booking Archive Runtime Errors and ...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium
: GA
: EAP 6.2.0
Assigned To: sgilda
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 04:23 EDT by Marek Schmidt
Modified: 2014-09-29 14:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Build Name: 14877, Migration Guide-6.2-1 Build Date: 02-10-2013 13:32:44 Topic ID: 5577-460380 [Latest]
Last Closed: 2013-12-15 11:19:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2013-10-15 04:23:39 EDT
Title: Debug and Resolve Seam 2.2 Booking Archive Runtime Errors and Exceptions

Describe the issue:

Following the "Debug and Resolve Seam 2.2 Booking Archive Runtime Errors and Exceptions" application still doesn't work properly

After following this guide, the application deploys and the user is able to login, but attempting to book a hotel will fail on the page with filling credit card information.

Suggestions for improvement:

The result is an weird exception trace. To debug this, it is necessary to delete 

jboss-seam-booking.ear/jboss-seam-booking.war/WEB-INF/lib/jboss-seam-debug.jar

as it is preventing the original error to be shown.

After that, the error will look like this:

java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ReflectionManager


suggesting another hibernate library to be needed...

Additional information:

Copying hibernate-annotations.jar and hibernate-commons-annotations.jar from the EAP5/seam/lib/  to jboss-seam-booking.ear/lib  seem to resolve this issue.
Comment 1 sgilda 2013-10-15 09:26:07 EDT
Updated topic 5577 'Debug and Resolve Seam 2.2 Booking Archive Runtime Errors and Exceptions' with the missing step.

Thanks Marek!
Comment 2 sgilda 2013-10-17 09:55:54 EDT
Step 2 is new and includes information to debug the NoClassDefFoundError indicating a missing Hibernate library.

The fix is staged here: http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6.2/html-single/Migration_Guide/index.html#Debug_and_Resolve_Seam_22_Booking_Archive_Runtime_Errors_and_Exceptions
Comment 3 Marek Schmidt 2013-10-30 08:55:03 EDT
After step 1, there is a missing step

The current Step 2 claims that one is able to login successfuly, however, it will fail with the message "Login failed
    Transaction failed"

With a long stack in the logs, starting with:

13:36:04,631 WARN  [org.jboss.modules] (http-/127.0.0.1:8080-1) Failed to define class org.jboss.seam.persistence.HibernateSessionProxy in Module "deployment.jboss-seam-booking.ear.jboss-seam.jar:main" from Serv
ice Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/persistence/HibernateSessionProxy (Module "deployment.jboss-seam-booking.ear.jboss-seam.jar:main" from Service Module Loader)

and ending with:

Caused by: java.lang.LinkageError: Failed to link org/jboss/seam/persistence/HibernateSessionProxy (Module "deployment.jboss-seam-booking.ear.jboss-seam.jar:main" from Service Module Loader)
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.Module.loadModuleClass(Module.java:548) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.proxyPersistenceContexts(HibernateSessionProxyInterceptor.java:55) [jboss-seam.jar:2.2.6.EAP5]
	at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.postConstruct(HibernateSessionProxyInterceptor.java:44) [jboss-seam.jar:2.2.6.EAP5]
	... 164 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/engine/SessionImplementor
	at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_45]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_45]
	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423) [jboss-modules.jar:1.3.0.Final-redhat-2]
	... 174 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.engine.SessionImplementor from [Module "deployment.jboss-seam-booking.ear.jboss-seam.jar:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
	... 178 more


The problem is obviously the missing hibernate-core.jar .  Copying hibernate-core.jar from EAP5_HOME/seam/lib/  to jboss-seam-booking.ear/lib   will fix this problem and then the rest of the tutorial can be followed till the end.

(this step has been removed from the "Deployment" part of the tutorial as part of https://bugzilla.redhat.com/show_bug.cgi?id=1019124, as that only manifests during runtime now, that's why it is now needed here)



Another slight error is the statement in the (currently) 3rd step:

"Runtime and application errors should be resolved
At this point, the application deploys and runs without error. When you access the URL http://localhost:8080/seam-booking/ in a browser, you are able to login successfully. "

(we are able to log in already after the 2nd step, the last issue fixes a problem that occurs during booking of a hotel, not login, so it should instead claim that the application now works correctly, or something like that)
Comment 6 Marek Schmidt 2013-11-18 11:18:18 EST
Verified on EAP 6.2.0.CR2 preview.

Thanks! :)

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