Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52366

Error saving jobs utilizing the HPE Application Automation Tools plugin - "TimeslotDuration" class error

      It appears the HPE Application Automation Tools plugin has been impacted by the JEP-200 changes. When an "Execute performance test using Performance Center" build step is added to a freestyle job, and the job is saved or the change is applied an error is thrown.

      Based on the error output the problem is most likely related to JEP-200:

      If you do encounter a log message referencing the https://jenkins.io/redirect/class-filter/ URL, most likely it is a JEP-200 regression.

       

      This is referenced on the webpage bellow:

      https://jenkins.io/blog/2018/03/15/jep-200-lts/

       

      A potential (untested) workaround may be as follows:

      java -Dhudson.remoting.ClassFilter=com.microfocus.adm.performancecenter.plugins.common.pcEntities.TimeslotDuration -jar jenkins.war ...

       

      Error:

      java.lang.UnsupportedOperationException: Refusing to marshal com.microfocus.adm.performancecenter.plugins.common.pcEntities.TimeslotDuration for security reasons; see https://jenkins.io/redirect/class-filter/
      at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      Caused: java.lang.RuntimeException: Failed to serialize com.hpe.application.automation.tools.model.PcModel#timeslotDuration for class com.hpe.application.automation.tools.model.PcModel
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      Caused: java.lang.RuntimeException: Failed to serialize com.hpe.application.automation.tools.run.PcBuilder#pcModel for class com.hpe.application.automation.tools.run.PcBuilder
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
      at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
      at hudson.XmlFile.write(XmlFile.java:193)
      Caused: java.io.IOException
      at hudson.XmlFile.write(XmlFile.java:200)
      at hudson.model.AbstractItem.save(AbstractItem.java:483)
      at hudson.model.Job.save(Job.java:196)
      at hudson.model.AbstractProject.save(AbstractProject.java:289)
      at hudson.BulkChange.commit(BulkChange.java:98)
      at hudson.model.Job.doConfigSubmit(Job.java:1355)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:772)
      at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
      at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
      at com.cloudbees.jenkins.ha.HAHealthCheckFilter.doFilter(HAHealthCheckFilter.java:35)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at com.cloudbees.jenkins.support.impl.cloudbees.UnrestrictedApiCallsMonitor$ApiMonitorFilter.doFilter(UnrestrictedApiCallsMonitor.java:120)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at com.cloudbees.opscenter.client.plugin.OfflineSecurityRealmFilter._doFilter(OfflineSecurityRealmFilter.java:95)
      at com.cloudbees.opscenter.client.plugin.OfflineSecurityRealmFilter.doFilter(OfflineSecurityRealmFilter.java:70)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at com.cloudbees.opscenter.security.ClusterSessionFilter._doFilter(ClusterSessionFilter.java:69)
      at com.cloudbees.opscenter.security.ClusterSessionFilter.doFilter(ClusterSessionFilter.java:44)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.Server.handle(Server.java:564)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
      at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

          [JENKINS-52366] Error saving jobs utilizing the HPE Application Automation Tools plugin - "TimeslotDuration" class error

          Daniel Danan added a comment -

          thanks for the feedback,

          Find newly attached files: "hp-application-automation-tools-plugin.z01" and "hp-application-automation-tools-plugin.zip"

          Two additional classes are whitelisted: java.text.DateFormatSymbols and java.text.DecimalFormatSymbols.

          regards,
          Daniel

          Daniel Danan added a comment - thanks for the feedback, Find newly attached files: "hp-application-automation-tools-plugin.z01" and "hp-application-automation-tools-plugin.zip" Two additional classes are whitelisted: java.text.DateFormatSymbols and java.text.DecimalFormatSymbols. regards, Daniel

          Daniel Danan added a comment -

          classes added to the whiteliste:

          com.microfocus.adm.performancecenter.plugins.common.pcEntities.TimeslotDuration
          java.text.SimpleDateFormat
          java.text.DecimalFormat
          java.text.DateFormatSymbols
          java.text.DecimalFormatSymbols

          Daniel Danan added a comment - classes added to the whiteliste: com.microfocus.adm.performancecenter.plugins.common.pcEntities.TimeslotDuration java.text.SimpleDateFormat java.text.DecimalFormat java.text.DateFormatSymbols java.text.DecimalFormatSymbols

          Oleg Nenashev added a comment -

          Permitting DecimalFormat and SimpleDateFormat is a bad idea IMHO. If you use these persisted classes for date formatting, you are always at risk of concurrency issues. These classes are not thread-safe. My recommendation would be to rework the code and to avoid caching these classes at all

          Oleg Nenashev added a comment - Permitting DecimalFormat and SimpleDateFormat is a bad idea IMHO. If you use these persisted classes for date formatting, you are always at risk of concurrency issues. These classes are not thread-safe. My recommendation would be to rework the code and to avoid caching these classes at all

          Daniel Gront added a comment -

          oleg_nenashev, Would be using DateTimeFormatter be a better alternative? Is there a reason why not to whitelist them?

          Daniel Gront added a comment - oleg_nenashev , Would be using  DateTimeFormatter be a better alternative? Is there a reason why not to whitelist them?

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - According to https://docs.oracle.com/javase/tutorial/datetime/iso/format.html the class is thread-safe  

          Simon Norris added a comment -

          I can confirm the latest version of the plugin allows build steps to be applied or saved without error. The issue now is that the build does not wait for the test to finish, my comment of 20th July above shows the detail (Error code 1001). The test does run in Performance Center but it isn't fed back to the Jenkins job. 

          Would a new bug be appropriate or should it continue within this one?

          Simon Norris added a comment - I can confirm the latest version of the plugin allows build steps to be applied or saved without error. The issue now is that the build does not wait for the test to finish, my comment of 20th July above shows the detail (Error code 1001). The test does run in Performance Center but it isn't fed back to the Jenkins job.  Would a new bug be appropriate or should it continue within this one?

          Daniel Gront added a comment -

          simon_norris, It seems like a new bug, please open a new Jira issue so we can handle this properly.

          Daniel Gront added a comment - simon_norris , It seems like a new bug, please open a new Jira issue so we can handle this properly.

          Hi Folks,

          With updated plugin, I am able to save the job, but when run build .. I am getting another exception like below:

          Mon 07.23.2018 at 02:13:18 PM IST - Login succeeded
          Mon 07.23.2018 at 02:13:18 PM IST - Searching for available Test Instance
          Mon 07.23.2018 at 02:13:20 PM IST - getCorrectTestInstanceID failed, reason: com.thoughtworks.xstream.mapper.CannotResolveClassException: html
          Mon 07.23.2018 at 02:13:20 PM IST - java.lang.NumberFormatException: null
          Mon 07.23.2018 at 02:13:22 PM IST - Logout succeeded
          Mon 07.23.2018 at 02:13:22 PM IST - Empty Results
          Mon 07.23.2018 at 02:13:22 PM IST - Result Status: FAILURE

          • - -
            Build step 'Execute performance test using Performance Center' changed build result to FAILURE
            Finished: FAILURE 

          Umesh Gachinmath added a comment - Hi Folks, With updated plugin, I am able to save the job, but when run build .. I am getting another exception like below: Mon 07.23.2018 at 02:13:18 PM IST - Login succeeded Mon 07.23.2018 at 02:13:18 PM IST - Searching for available Test Instance Mon 07.23.2018 at 02:13:20 PM IST - getCorrectTestInstanceID failed, reason: com.thoughtworks.xstream.mapper.CannotResolveClassException: html Mon 07.23.2018 at 02:13:20 PM IST - java.lang.NumberFormatException: null Mon 07.23.2018 at 02:13:22 PM IST - Logout succeeded Mon 07.23.2018 at 02:13:22 PM IST - Empty Results Mon 07.23.2018 at 02:13:22 PM IST - Result Status: FAILURE - - Build step 'Execute performance test using Performance Center' changed build result to FAILURE Finished: FAILURE 

          Daniel Danan added a comment -

          Hi Simon, Hi Umesh,

          Many thanks for your feedback.

          Could you please try to create a new freestyle project or use an existing one in which you delete the old Performance Center build step and recreate a new one from scratch (do not use a build step created with a previous version of this plugin).

          Please let me know if the job runs correctly in it.

          Regards,
          Daniel

           

          Daniel Danan added a comment - Hi Simon, Hi Umesh, Many thanks for your feedback. Could you please try to create a new freestyle project or use an existing one in which you delete the old Performance Center build step and recreate a new one from scratch (do not use a build step created with a previous version of this plugin). Please let me know if the job runs correctly in it. Regards, Daniel  

          Daniel Danan added a comment -

          continuation in JENKINS-52698.

          Daniel Danan added a comment - continuation in  JENKINS-52698 .

            danieldanan Daniel Danan
            elawler Eamonn Lawler
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: