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 Kuali JIRA by Mindi Balmer, 2 years ago
OJB operation; SQL []; Duplicate entry '3165-0-1202-0-RGH-2013-08-28 16:42:00-2013-08-28 21:00:00-2013-0' for key 'TK_TIME_BLOCK_IDX1'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3165-0-1202-0-RGH-2013-08-28 16:42:00-2013-08-28 21:00:00-2013-0' for key 'TK_TIME_BLOCK_IDX1'
via Kuali JIRA by Mindi Balmer, 1 year ago
OJB operation; SQL []; Duplicate entry '3165-0-1202-0-RGH-2013-08-28 16:42:00-2013-08-28 21:00:00-2013-0' for key 'TK_TIME_BLOCK_IDX1'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3165-0-1202-0-RGH-2013-08-28 16:42:00-2013-08-28 21:00:00-2013-0' for key 'TK_TIME_BLOCK_IDX1'
via Kuali JIRA by Mindi Balmer, 2 years ago
OJB operation; SQL []; Duplicate entry '4089-0-1102-0-RGH-2013-12-02 15:26:51-2013-12-02 15:41:00-2013-1' for key 'TK_TIME_BLOCK_IDX1'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4089-0-1102-0-RGH-2013-12-02 15:26:51-2013-12-02 15:41:00-2013-1' for key 'TK_TIME_BLOCK_IDX1'
via Kuali JIRA by Mindi Balmer, 1 year ago
OJB operation; SQL []; Duplicate entry '4089-0-1102-0-RGH-2013-12-02 15:26:51-2013-12-02 15:41:00-2013-1' for key 'TK_TIME_BLOCK_IDX1'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4089-0-1102-0-RGH-2013-12-02 15:26:51-2013-12-02 15:41:00-2013-1' for key 'TK_TIME_BLOCK_IDX1'
via Kuali JIRA by Mindi Balmer, 1 year ago
OJB operation; SQL []; Column 'USER_PRINCIPAL_ID' cannot be null; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'USER_PRINCIPAL_ID' cannot be null
via Kuali JIRA by Mindi Balmer, 2 years ago
OJB operation; SQL []; Column 'USER_PRINCIPAL_ID' cannot be null; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'USER_PRINCIPAL_ID' cannot be null
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3165-0-1202-0-RGH-2013-08-28 16:42:00-2013-08-28 21:00:00-2013-0' for key 'TK_TIME_BLOCK_IDX1'	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)	at com.mysql.jdbc.Util.getInstance(Util.java:381)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1016)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2022)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1940)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1925)	at org.enhydra.jdbc.core.CorePreparedStatement.executeUpdate(CorePreparedStatement.java:102)	at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown Source)	at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown Source)	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)	at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown Source)	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown Source)	at org.springmodules.orm.ojb.PersistenceBrokerTemplate$9.doInPersistenceBroker(PersistenceBrokerTemplate.java:246)	at org.springmodules.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:141)	at org.springmodules.orm.ojb.PersistenceBrokerTemplate.store(PersistenceBrokerTemplate.java:244)	at org.kuali.rice.krad.dao.impl.BusinessObjectDaoOjb.save(BusinessObjectDaoOjb.java:261)	at org.kuali.rice.krad.dao.proxy.BusinessObjectDaoProxy.save(BusinessObjectDaoProxy.java:254)	at sun.reflect.GeneratedMethodAccessor823.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)	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$1.proceedWithInvocation(TransactionInterceptor.java:96)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	at com.sun.proxy.$Proxy294.save(Unknown Source)	at org.kuali.rice.krad.service.impl.BusinessObjectServiceImpl.save(BusinessObjectServiceImpl.java:77)	at sun.reflect.GeneratedMethodAccessor822.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)	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$1.proceedWithInvocation(TransactionInterceptor.java:96)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	at com.sun.proxy.$Proxy295.save(Unknown Source)	at org.kuali.kpme.tklm.time.timeblock.service.TimeBlockServiceImpl.saveTimeBlocks(TimeBlockServiceImpl.java:191)	at sun.reflect.GeneratedMethodAccessor2041.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:58)	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:214)	at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	at com.sun.proxy.$Proxy446.saveTimeBlocks(Unknown Source)	at sun.reflect.GeneratedMethodAccessor2041.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:58)	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:214)	at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)	at com.sun.proxy.$Proxy447.saveTimeBlocks(Unknown Source)	at org.kuali.kpme.tklm.time.missedpunch.service.MissedPunchServiceImpl.buildTimeBlockRunRules(MissedPunchServiceImpl.java:258)	at org.kuali.kpme.tklm.time.missedpunch.service.MissedPunchServiceImpl.addClockLogAndTimeBlocks(MissedPunchServiceImpl.java:197)	at org.kuali.kpme.tklm.time.missedpunch.service.MissedPunchServiceImpl.updateClockLog(MissedPunchServiceImpl.java:150)	at org.kuali.kpme.tklm.time.missedpunch.web.MissedPunchDocumentController.approve(MissedPunchDocumentController.java:139)	at org.kuali.kpme.tklm.time.missedpunch.web.MissedPunchDocumentController$$FastClassByCGLIB$$4f85abd.invoke()	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)	at org.kuali.kpme.tklm.time.missedpunch.web.MissedPunchDocumentController$$EnhancerByCGLIB$$24bca345.approve()	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.kew.web.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:78)	at org.kuali.rice.kew.web.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:62)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:89)	at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:77)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:327)	at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:75)	at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)	at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:201)	at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)	at org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:107)	at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)	at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)	at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)	at org.kuali.rice.krad.web.filter.BootstrapFilter.doFilter(BootstrapFilter.java:199)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:213)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)	at java.lang.Thread.run(Thread.java:722)