Bug 799956

Summary: JPA variant of Sportsclub example is broken
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: SpringAssignee: Marek Novotny <mnovotny>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: high    
Version: 2.0.0.ER1CC: mariusb, mnovotny
Target Milestone: ---   
Target Release: 2.0.0.ER3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-05 13:48:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Piwko 2012-03-05 13:37:01 UTC
Description of problem:

The sportsclub-jpa-ear od 

Version-Release number of selected component (if applicable):

WFK 2.0.0.ER1, Spring 3.1 (likely all variants are affected

How reproducible:

Always.

Steps to Reproduce:
1. Build Sportsclub example
2. Deploy it to the server
3. Navigate to http://localhost:8080/sportsclub/reservations/ , Search
  
Actual results:

javax.servlet.ServletException: org.hibernate.exception.SQLGrammarException: Table "RESERVATION" not found; SQL statement:
select count(reservatio0_.id) as col_0_0_ from Reservation reservatio0_ cross join Equipment equipment1_ where reservatio0_.equipment_id=equipment1_.id and 1=1 and (equipment1_.eqp_type_id in (? , ? , ?)) limit ? [42102-161]
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)


Expected results:

It works.

Additional info:

Caused by missing hibernate.hbm2ddl.auto=create-drop in the persistence.xml

Comment 1 Marius Bogoevici 2012-03-07 21:23:51 UTC
This was unique to the Spring 3.1 variant.

Fixed in the repository - assigned to Marek for productization

Comment 2 Marek Novotny 2012-03-09 17:38:44 UTC
verified that git repo has got the fix with http://git.app.eng.bos.redhat.com/?p=snowdrop/snowdrop-examples.git;a=commit;h=d1c0baf4481dbc1e9d0093a04dfa7c7a62a8a522

I will rebuild the snowdrop-examples/sportsclub

Comment 3 Karel Piwko 2012-03-12 11:40:40 UTC
Verified with Spring 3.1 Sportsclub in WFK 2.0.0.ER3

Comment 4 Karel Piwko 2012-04-05 13:48:14 UTC
Verified in WFK 2.0.0.ER3 (a.k.a. 2.0.0.Beta1).