org.hibernate.exception.ConstraintViolationException: could not update: [org.appfuse.model.User#-1]

AppFuse JIRA | Martin Ravell | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [APF-1299] Quickstart archetypes failing - AppFuse JIRA

    appfuse.org | 2 years ago
    org.hibernate.exception.ConstraintViolationException: could not update:
  2. 0

    Basic archetype creation results in database error when doing a mvn install. Should be easy to reproduce (I have done it several times). First create a project using the Quickstart method: C:\Project>mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0 -DgroupId=com.mycompany -DartifactId=full -DarchetypeRepository=http://oss.sonatype .org/content/repositories/appfuse [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Batch mode [INFO] Archetype defined by properties [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: appfuse-basic-struts-archetype:2.1.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: com.mycompany [INFO] Parameter: artifactId, Value: full [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.mycompany [INFO] Parameter: packageInPathFormat, Value: com/mycompany [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.mycompany [INFO] Parameter: groupId, Value: com.mycompany [INFO] Parameter: artifactId, Value: full [INFO] project created from Archetype in dir: C:\Project\full [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Fri Feb 03 09:25:12 EST 2012 [INFO] Final Memory: 19M/47M [INFO] ------------------------------------------------------------------------ That seems to work fine. Now go into the project and: C:\Project>cd full C:\Project\full>mvn install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building AppFuse Struts 2 Application [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 37 resources [INFO] Copying 16 resources [INFO] Copying 8 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to C:\Project\full\target\classes [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] Copying 11 resources [INFO] Preparing hibernate3:hbm2ddl [WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive invocation. [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 37 resources [INFO] Copying 16 resources [INFO] Copying 8 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] [hibernate3:hbm2ddl {execution: default}] [INFO] Configuration XML file loaded: file:/C:/Project/full/src/main/resources/hibernate.cfg.xml [INFO] Configuration XML file loaded: file:/C:/Project/full/src/main/resources/hibernate.cfg.xml [INFO] Configuration Properties file loaded: C:\Project\full\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), country varchar(100), postal_code varchar(15), province varchar(100), credentials_e xpired 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 v archar(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); [WARNING] 2 errors occurred while performing <hbm2ddl>. [ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'full.user_role' doesn't exist [ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'full.user_role' doesn't exist [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 7 source files to C:\Project\full\target\test-classes [INFO] [dbunit:operation {execution: test-compile}] 98 [main] INFO org.dbunit.database.DatabaseDataSet - database name=MySQL database version=5.5.17 database major version=5 database minor version=5 jdbc driver name=MySQL-AB JDBC Driver jdbc driver version=mysql-connector-java-5.1.14 ( Revision: ${bzr.revision-id} ) jdbc driver major version=5 jdbc driver minor version=1 [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\Project\full\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.mycompany.webapp.listener.StartupListenerTest DEBUG [main] LookupDaoHibernate.getRoles(38) | Retrieving all role names... Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.309 sec Running com.mycompany.webapp.action.PasswordHintActionTest WARN [main] PasswordHintAction.execute(37) | Username not specified, notifying user that it's a required field. WARN [main] PasswordHintAction.execute(74) | user 'UNKNOWN123' not found... DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -2 WARN [main] PasswordHintAction.execute(74) | user 'manager' not found... DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -2 WARN [main] PasswordHintAction.execute(74) | user 'manager' not found... Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.745 sec Running com.mycompany.webapp.action.SignupActionTest DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: null DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: null WARN [main] JDBCExceptionReporter.logExceptions(233) | SQL Error: 1062, SQLState: 23000 ERROR [main] JDBCExceptionReporter.logExceptions(234) | Duplicate entry 'self-registered@raibledesigns.com' for key 'email' WARN [main] UserManagerImpl.saveUser(96) | could not insert: [org.appfuse.model.User]; SQL [insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, f irst_name, last_name, password, password_hint, phone_number, username, version, website) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationExcep tion: could not insert: [org.appfuse.model.User] WARN [main] SignupAction.save(83) | User 'self-registered' already exists! Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.409 sec Running com.mycompany.webapp.filter.LocaleFilterTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec Running com.mycompany.webapp.action.UserActionTest DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -1 WARN [main] JDBCExceptionReporter.logExceptions(233) | SQL Error: 1062, SQLState: 23000 ERROR [main] JDBCExceptionReporter.logExceptions(234) | Duplicate entry 'matt@raibledesigns.com' for key 'email' ERROR [main] AbstractFlushingEventListener.performExecutions(324) | Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not update: [org.appfuse.model.User#-1] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) at org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:883) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:881) at org.appfuse.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy45.saveUser(Unknown Source) at org.appfuse.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy49.saveUser(Unknown Source) at com.mycompany.webapp.action.UserAction.save(UserAction.java:179) at com.mycompany.webapp.action.UserActionTest.testSaveConflictingUser(UserActionTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'matt@raibledesigns.com' for key 'email' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) at com.mysql.jdbc.Util.getInstance(Util.java:382) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2594) ... 81 more WARN [main] UserManagerImpl.saveUser(96) | could not update: [org.appfuse.model.User#-1]; SQL [update app_user set account_expired=?, account_locked=?, address=?, city=?, country=?, postal_code=?, province=?, credentials_expired=?, email=?, account_enabled=?, first_name=?, last_name=?, password=?, password_hint=?, phone_number=?, username=?, version=?, website=? where id=? and version=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationExcept ion: could not update: [org.appfuse.model.User#-1] DEBUG [main] UserManagerImpl.removeUser(109) | removing user: -2 Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.949 sec <<< FAILURE! Results : Tests in error: testSearch(com.mycompany.webapp.action.UserActionTest) Tests run: 22, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to C:\Project\full\target\surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 25 seconds [INFO] Finished at: Fri Feb 03 09:26:01 EST 2012 [INFO] Final Memory: 45M/109M [INFO] ------------------------------------------------------------------------ C:\Project\full>

    AppFuse JIRA | 5 years ago | Martin Ravell
    org.hibernate.exception.ConstraintViolationException: could not update: [org.appfuse.model.User#-1]
  3. 0

    Basic archetype creation results in database error when doing a mvn install. Should be easy to reproduce (I have done it several times). First create a project using the Quickstart method: C:\Project>mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0 -DgroupId=com.mycompany -DartifactId=full -DarchetypeRepository=http://oss.sonatype .org/content/repositories/appfuse [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] [archetype:generate {execution: default-cli}] [INFO] Generating project in Batch mode [INFO] Archetype defined by properties [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: appfuse-basic-struts-archetype:2.1.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: com.mycompany [INFO] Parameter: artifactId, Value: full [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.mycompany [INFO] Parameter: packageInPathFormat, Value: com/mycompany [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.mycompany [INFO] Parameter: groupId, Value: com.mycompany [INFO] Parameter: artifactId, Value: full [INFO] project created from Archetype in dir: C:\Project\full [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Fri Feb 03 09:25:12 EST 2012 [INFO] Final Memory: 19M/47M [INFO] ------------------------------------------------------------------------ That seems to work fine. Now go into the project and: C:\Project>cd full C:\Project\full>mvn install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building AppFuse Struts 2 Application [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 37 resources [INFO] Copying 16 resources [INFO] Copying 8 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to C:\Project\full\target\classes [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] Copying 11 resources [INFO] Preparing hibernate3:hbm2ddl [WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive invocation. [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 37 resources [INFO] Copying 16 resources [INFO] Copying 8 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] Copying 16 resources [INFO] [hibernate3:hbm2ddl {execution: default}] [INFO] Configuration XML file loaded: file:/C:/Project/full/src/main/resources/hibernate.cfg.xml [INFO] Configuration XML file loaded: file:/C:/Project/full/src/main/resources/hibernate.cfg.xml [INFO] Configuration Properties file loaded: C:\Project\full\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), country varchar(100), postal_code varchar(15), province varchar(100), credentials_e xpired 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 v archar(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); [WARNING] 2 errors occurred while performing <hbm2ddl>. [ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'full.user_role' doesn't exist [ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'full.user_role' doesn't exist [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 7 source files to C:\Project\full\target\test-classes [INFO] [dbunit:operation {execution: test-compile}] 98 [main] INFO org.dbunit.database.DatabaseDataSet - database name=MySQL database version=5.5.17 database major version=5 database minor version=5 jdbc driver name=MySQL-AB JDBC Driver jdbc driver version=mysql-connector-java-5.1.14 ( Revision: ${bzr.revision-id} ) jdbc driver major version=5 jdbc driver minor version=1 [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\Project\full\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.mycompany.webapp.listener.StartupListenerTest DEBUG [main] LookupDaoHibernate.getRoles(38) | Retrieving all role names... Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.309 sec Running com.mycompany.webapp.action.PasswordHintActionTest WARN [main] PasswordHintAction.execute(37) | Username not specified, notifying user that it's a required field. WARN [main] PasswordHintAction.execute(74) | user 'UNKNOWN123' not found... DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -2 WARN [main] PasswordHintAction.execute(74) | user 'manager' not found... DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -2 WARN [main] PasswordHintAction.execute(74) | user 'manager' not found... Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.745 sec Running com.mycompany.webapp.action.SignupActionTest DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: null DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: null WARN [main] JDBCExceptionReporter.logExceptions(233) | SQL Error: 1062, SQLState: 23000 ERROR [main] JDBCExceptionReporter.logExceptions(234) | Duplicate entry 'self-registered@raibledesigns.com' for key 'email' WARN [main] UserManagerImpl.saveUser(96) | could not insert: [org.appfuse.model.User]; SQL [insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, f irst_name, last_name, password, password_hint, phone_number, username, version, website) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationExcep tion: could not insert: [org.appfuse.model.User] WARN [main] SignupAction.save(83) | User 'self-registered' already exists! Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.409 sec Running com.mycompany.webapp.filter.LocaleFilterTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec Running com.mycompany.webapp.action.UserActionTest DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG [main] UserDaoHibernate.saveUser(49) | user's id: -1 WARN [main] JDBCExceptionReporter.logExceptions(233) | SQL Error: 1062, SQLState: 23000 ERROR [main] JDBCExceptionReporter.logExceptions(234) | Duplicate entry 'matt@raibledesigns.com' for key 'email' ERROR [main] AbstractFlushingEventListener.performExecutions(324) | Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not update: [org.appfuse.model.User#-1] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) at org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:883) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:881) at org.appfuse.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy45.saveUser(Unknown Source) at org.appfuse.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy49.saveUser(Unknown Source) at com.mycompany.webapp.action.UserAction.save(UserAction.java:179) at com.mycompany.webapp.action.UserActionTest.testSaveConflictingUser(UserActionTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'matt@raibledesigns.com' for key 'email' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) at com.mysql.jdbc.Util.getInstance(Util.java:382) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2594) ... 81 more WARN [main] UserManagerImpl.saveUser(96) | could not update: [org.appfuse.model.User#-1]; SQL [update app_user set account_expired=?, account_locked=?, address=?, city=?, country=?, postal_code=?, province=?, credentials_expired=?, email=?, account_enabled=?, first_name=?, last_name=?, password=?, password_hint=?, phone_number=?, username=?, version=?, website=? where id=? and version=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationExcept ion: could not update: [org.appfuse.model.User#-1] DEBUG [main] UserManagerImpl.removeUser(109) | removing user: -2 Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.949 sec <<< FAILURE! Results : Tests in error: testSearch(com.mycompany.webapp.action.UserActionTest) Tests run: 22, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to C:\Project\full\target\surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 25 seconds [INFO] Finished at: Fri Feb 03 09:26:01 EST 2012 [INFO] Final Memory: 45M/109M [INFO] ------------------------------------------------------------------------ C:\Project\full>

    AppFuse JIRA | 5 years ago | Martin Ravell
    org.hibernate.exception.ConstraintViolationException: could not update: [org.appfuse.model.User#-1]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CustomWare JIRA Connector Plugin 1.0.13: Duplicate entry '0' for key 'PRIMARY' - Atlassian Answers

    atlassian.com | 1 year ago
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'

  1. DoktorDoener666 7 times, last 3 months ago
  2. mauritius 1 times, last 4 months ago
  3. dafman 6 times, last 7 months ago
  4. davidvanlaatum 6 times, last 7 months ago
  5. kuldeep 8 times, last 7 months ago
10 more registered users
45 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

    Duplicate entry 'matt@raibledesigns.com' for key 'email'

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    4 frames
  3. MySQL jdbc
    PreparedStatement.executeUpdate
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2. com.mysql.jdbc.Util.getInstance(Util.java:382)
    3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    6. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    7. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    8. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    9. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    10. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    11. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    12. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    12 frames
  4. Commons DBCP
    DelegatingPreparedStatement.executeUpdate
    1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    2. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    3. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    3 frames
  5. Hibernate
    AbstractEntityPersister.update
    1. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2594)
    2. org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494)
    3. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821)
    3 frames
  6. Hibernate
    EntityUpdateAction.execute
    1. org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
    1 frame
  7. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
    3 frames
  8. Hibernate
    SessionImpl.flush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    3 frames
  9. Hibernate
    HibernateTemplate.flush
    1. org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:883)
    2. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
    3. org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    4. org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:881)
    4 frames
  10. org.appfuse.dao
    UserDaoHibernate.saveUser
    1. org.appfuse.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.java:53)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  12. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  13. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    1 frame
  14. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    2 frames
  15. Unknown
    $Proxy45.saveUser
    1. $Proxy45.saveUser(Unknown Source)
    1 frame
  16. org.appfuse.service
    UserManagerImpl.saveUser
    1. org.appfuse.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java:93)
    1 frame
  17. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  18. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  19. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    1 frame
  20. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    4. org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
    5. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    5 frames
  21. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    1 frame
  22. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    4 frames
  23. Unknown
    $Proxy49.saveUser
    1. $Proxy49.saveUser(Unknown Source)
    1 frame
  24. com.mycompany.webapp
    UserActionTest.testSaveConflictingUser
    1. com.mycompany.webapp.action.UserAction.save(UserAction.java:179)
    2. com.mycompany.webapp.action.UserActionTest.testSaveConflictingUser(UserActionTest.java:78)
    2 frames
  25. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  26. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    5 frames
  27. Spring TestContext
    RunBeforeTestMethodCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
    1 frame
  28. JUnit
    RunAfters.evaluate
    1. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    1 frame
  29. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
    2. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
    3 frames
  30. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    2. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    3. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    4. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    5. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    6. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    6 frames
  31. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    2 frames
  32. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    1 frame
  33. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
    1 frame
  34. JUnit4 Provider
    JUnit4TestSet.execute
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    1 frame
  35. SureFire
    Surefire.run
    1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    3. org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    3 frames
  36. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  37. SureFire
    SurefireBooter.main
    1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
    2 frames