Check your sample-data.xml for correct syntax and data. dbunit tries to populate your database and fails. This can also be due to a mispelled table or column name or due to a foreign key problem. So, check your jpa annotations and compare with the sample data file.
MH cesto wrote: > > Hi, > > I'm following the hibernate persistence tutorial but when I give the > command > *mvn test-compile > *I get an error. > > What does it mean? > > Regards > > LuKe > > Here the error: > ^^^^^^^^^^^^^^^^^^^^^^ > > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------ > [INFO] Building AppFuse Spring MVC Application > [INFO] > [INFO] Id: com.eidonuma.app:test4:war:1.0-SNAPSHOT > [INFO] task-segment: [test-compile] > [INFO] > ------------------------------------------------------------------------ > [WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is > invalid. It will be ignored for artifact resolution. Reason: Parse error > reading POM. Reason: TEXT must be immediately followed by END_TAG and > not START_TAG (position: START_TAG seen > ...<licenses>\n\t\t\t<license>... @12:13) for project > org.hibernate:jtidy at > /home/luke/.m2/repository/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.pom > [WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is > invalid. It will be ignored for artifact resolution. Reason: Parse error > reading POM. Reason: TEXT must be immediately followed by END_TAG and > not START_TAG (position: START_TAG seen > ...<licenses>\n\t\t\t<license>... @12:13) for project > org.hibernate:jtidy at > /home/luke/.m2/repository/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.pom > [INFO] [warpath:add-classes] > [INFO] [aspectj:compile] > [INFO] [native2ascii:native2ascii] > [INFO] [native2ascii:native2ascii] > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:compile] > [INFO] Nothing to compile - all classes are up to date > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [statemgmt:start-fork] > [INFO] Starting forked execution [fork id: 2055097134] > [INFO] [warpath:add-classes] > [INFO] [aspectj:compile] > [INFO] [native2ascii:native2ascii] > [INFO] [native2ascii:native2ascii] > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [statemgmt:end-fork] > [INFO] Ending forked execution [fork id: 2055097134] > [WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is > invalid. It will be ignored for artifact resolution. Reason: Parse error > reading POM. Reason: TEXT must be immediately followed by END_TAG and > not START_TAG (position: START_TAG seen > ...<licenses>\n\t\t\t<license>... @12:13) for project > org.hibernate:jtidy at > /home/luke/.m2/repository/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.pom > [INFO] [hibernate3:hbm2ddl] > [INFO] Configuration XML file loaded: > file:/home/luke/workspace/test4/src/main/resources/hibernate.cfg.xml > [INFO] Configuration XML file loaded: > file:/home/luke/workspace/test4/src/main/resources/hibernate.cfg.xml > [INFO] Configuration Properties file loaded: > /home/luke/workspace/test4/target/classes/jdbc.properties > alter table user_role drop foreign key FK143BF46A4FD90D75; > alter table user_role drop foreign key FK143BF46AF503D155; > drop table if exists app_user; > drop table if exists role; > drop table if exists user_role; > create table app_user (id bigint not null auto_increment, > account_expired bit not null, account_locked bit not null, address > varchar(150), city varchar(50) not null, country varchar(100), > postal_code varchar(15) not null, province varchar(100), > credentials_expired bit not null, email varchar(255) not null unique, > account_enabled bit, first_name varchar(50) not null, last_name > varchar(50) not null, password varchar(255) not null, password_hint > varchar(255), phone_number varchar(255), username varchar(50) not null > unique, version integer, website varchar(255), primary key (id)) > ENGINE=InnoDB; > create table role (id bigint not null auto_increment, description > varchar(64), name varchar(20), primary key (id)) ENGINE=InnoDB; > create table user_role (user_id bigint not null, role_id bigint not > null, primary key (user_id, role_id)) ENGINE=InnoDB; > alter table user_role add index FK143BF46A4FD90D75 (role_id), add > constraint FK143BF46A4FD90D75 foreign key (role_id) references role (id); > alter table user_role add index FK143BF46AF503D155 (user_id), add > constraint FK143BF46AF503D155 foreign key (user_id) references app_user > (id); > [INFO] [statemgmt:clear-fork-context] > [INFO] Cleaning up forked execution context [fork id: 2055097134] > [INFO] [compiler:testCompile] > [INFO] Nothing to compile - all classes are up to date > [INFO] [dbunit:operation] > [ERROR] > > The following mojo encountered an error while executing: > Group-Id: org.codehaus.mojo > Artifact-Id: dbunit-maven-plugin > Version: 1.0-beta-1 > Mojo: operation > brought in via: POM > > While building project: > Group-Id: com.eidonuma.app > Artifact-Id: test4 > Version: 1.0-SNAPSHOT > From file: /home/luke/workspace/test4/pom.xml > Reason: Error executing database operation: CLEAN_INSERT > > > > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run with the -e flag > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILED > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 29 seconds > [INFO] Finished at: Fri Sep 19 14:03:45 CEST 2008 > [INFO] Final Memory: 7M/52M > [INFO] > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-newbie----error-tp19574686s2369p19613917.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]