Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    Check whether privilege has the "not null" restriction. If so it always has to have a value and can never be null.

    A different reason could be a wrong implementation of a foreign key. Check whether you always correctly insert/update in both tables.

  2. ,

    Nothing is wrong with the database. When it gives you those errors, it's telling you that you are trying to input "nothing" (null) into a column that doesn't allow it. Fix it by removing the not null constraint or by passing a value to that field.

Solutions on the web

via AppFuse JIRA by Martin Ravell, 1 year ago
could not update: [org.appfuse.model.User#-1]
via AppFuse JIRA by Martin Ravell, 1 year ago
could not update: [org.appfuse.model.User#-1]
via appfuse.org by Unknown author, 2 years ago
via AppFuse JIRA by AlbertWong, 1 year ago
via Stack Overflow by Harish
, 2 years ago
via nabble.com by Unknown author, 2 years ago
could not update: [org.xinus.model.User#-1]
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)	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 undefined.$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 undefined.$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)