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

JITL job housekeeping/scheduler_cleanup_history breaks for records on "2015-03-08 02:32:13"

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.8
    • 1.8.3, 1.9.3, 1.10
    • MySQL DB with Maria JDBC

    Description

      Current Situation
      The job housekeeping/scheduler_cleanup_history has breaks with error if it find a record with the date "2015-03-08 02:32:13". Perhaps other dates creates this trouble too.

      2015-05-06 08:56:49.635-0500 [info]   SCHEDULER-918  state=starting (at=2015-05-06 08:56:49.600-0500)
      2015-05-06 08:56:50.661-0500 [info]    INFO [main] (JobSchedulerJobAdapter.java:120) - 1.8.0 (2015-01-23 00:16, revision 122dc8f52c28aa5ea70cc4ba400c610965aef02b) Copyright 2003-2014 SOS GmbH Berlin
      2015-05-06 08:58:53.033-0500 [info]    INFO [main] (JobSchedulerCleanupSchedulerDb.java:109) - 8670 records deleted from SCHEDULER_ORDER_HISTORY that are older than 7 days
      2015-05-06 08:58:56.208-0500 [info]   org.hibernate.exception.GenericJDBCException: could not execute query
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.doList(Loader.java:2536)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.list(Loader.java:2271)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      2015-05-06 08:58:56.208-0500 [info]   	at com.sos.scheduler.history.db.SchedulerTaskHistoryDBLayer.getListOfItemsToDelete(SchedulerTaskHistoryDBLayer.java:464)
      2015-05-06 08:58:56.208-0500 [info]   	at com.sos.hibernate.layer.SOSHibernateIntervalDBLayer.deleteInterval(SOSHibernateIntervalDBLayer.java:66)
      2015-05-06 08:58:56.208-0500 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDb.Execute(JobSchedulerCleanupSchedulerDb.java:113)
      2015-05-06 08:58:56.208-0500 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDbJSAdapterClass.doProcessing(JobSchedulerCleanupSchedulerDbJSAdapterClass.java:104)
      2015-05-06 08:58:56.208-0500 [info]   	at com.sos.jitl.housekeeping.cleanupdb.JobSchedulerCleanupSchedulerDbJSAdapterClass.spooler_process(JobSchedulerCleanupSchedulerDbJSAdapterClass.java:59)
      2015-05-06 08:58:56.208-0500 [info]   Caused by: java.sql.SQLException: Could not parse column as timestamp, was: "2015-03-08 02:32:13"
      2015-05-06 08:58:56.208-0500 [info]   	at org.mariadb.jdbc.internal.SQLExceptionMapper.getSQLException(SQLExceptionMapper.java:154)
      2015-05-06 08:58:56.208-0500 [info]   	at org.mariadb.jdbc.MySQLResultSet.getTimestamp(MySQLResultSet.java:3508)
      2015-05-06 08:58:56.208-0500 [info]   	at org.mariadb.jdbc.MySQLResultSet.getTimestamp(MySQLResultSet.java:273)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.descriptor.sql.TimestampTypeDescriptor$2.doExtract(TimestampTypeDescriptor.java:62)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:254)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:250)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:230)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:331)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.getRow(Loader.java:1355)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.doQuery(Loader.java:829)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      2015-05-06 08:58:56.208-0500 [info]   	at org.hibernate.loader.Loader.doList(Loader.java:2533)
      2015-05-06 08:58:56.208-0500 [info]   	... 12 more
      2015-05-06 08:58:56.208-0500 [info]   Caused by: java.text.ParseException: Unparseable date: "2015-03-08 02:32:13"
      2015-05-06 08:58:56.208-0500 [info]   	at java.text.DateFormat.parse(Unknown Source)
      2015-05-06 08:58:56.208-0500 [info]   	at org.mariadb.jdbc.internal.common.AbstractValueObject.getTimestamp(AbstractValueObject.java:262)
      2015-05-06 08:58:56.208-0500 [info]   	at org.mariadb.jdbc.MySQLResultSet.getTimestamp(MySQLResultSet.java:3506)
      2015-05-06 08:58:56.208-0500 [info]   	... 27 more
      2015-05-06 08:58:56.210-0500 [ERROR]  COM-80020009  DISP_E_EXCEPTION [step] [] [Z-JAVA-105  Java exception com.sos.JSHelper.Exceptions.JobSchedulerException: JSJ_F_107: JobSchedulerCleanupSchedulerDb::Execute - abended with sever errors
      2015-05-06 08:58:56.210-0500 [ERROR]  
      2015-05-06 08:58:56.210-0500 [ERROR]  DESCRIPTION
      2015-05-06 08:58:56.210-0500 [ERROR]  the program terminated with an serious error.
      2015-05-06 08:58:56.210-0500 [ERROR]  In many cases this is due to a raised exception.
      2015-05-06 08:58:56.210-0500 [ERROR]  
      2015-05-06 08:58:56.210-0500 [ERROR]  REASON
      2015-05-06 08:58:56.210-0500 [ERROR]  *** no detailed explanation available ***, method=spooler_process()Z [], in Remote_module_instance_server::step], method=call
      2015-05-06 08:58:56.221-0500 [info]   Job sos/housekeeping/scheduler_cleanup_history terminated.
      2015-05-06 08:58:56.357-0500 [WARN]   SCHEDULER-280  Process terminated with exit code 1 (0x1)
      

      Desired Situation
      The job housekeeping/scheduler_cleanup_history should work with all dates
      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
              oh Oliver Haufe
              Santiago Aucejo Petzoldt Santiago Aucejo Petzoldt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified