persistence@glassfish.java.net

TABLE SEQUENCE already exists

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Sat, 25 Nov 2006 15:53:37 +0100

Hi all,

I have a warning message that has been following me for weeks now and I
would like to get rid of it. It's just a warning, so nothing major and the
application works fine, it's just that I don't understand why I've got it
and how to get rid of it.

My application has a dozen of entity beans (@GeneratedValue(strategy =
GenerationType.AUTO)) that are packaged in a .ear file with a few stateless
and stateful beans. When I deploy my ear file (using asadmin deploy) I have
the following warning :

     [exec] Command deploy executed successfully with following warning
messages: WARNING:

     [exec] JDO76614: Deployment encountered SQL Exceptions:
     [exec] JDO76609: Got SQLException executing statement "CREATE TABLE
SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL, PRIMARY KEY
(SEQ_NAME))": org.apache.derby.client.am.SqlException: Table/View *'SEQUENCE'
already exists* in Schema 'DBUSER'.

And if I manually delete the table SEQUENCE before deployment I have the
oposite, it cannot delete the sequence

     [exec] Command deploy executed successfully with following warning
messages: WARNING:

     [exec] JDO76614: Deployment encountered SQL Exceptions:
     [exec] JDO76609: Got SQLException executing statement "DELETE FROM
SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'":
org.apache.derby.client.am.SqlException: Table *'SEQUENCE' does not exist*.

Does anybody know how not to have this warning (execept using --terse=true
in the asadmin command ;o)

Thanks,

Antonio