One of our servers throws 500 errors every morning (last three days in a row.) I can trace this back to a corrupted hibernated session that is caused by a bad PublisherQueueJob. This job tries to run shortly after the database comes back up in the wee hours of the morning.
It only affects the one server, the other server in the cluster is fine. Restarting this server clears up the issue, but we'd rather not have it crash every morning.
Also, where can we find/modify the schedule for automated tasks? We would like to make sure they are scheduled around our database downtime and not during.
Here's the details of the error, which starts at 3:42 AM:
[17/10/13 03:42:00:110 EDT] ERROR business.PublisherQueueJob: Unable to save Object to Hibernate Session
com.dotmarketing.exception.DotHibernateException: Unable to save Object to Hibernate Session
at com.dotmarketing.db.HibernateUtil.save(HibernateUtil.java:450)
at com.dotmarketing.business.RoleFactoryImpl.addRoleToUser(RoleFactoryImpl.java:210)
at com.dotmarketing.business.RoleAPIImpl.addRoleToUser(RoleAPIImpl.java:160)
at com.dotmarketing.business.RoleAPIImpl.addRoleToUser(RoleAPIImpl.java:165)
at com.dotmarketing.business.UserAPIImpl.getSystemUser(UserAPIImpl.java:127)
at com.dotcms.enterprise.publishing.PublishDateUpdater.updatePublishExpireDates(SourceFile:22)
at com.dotcms.publisher.business.PublisherQueueJob.execute(PublisherQueueJob.java:54)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.dotmarketing.business.UsersRoles#5efa29d4-f469-4329-b0b2-38bb43d767dd]
at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:73)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at com.dotmarketing.db.HibernateUtil.save(HibernateUtil.java:448)
... 8 more
Caused by: java.sql.SQLException: ORA-00001: unique constraint (DOTCMS.USERS_CMS_ROLES1_UNIQUE) violated
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1061)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
... 15 more
Nathan
Nathan I. Keiter
Lead Network Applications Programmer
DataSystems
Gettysburg College
Campus Box 2453
717-337-6993
Measure your success by the level of service you provide.
Si hoc legere scis nimium eruditionis habes.