Yes this is a way it should work. But I wonder if I will run into the same 
problem if I want to schemaupdate changed classes to the database. I will 
follow your advice an try it. Thanks Patrick -----"mraible [via AppFuse]" 
<ml-node+1559046-1402447...@n4.nabble.com> schrieb: ----- An: patrick24 
<patrick.hartk...@zueblin.de> Von: "mraible [via AppFuse]" 
<ml-node+1559046-1402447...@n4.nabble.com> Datum: 17.02.2010 06:33PM 
Thema: Re: Error preserving database using  
<dbunit.operation.type>UPDATE</dbunit.operation.type> 

If your table already exist, I would modify the hibernate3 plugin so it doesn't 
run except when you explicitly run it (e.g. in a profile). Matt On Wed, Feb 17, 
2010 at 4:34 AM, patrick24 < [hidden email] > wrote:
> > I checked out a new AppFuse project from the lates snapshot: > 
  AppFuese 2.1.0-M2-Snapshot / Single-Mode / JSF / Full Source > > 
That worked out fine. Now I want to preserve the database contents and get > 
an error when I change in the pom.xml: > > 
<dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type> > to 
> <dbunit.operation.type>UPDATE</dbunit.operation.type> > and 
(at hbm2ddl) > <drop>true</drop> > to > 
<drop>false</drop> > > > Running mvn clean / mvn jetty:run 
/ mvn jetty:run-war generates the > following error: > > ERROR [main] 
SchemaExport.create(348) | Unsuccessful: create table app_user > ... > 
ERROR [main] SchemaExport.create(348) | Unsuccessful: create table app_user 
> ... and so on for all tables > [WARNING] 9 errors occurred while 
performing <hbm2ddl>. > [ERROR] Error #1: 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: > Table 
'app_user' already exists > ... and so on for all tables > [INFO] Error 
executing database operation: UPDATE > Embedded error: 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: > You have an 
error in your SQL syntax; check the manual that corresponds to > your MySQL 
server version for the right syntax to use near 'where user_id = > -1 and 
role_id = -2' at line 1 > > I remember this worked fine for recent 
AppFuse projects. > Is there anything wrong? > A dbunit bug? > > 
Thanks for helping > Patrick > > > > > -- > View this 
message in context: 
http://n4.nabble.com/Error-preserving-database-using-dbunit-operation-type-UPDATE-dbunit-operation-type-tp1558529p1558529.html
 > Sent from the AppFuse - User mailing list archive at Nabble.com. > 
> --------------------------------------------------------------------- > 
To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: 
[hidden email] > >
--------------------------------------------------------------------- To 
unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden 
email] 



View message @ 
http://n4.nabble.com/Error-preserving-database-using-dbunit-operation-type-UPDATE-dbunit-operation-type-tp1558529p1559046.html
 
To unsubscribe from Error preserving database using 
<dbunit.operation.type>UPDATE</dbunit.operation.type>, click here .



-- 
View this message in context: 
http://n4.nabble.com/Error-preserving-database-using-dbunit-operation-type-UPDATE-dbunit-operation-type-tp1558529p1559491.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to