File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Glassfish Eclipselink an Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Glassfish Eclipselink an Hibernate" Watch "Glassfish Eclipselink an Hibernate" New topic

Glassfish Eclipselink an Hibernate

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 116
I am using Glassfish v3 with Apache Derby 10.6.1 (Network Server Mode)
I am trying to deploy a sample web application (Beginnig Java EE 6 platform with Glassfish3, chapter 10) with EJBs and Entities.


During deployment I get the exception:

Deployment encountered SQL Exceptions:
Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VA
LException: Table/View 'SEQUENCE' ist bereits in Schema 'APP' vorhanden.

(translation of the German part: 'SEQUENCE' exists already in Schema 'App'

the application gets deployed anyway.

after that I cannot connect with ij:
connect 'jdbc:derby://localhost:1527/book'

ij says the database does not exist.

What do I have to do to avoid the SQL command?

And is there a way to find out which databases a present in Derby?

James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
The SEQUENCE table error is just a warning, you can ignore it as you are replacing existing tables.
The reason the SEQUENCE table is not replaced is that there may be other tables using it and we do not want to reset their sequence values.

For the URL note you used books, not book,

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
Mike Keith
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
Weird. I posted an answer, but then James's answer from an hour earlier showed up.

Pro JPA 2: Mastering the Java Persistence API
I agree. Here's the link:
subject: Glassfish Eclipselink an Hibernate
It's not a secret anymore!