dev@glassfish.java.net

Re: Unable to drop tables at deployment/undeployment time

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 05 Feb 2008 09:52:09 -0800

If it's only SEQUENCE table, ignore this message - SEQUENCE table is not
recreated each time.

Regards,
-marina

Sekhar Vajjhala wrote:
> I am trying to deploy an ear file with the following persistence.xml
> to drop and create tables at deployment time on GF 9.1 .
>
> <persistence>
> <persistence-unit name="helloworld">
> <properties>
> <!--Use the java2db feature -->
> <property name="toplink.ddl-generation"
> value="drop-and-create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
>
> The deployment succeeds but I keep getting the following error:
>
> JDO76614: Deployment encountered SQL Exceptions:
> JDO76609: Got SQLException executing statement "CREATE TABLE
> SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT
> DECIMAL, PRIMARY KEY (SEQ_NAME))": java.sql.SQLException: Table/View
> 'SEQUENCE' already exists in Schema 'APP'.
>
> I have also tried the options to asadmin commands
> (to override persistence.xml settings)
>
> undeploy --droptables==true javaeecomponent
> or deploy --dropandcreatetables=true <ear-file>
>
> but I still get the same exception.
>
> Suggestions ?
>
> Thanks,
> Sekhar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>