This is a PDF version of Article CS277708 and may be out of date. For the latest version click here
Article - CS277708

Anomaly detection fails with "java.lang.RuntimeException: Could not serialize PMML to a string" in ThingWorx 8.1

Created: 12-Jan-2018   |   Modified: 12-Jan-2018   

Applies To

  • ThingWorx Analytics 8.1
  • java 9

Description

  • Anomaly detection goes from Calibrating to Training and then to Failed status,
  • Following error appears in training microservice
ERROR [2018-01-12 08:32:56,247] com.thingworx.analytics.ccc.job.local.AsynchronousMemoryJobExecutor: Call to TrainingJob [20180112] failed due to:
! java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
! at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
! at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(UnknownSource)
! at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
! at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:532)
! at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:205)
! ... 23 common frames omitted
! Causing: javax.xml.bind.JAXBException: null
! at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:207)
! at javax.xml.bind.ContextFinder.find(ContextFinder.java:414)
! at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
! at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565)
! at org.jpmml.model.JAXBUtil.getContext(JAXBUtil.java:125)
! at org.jpmml.model.JAXBUtil.createMarshaller(JAXBUtil.java:153)
! at org.jpmml.model.JAXBUtil.marshal(JAXBUtil.java:99)
! at org.jpmml.model.JAXBUtil.marshalPMML(JAXBUtil.java:89)
! at com.thingworx.analytics.training.results.model.PmmlModel.pmmlAsString(PmmlModel.java:93)
! ... 15 common frames omitted
! Causing: java.lang.RuntimeException: Could not serialize PMML to a string
! at com.thingworx.analytics.training.results.model.PmmlModel.pmmlAsString(PmmlModel.java:96)
! at com.thingworx.analytics.training.results.model.impl.ModelServiceModelSource.store(ModelServiceModelSource.java:115)
! at com.thingworx.analytics.training.results.model.impl.ModelServiceModelSource.store(ModelServiceModelSource.java:46)
! at com.thingworx.analytics.training.core.TrainingRunner.storeModel(TrainingRunner.java:166)
! at com.thingworx.analytics.training.core.TrainingRunner.run(TrainingRunner.java:127)
! at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
! at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
! at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
! at java.base/java.lang.reflect.Method.invoke(Unknown Source)
! at com.thingworx.analytics.training.core.TrainingJob.run(TrainingJob.java:72)
! at com.thingworx.analytics.ccc.job.local.AsynchronousMemoryJobExecutor$1.call(AsynchronousMemoryJobExecutor.java:88)
! at com.thingworx.analytics.ccc.job.local.AsynchronousMemoryJobExecutor$1.call(AsynchronousMemoryJobExecutor.java:77)
! at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
! at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

! at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
! at java.base/java.lang.Thread.run(Unknown Source)