Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-118

JITL job housekeeping/scheduler_cleanup_history breaks for records on 30.03.2014

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.7
    • 1.8
    • MySQL DB/ JobScheduler engine 1.7.1

    Description

      The job housekeeping/scheduler_cleanup_history works fine for other dates but as as soon as it find records from 30.03.2014 it breaks with error

      2014-10-07 15:49:43.295+0200 [debug]  DEBUG [main] (AbstractBatcher.java:418) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 
      2014-10-07 15:49:43.295+0200 [debug]  TRACE [main] (AbstractBatcher.java:562) - closing statement 
      2014-10-07 15:49:43.300+0200 [debug]  DEBUG [main] (JDBCExceptionReporter.java:225) - could not execute query [select schedulert0_.`ID` as ID1_1_, schedulert0_.`LOG` as LOG2_1_, schedulert0_.`CAUSE` as CAUSE3_1_, schedulert0_.`CLUSTER_MEMBER_ID` as CLUSTER4_1_, schedulert0_.`END_TIME` as END5_1_, schedulert0_.`ERROR` as ERROR6_1_, schedulert0_.`ERROR_CODE` as ERROR7_1_, schedulert0_.`ERROR_TEXT` as ERROR8_1_, schedulert0_.`EXIT_CODE` as EXIT9_1_, schedulert0_.`JOB_NAME` as JOB10_1_, schedulert0_.`PID` as PID11_1_, schedulert0_.`SPOOLER_ID` as SPOOLER12_1_, schedulert0_.`START_TIME` as START13_1_, schedulert0_.`STEPS` as STEPS14_1_ from SCHEDULER_HISTORY schedulert0_ where schedulert0_.`START_TIME`<=? order by schedulert0_.`START_TIME` desc] 
      2014-10-07 15:49:43.301+0200 [WARN]    WARN [main] (JDBCExceptionReporter.java:233) - SQL Error: 0, SQLState: null 
      2014-10-07 15:49:43.303+0200 [ERROR]  ERROR [main] (JDBCExceptionReporter.java:234) - Could not parse field as date 
      2014-10-07 15:49:43.311+0200 [info]    INFO [main] (SessionFactoryImpl.java:927) - closing 
      2014-10-07 15:49:43.313+0200 [info]    INFO [main] (DriverManagerConnectionProvider.java:170) - cleaning up connection pool: jdbc:mysql://mp.sos:3306/sos_scheduler 
      2014-10-07 15:49:43.316+0200 [debug]  TRACE [main] (SessionImpl.java:318) - closing session 
      2014-10-07 15:49:43.316+0200 [debug]  TRACE [main] (ConnectionManager.java:403) - performing cleanup 
      2014-10-07 15:49:43.317+0200 [debug]  DEBUG [main] (ConnectionManager.java:464) - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] 
      2014-10-07 15:49:43.318+0200 [debug]  TRACE [main] (DriverManagerConnectionProvider.java:152) - returning connection to pool, pool size: 1 
      2014-10-07 15:49:43.319+0200 [debug]  DEBUG [main] (JobSchedulerCleanupSchedulerDb.java:164) - JSJ_I_111: JobSchedulerCleanupSchedulerDb::Execute - ended without errors 
      2014-10-07 15:49:43.334+0200 [info]   org.hibernate.exception.GenericJDBCException: could not execute query 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.doList(Loader.java:2536) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.list(Loader.java:2271) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) 
      2014-10-07 15:49:43.334+0200 [info]   	at com.sos.scheduler.history.db.SchedulerTaskHistoryDBLayer.getListOfItemsToDelete(SchedulerTaskHistoryDBLayer.java:464) 
      2014-10-07 15:49:43.334+0200 [info]   	at com.sos.hibernate.layer.SOSHibernateIntervalDBLayer.deleteInterval(SOSHibernateIntervalDBLayer.java:66) 
      2014-10-07 15:49:43.334+0200 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDb.Execute(JobSchedulerCleanupSchedulerDb.java:113) 
      2014-10-07 15:49:43.334+0200 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDbJSAdapterClass.doProcessing(JobSchedulerCleanupSchedulerDbJSAdapterClass.java:104) 
      2014-10-07 15:49:43.334+0200 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDbJSAdapterClass.spooler_process(JobSchedulerCleanupSchedulerDbJSAdapterClass.java:59) 
      2014-10-07 15:49:43.334+0200 [info]   Caused by: java.sql.SQLException: Could not parse field as date 
      2014-10-07 15:49:43.334+0200 [info]   	at org.mariadb.jdbc.internal.SQLExceptionMapper.getSQLException(SQLExceptionMapper.java:161) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.mariadb.jdbc.MySQLResultSet.getTimestamp(MySQLResultSet.java:3508) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.mariadb.jdbc.MySQLResultSet.getTimestamp(MySQLResultSet.java:275) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.descriptor.sql.TimestampTypeDescriptor$2.doExtract(TimestampTypeDescriptor.java:62) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:229) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:330) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.getRow(Loader.java:1355) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.doQuery(Loader.java:829) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) 
      2014-10-07 15:49:43.334+0200 [info]   	at org.hibernate.loader.Loader.doList(Loader.java:2533) 
      2014-10-07 15:49:43.334+0200 [info]   	... 12 more
      2014-10-07 15:49:43.340+0200 [ERROR]  COM-80020009  Ausnahmefehler aufgetreten. [step] [] [Z-JAVA-105  Java exception com.sos.JSHelper.Exceptions.JobSchedulerException: JSJ_F_107: JobSchedulerCleanupSchedulerDb::Execute - abended with sever errors
      2014-10-07 15:49:43.340+0200 [ERROR]  
      2014-10-07 15:49:43.340+0200 [ERROR]  DESCRIPTION
      2014-10-07 15:49:43.340+0200 [ERROR]  the program terminated with an serious error.
      2014-10-07 15:49:43.340+0200 [ERROR]  In many cases this is due to a raised exception.
      2014-10-07 15:49:43.340+0200 [ERROR]  
      2014-10-07 15:49:43.340+0200 [ERROR]  REASON
      2014-10-07 15:49:43.340+0200 [ERROR]  *** no detailed explanation available ***, method=spooler_process()Z [], in Remote_module_instance_server::step], method=call
      2014-10-07 15:49:43.344+0200 [info]   Job sos/housekeeping/scheduler_cleanup_history terminated.
      2014-10-07 15:49:43.416+0200 [WARN]   SCHEDULER-280  Process terminated with exit code 1 (0x1)
      

      Explanation

      • The error only occurs when using maria db jdbc driver
      • It occurs because of the https://mariadb.atlassian.net/browse/CONJ-86
      • It only occurs when an utc time is save in datetime field (start_time or end_time) with a datetime that does not exist in daylight saving time e.g. 2014-03.30 02:01:00*
      • Workaround: Use mysql connector and the mysql jdbc driver
        • <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        • Also use this in factory.ini
        • And delete the mariadb jar file from $scheduler_home/lib/jdbc

      Attachments

        Issue Links

          Activity

            People

              ur Uwe Risse
              mp Mahendra Patidar
              Mahendra Patidar Mahendra Patidar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: