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

Solutions on the web

via AppFuse JIRA by Irshad A. Buchh, 1 year ago
could not insert: [edu.ksu.model.User]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [edu.ksu.model.User]
via AppFuse JIRA by Irshad A. Buchh, 2 years ago
could not insert: [edu.ksu.model.User]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [edu.ksu.model.User]
via Liferay Issues by Kenji Heigel, 1 year ago
Could not execute JDBC batch update; SQL [insert into PortletPreferences (ownerId, ownerType, plid, portletId, preferences, portletPreferencesId) values (?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
via Liferay Issues by Kenji Heigel, 1 year ago
Could not execute JDBC batch update; SQL [insert into PortletPreferences (ownerId, ownerType, plid, portletId, preferences, portletPreferencesId) values (?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
via liferay.com by Unknown author, 2 years ago
Could not execute JDBC batch update; SQL [insert into PortletPreferences (ownerId, ownerType, plid, portletId, preferences, portletPreferencesId) values (?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
via Liferay Issues by Michael Bowerman, 7 months ago
could not update: [com.liferay.portal.model.impl.ResourceBlockImpl#4006]; SQL [update ResourceBlock set mvccVersion=?, permissionsHash=? where resourceBlockId=? and mvccVersion=?]; constraint [GIPRTLE2.IX_AEEA209C]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [com.liferay.portal.model.impl.ResourceBlockImpl#4006]
java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_CT_88 in statement [insert into app_user (id, 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) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]	at org.hsqldb.jdbc.Util.throwError(Unknown Source)	at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)	at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:33)	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2163)	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2643)	at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:51)	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)	at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)	at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)	at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)	at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)	at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)	at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)	at org.springframework.orm.hibernate3.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:747)	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)	at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)	at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:744)	at edu.ksu.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.java:48)	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:585)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)	at $Proxy39.saveUser(Unknown Source)	at edu.ksu.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java:101)	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:585)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	at $Proxy43.saveUser(Unknown Source)	at edu.ksu.webapp.action.UserForm.save(UserForm.java:135)	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:585)	at com.sun.el.parser.AstValue.invoke(AstValue.java:187)	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)	at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)	at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)	at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)	at javax.faces.component.UICommand.broadcast(UICommand.java:121)	at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)	at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)	at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405)	at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at edu.ksu.webapp.filter.MessageFilter.doFilter(MessageFilter.java:46)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:75)	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:92)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at edu.ksu.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:74)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at com.opensymphony.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:42)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:172)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:61)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)	at org.mortbay.jetty.Server.handle(Server.java:324)	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)