com.nmemc.webapp.controller.SignupControllerTest

AppFuse JIRA | xie amao | 4 years ago
  1. 0

    I successfuly run "appfuse:full-source" command,and then run "mvn" commmand, I found The cursor is stopped at the following line , do not suggest any error messages. ......................... DEBUG - UserFormController.showForm(172) | checking for remember me login... DEBUG - UserFormController.onSubmit(72) | entering 'onSubmit' method... .......................... the complet information as follow: WARN - UserManagerImpl.saveUser(107) | 违反了 UNIQUE KEY 约束 'UQ__app_user__F3D BC572286302EC'。不能在对象 'dbo.app_user' 中插入重复键。; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException : 违反了 UNIQUE KEY 约束 'UQ__app_user__F3DBC572286302EC'。不能在对象 'dbo.app_u ser' 中插入重复键。 at org.springframework.test.context.junit4.statements.SpringRepeat.evalu ate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runCh ild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun ner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.157 sec at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores. java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestClass Callbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja va:31) at org.springframework.test.context.junit4.statements.RunAfterTestClassC allbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(S pringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su refireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:1009) Caused by: org.hibernate.exception.ConstraintViolationException: 违反了 UNIQUE K EY 约束 'UQ__app_user__F3DBC572286302EC'。不能在对象 'dbo.app_user' 中插入重复键 。 at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(S QLStateConversionDelegate.java:128) at org.hibernate.exception.internal.StandardSQLExceptionConverter.conver t(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlException Helper.java:125) Running com.nmemc.webapp.controller.SignupControllerTest at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlException Helper.java:110) at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandle r.continueInvocation(AbstractStatementProxyHandler.java:129) at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke( AbstractProxyHandler.java:81) at $Proxy60.executeUpdate(Unknown Source) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAn dExtract(IdentityGenerator.java:96) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(Abstr actReturningDelegate.java:58) at org.hibernate.persister.entity.AbstractEntityPersister.insert(Abstrac tEntityPersister.java:2936) at org.hibernate.persister.entity.AbstractEntityPersister.insert(Abstrac tEntityPersister.java:3447) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(Enti tyIdentityInsertAction.java:81) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(Ac tionQueue.java:203) at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java :183) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:167) at org.hibernate.event.internal.AbstractSaveEventListener.addInsertActio n(AbstractSaveEventListener.java:320) at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrR eplicate(AbstractSaveEventListener.java:287) at org.hibernate.event.internal.AbstractSaveEventListener.performSave(Ab stractSaveEventListener.java:193) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGenera tedId(AbstractSaveEventListener.java:126) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWit hGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityI sTransient(DefaultSaveOrUpdateEventListener.java:189) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.perform SaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114) at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveO rUpdate(DefaultSaveOrUpdateEventListener.java:90) at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java: 727) at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:719) at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:715) at com.nmemc.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.ja va:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:319) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:150) at org.springframework.dao.support.PersistenceExceptionTranslationInterc eptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) ... 59 more Caused by: java.sql.SQLException: 违反了 UNIQUE KEY 约束 'UQ__app_user__F3DBC572 286302EC'。不能在对象 'dbo.app_user' 中插入重复键。 at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.j ava:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement. java:525) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java :487) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPre paredStatement.java:421) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandle r.continueInvocation(AbstractStatementProxyHandler.java:122) ... 90 more WARN - UserManagerImpl.saveUser(93) | SaltSource not set, encrypting password w/ o salt DEBUG - UserDaoHibernate.saveUser(56) | user's id: null DEBUG - SignupController.onSubmit(99) | Sending user 'self-registered' an accoun t information e-mail DEBUG - BaseFormController.sendUserMessage(178) | sending e-mail to user [self-r egistered@raibledesigns.com]... Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.191 sec Running com.nmemc.service.impl.UserManagerImplTest WARN - UserManagerImpl.saveUser(100) | PasswordEncoder not set, skipping passwor d encryption... org.springframework.dao.DataIntegrityViolationException: at org.jmock.lib.action.ThrowAction.invoke(ThrowAction.java:27) at org.jmock.internal.InvocationExpectation.invoke(InvocationExpectation .java:114) at org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher .java:52) at org.jmock.Mockery.dispatch(Mockery.java:218) WARN - UserManagerImpl.saveUser(107) | at org.jmock.Mockery.access$000(Mockery.java:43) DEBUG - UserManagerImplTest.testUserExistsException(134) | expected exception: U ser 'admin' already exists! at org.jmock.Mockery$MockObject.invoke(Mockery.java:258) at org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java: 27) at org.jmock.internal.FakeObjectMethods.invoke(FakeObjectMethods.java:38 ) at org.jmock.lib.JavaReflectionImposteriser$1.invoke(JavaReflectionImpos teriser.java:33) at $Proxy66.saveUser(Unknown Source) at com.nmemc.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java: 104) at com.nmemc.service.impl.UserManagerImplTest.testUserExistsException(Us erManagerImplTest.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66) at org.jmock.integration.junit4.JMock$1.invoke(JMock.java:37) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.ja va:105) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters( MethodRoadie.java:94) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4C lassRunner.java:98) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRu nner.java:61) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner. java:54) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.jav a:34) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java: 44) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.ja va:52) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) WARN - UserManagerImpl.saveUser(100) | PasswordEncoder not set, skipping passwor d encryption... at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su refireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:1009) WARN - UserManagerImpl.saveUser(100) | PasswordEncoder not set, skipping passwor d encryption... DEBUG - UserManagerImpl.removeUser(124) | removing user: 5 Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec Running com.nmemc.service.UserManagerTest DEBUG - UserManagerTest.testGetUser(25) | com.nmemc.model.User@ffd2a3[username=u ser,enabled=true,accountExpired=false,credentialsExpired=false,accountLocked=fal se,Granted Authorities: ,ROLE_USER] DEBUG - UserManagerTest.testSaveUser(34) | saving user with updated phone number : com.nmemc.model.User@13d176a[username=user,enabled=true,accountExpired=false,c redentialsExpired=false,accountLocked=false,Granted Authorities: ,ROLE_USER] DEBUG - UserDaoHibernate.saveUser(56) | user's id: -1 WARN - UserManagerImpl.saveUser(93) | SaltSource not set, encrypting password w/ o salt DEBUG - UserDaoHibernate.saveUser(56) | user's id: null DEBUG - UserManagerTest.testAddAndRemoveUser(55) | removing user... DEBUG - UserManagerImpl.removeUser(124) | removing user: 4 DEBUG - UserManagerTest.testAddAndRemoveUser(63) | org.springframework.security. core.userdetails.UsernameNotFoundException: user 'john' not found... Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec Running com.nmemc.webapp.controller.UserFormControllerTest DEBUG - UserFormControllerTest.testAddWithoutPermission(35) | testing add new us er... WARN - UserFormController.showForm(161) | User 'null' is trying to edit user wit h id 'null' DEBUG - UserFormControllerTest.testEditWithoutPermission(72) | testing edit... WARN - UserFormController.showForm(161) | User 'null' is trying to edit user wit h id '-1' DEBUG - UserFormControllerTest.testEditProfile(86) | testing edit profile... DEBUG - UserFormController.showForm(172) | checking for remember me login... DEBUG - UserFormControllerTest.testAdd(24) | testing add new user... DEBUG - UserFormController.showForm(172) | checking for remember me login... DEBUG - UserFormControllerTest.testCancel(49) | testing cancel... DEBUG - UserFormControllerTest.testEdit(61) | testing edit... DEBUG - UserFormController.showForm(172) | checking for remember me login... DEBUG - UserFormController.onSubmit(72) | entering 'onSubmit' method...

    AppFuse JIRA | 4 years ago | xie amao
    com.nmemc.webapp.controller.SignupControllerTest
  2. 0

    java.sql.SQLException when creating or updating a row

    Stack Overflow | 2 years ago | brevleq
    java.sql.SQLException: Column name 'ALIQUOTAL_ICMS_COMPRA_FP' is invalid.
  3. 0

    Spring's exception translation mechanism not kicking in

    Stack Overflow | 2 years ago
    javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [SPR-1690] SQL Server Error Code 1205 = DeadlockLoser - Spring JIRA

    spring.io | 1 year ago
    java.sql.SQLException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
  6. 0

    java.sql.DataTruncation: Data truncation (JDBC and Relational Databases forum at JavaRanch)

    coderanch.com | 1 year ago
    java.sql.SQLException: Invalid column name 'highschool'.

  1. vmuller 2 times, last 10 months ago
5 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. java.sql.SQLException

    违反了 UNIQUE KEY 约束 'UQ__app_user__F3DBC572 286302EC'。不能在对象 'dbo.app_user' 中插入重复键。

    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic()
  2. jTDS
    JtdsPreparedStatement.executeUpdate
    1. net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
    2. net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
    3. net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
    4. net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
    5. net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
    6. net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
    7. net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
    7 frames
  3. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  4. org.hibernate.engine
    AbstractStatementProxyHandler.continueInvocation
    1. org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
    1 frame
  5. Hibernate
    SqlExceptionHelper.convert
    1. org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
    1 frame
  6. org.hibernate.engine
    AbstractProxyHandler.invoke
    1. org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
    2. org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
    2 frames
  7. Unknown
    $Proxy60.executeUpdate
    1. $Proxy60.executeUpdate(Unknown Source)
    1 frame
  8. Hibernate
    SessionImpl.saveOrUpdate
    1. org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96)
    2. org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58)
    3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2936)
    4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3447)
    5. org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81)
    6. org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
    7. org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:203)
    8. org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:183)
    9. org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:167)
    10. org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:320)
    11. org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
    12. org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
    13. org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:126)
    14. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)
    15. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)
    16. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114)
    17. org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
    18. org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:727)
    19. org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:719)
    20. org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:715)
    20 frames
  9. com.nmemc.dao
    UserDaoHibernate.saveUser
    1. com.nmemc.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.java:58)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  11. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  12. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    1 frame