Reply To: bookstore sample app – Invalid resource

Splash Forums Rewrite Users bookstore sample app – Invalid resource Reply To: bookstore sample app – Invalid resource

#24544

Hey,

sorry for my late response. The forum notification were broken and therefore I missed your post.

Lincoln is right. I created the sample application for JBoss AS 7.1.1 and the application uses the default in-memory database of AS7. You will have to replace the name of the datasource in two places:

https://github.com/ocpsoft/rewrite/blob/master/showcase/bookstore/src/main/resources/META-INF/persistence.xml#L6

https://github.com/ocpsoft/rewrite/blob/master/showcase/bookstore/src/main/java/org/ocpsoft/rewrite/showcase/bookstore/dao/DatabaseInitializer.java#L42

Perhaps you will have to modify some other stuff. I also tried to get the example app to work on Glassfish and had some trouble because one of the database columns is named “year” which is a reserved word in Derby. Another possible issue is that I’m using a Hibernate-specific property to enable automatic creation of the database schema. You will have to replace this with something for EclipseLink, which is the default JPA provider in Glassfish AFAIK.

I guess I should remove the database stuff from the example and create a dummy DAO that returns fixed entities instead. I’ll create a ticket for this.