JS - JobScheduler
  1. JS - JobScheduler
  2. JS-1792

Web service /api/order?return=JocOrderStatistics fixed

    Details

      Description

      Current Situation

      • The web service /api/order?return=JocOrderStatistics may fail with an error when used with distributed orders.
      • The shown exception is
        .10 08:07:33.968 com.sos.scheduler.engine.plugins.newwebservice.routes.ApiRoute [WARN ] - XmlException: java.lang.IllegalArgumentException: For input string: "yes" - In <order> (:1:1)
        XmlException: java.lang.IllegalArgumentException: For input string: "yes" - In <order> (:1:1)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader.wrapException(ScalaXMLEventReader.scala:140)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader.parseElement(ScalaXMLEventReader.scala:65)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader.parseElement(ScalaXMLEventReader.scala:58)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3.apply(DatabaseOrders.scala:151)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3.apply(DatabaseOrders.scala:149)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$$anonfun$parseDocument$1$$anonfun$apply$3.apply(ScalaXMLEventReader.scala:251)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader.parseDocument(ScalaXMLEventReader.scala:30)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$$anonfun$parseDocument$1.apply(ScalaXMLEventReader.scala:250)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$$anonfun$parseDocument$1.apply(ScalaXMLEventReader.scala:249)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$$anonfun$1.apply(AutoClosing.scala:26)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.closeOnError(AutoClosing.scala:34)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.autoClosing(AutoClosing.scala:25)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$.parseDocument(ScalaXMLEventReader.scala:249)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$.apply(DatabaseOrders.scala:149)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$com$sos$scheduler$engine$kernel$order$DatabaseOrders$$fetchDistributedOrderStatistics$1$$anonfun$apply$5.apply(DatabaseOrders.scala:85)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$com$sos$scheduler$engine$kernel$order$DatabaseOrders$$fetchDistributedOrderStatistics$1$$anonfun$apply$5.apply(DatabaseOrders.scala:85)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$$anonfun$1.apply(AutoClosing.scala:26)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.closeOnError(AutoClosing.scala:34)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.autoClosing(AutoClosing.scala:25)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$com$sos$scheduler$engine$kernel$order$DatabaseOrders$$fetchDistributedOrderStatistics$1.apply(DatabaseOrders.scala:85)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$com$sos$scheduler$engine$kernel$order$DatabaseOrders$$fetchDistributedOrderStatistics$1.apply(DatabaseOrders.scala:80)
        	at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread$$anon$3.block(ThreadPoolBuilder.scala:167)
        	at scala.concurrent.forkjoin.ForkJoinPool.managedBlock(ForkJoinPool.java:3640)
        	at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread.blockOn(ThreadPoolBuilder.scala:165)
        	at scala.concurrent.package$.blocking(package.scala:123)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$.com$sos$scheduler$engine$kernel$order$DatabaseOrders$$fetchDistributedOrderStatistics(DatabaseOrders.scala:80)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$fetchDistributedOrderStatistics$1.apply(DatabaseOrders.scala:76)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$$anonfun$fetchDistributedOrderStatistics$1.apply(DatabaseOrders.scala:74)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$$anonfun$1.apply(AutoClosing.scala:26)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.closeOnError(AutoClosing.scala:34)
        	at com.sos.scheduler.engine.common.scalautil.AutoClosing$.autoClosing(AutoClosing.scala:25)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$.fetchDistributedOrderStatistics(DatabaseOrders.scala:74)
        	at com.sos.scheduler.engine.kernel.order.OrderSubsystem$$anonfun$fetchDistributedOrderStatistics$1.apply(OrderSubsystem.scala:101)
        	at com.sos.scheduler.engine.kernel.order.OrderSubsystem$$anonfun$fetchDistributedOrderStatistics$1.apply(OrderSubsystem.scala:100)
        	at com.sos.scheduler.engine.kernel.database.JdbcConnectionPool$$anonfun$readOnly$1.apply(JdbcConnectionPool.scala:29)
        	at com.sos.scheduler.engine.kernel.database.JdbcConnectionPool$$anonfun$readOnly$1.apply(JdbcConnectionPool.scala:27)
        	at com.sos.scheduler.engine.kernel.database.JdbcConnectionPool$$anonfun$future$1$$anonfun$apply$1.apply(JdbcConnectionPool.scala:36)
        	at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread$$anon$3.block(ThreadPoolBuilder.scala:167)
        	at scala.concurrent.forkjoin.ForkJoinPool.managedBlock(ForkJoinPool.java:3640)
        	at akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread.blockOn(ThreadPoolBuilder.scala:165)
        	at scala.concurrent.package$.blocking(package.scala:123)
        	at com.sos.scheduler.engine.kernel.database.JdbcConnectionPool$$anonfun$future$1.apply(JdbcConnectionPool.scala:34)
        	at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
        	at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
        	at com.sos.scheduler.engine.common.concurrent.ThrottledExecutionContext$$anon$2.run(ThrottledExecutionContext.scala:33)
        	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
        	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)
        	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
        Caused by: java.lang.IllegalArgumentException: For input string: "yes"
        	at scala.collection.immutable.StringLike$class.parseBoolean(StringLike.scala:291)
        	at scala.collection.immutable.StringLike$class.toBoolean(StringLike.scala:261)
        	at scala.collection.immutable.StringOps.toBoolean(StringOps.scala:29)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3$$anonfun$apply$1$$anonfun$apply$mcV$sp$3.apply(DatabaseOrders.scala:155)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3$$anonfun$apply$1$$anonfun$apply$mcV$sp$3.apply(DatabaseOrders.scala:152)
        	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
        	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3$$anonfun$apply$1.apply$mcV$sp(DatabaseOrders.scala:152)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3$$anonfun$apply$1.apply(DatabaseOrders.scala:151)
        	at com.sos.scheduler.engine.kernel.order.DatabaseOrders$OrderXmlResolved$$anonfun$3$$anonfun$apply$1.apply(DatabaseOrders.scala:151)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$$anonfun$parseElement$1$$anonfun$apply$2.apply(ScalaXMLEventReader.scala:73)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader.parseStartElement(ScalaXMLEventReader.scala:86)
        	at com.sos.scheduler.engine.common.scalautil.xmls.ScalaXMLEventReader$$anonfun$parseElement$1.apply(ScalaXMLEventReader.scala:72)
        	... 51 more
        

      Desired Behavior

      • The web service /api/order?return=JocOrderStatistics should not fail with an error when used with distributed orders.

      Maintainer Notes

      • This issue currently is not approved as the underlying conditions are not clearly identified, i.e. the original problem cannot be reproduced.
      • However, a problem with the web service has been identified and has been fixed.
      • Therefore let us know should you find exceptions in JobScheduler Master log files similar to what is stated with the issue description.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Joacim Zschimmer
            Reporter:
            Joacim Zschimmer
            Approver:
            Uwe Risse
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: