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

com.thoughtworks.xstream.security.ForbiddenClassException thrown on call to xldDeploy after upgrade to Jenkins 2.303.2

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.303.2 with deployit-plugin 10.0.4
      Jenkins 2.303.3 with deployit-plugin 10.0.5

      After upgrating Jenkins to 2.303.2, I get the following error when calling the xldDeploy step :

      com.thoughtworks.xstream.security.ForbiddenClassException: com.xebialabs.deployit.engine.api.dto.Deployment
          at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
          at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
          at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
          at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
          at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
          at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
          at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
          at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
          at com.xebialabs.xltype.serialization.xstream.XStreamReaderWriter.read(XStreamReaderWriter.java:149)
          at com.xebialabs.xltype.serialization.xstream.XStreamReaderWriter.readFrom(XStreamReaderWriter.java:143)
          at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:61)
          at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)
          at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
          at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:55)
          at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:448)
      Caused: org.jboss.resteasy.spi.ReaderException
          at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:483)
          at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:396)
          at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:367)
          at org.jboss.resteasy.client.core.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:75)
          at com.xebialabs.deployit.booter.remote.resteasy.DeployitBodyEntityExtractor.extractEntity(DeployitBodyEntityExtractor.java:27)
          at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:138)
          at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:98)
          at com.sun.proxy.$Proxy156.prepareUpdate(Unknown Source)
          at com.xebialabs.deployit.ci.server.DeployCommand.deploy(DeployCommand.java:102)
          at com.xebialabs.deployit.ci.server.DeployitServerImpl.deploy(DeployitServerImpl.java:89)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at com.xebialabs.deployit.ci.server.PluginFirstClassloaderInvocationHandler.doInvoke(PluginFirstClassloaderInvocationHandler.java:70)
          at com.xebialabs.deployit.ci.server.PluginFirstClassloaderInvocationHandler.invoke(PluginFirstClassloaderInvocationHandler.java:56)
      Caused: com.xebialabs.deployit.ci.DeployitPluginException
          at com.xebialabs.deployit.ci.server.PluginFirstClassloaderInvocationHandler.invoke(PluginFirstClassloaderInvocationHandler.java:60)
          at com.sun.proxy.$Proxy126.deploy(Unknown Source)
          at com.xebialabs.deployit.ci.workflow.XLDeployDeployStep$XLDeployPublishExecution.run(XLDeployDeployStep.java:101)
          at com.xebialabs.deployit.ci.workflow.XLDeployDeployStep$XLDeployPublishExecution.run(XLDeployDeployStep.java:77)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
          at hudson.security.ACL.impersonate2(ACL.java:449)
          at hudson.security.ACL.impersonate(ACL.java:461)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
      

      It works fine with Jenkins 2.303.1

      Jenkins 2.303.2 upgraded XStream 1.4.17 to 1.4.18 (PR#5685)

          [JENKINS-66927] com.thoughtworks.xstream.security.ForbiddenClassException thrown on call to xldDeploy after upgrade to Jenkins 2.303.2

          Any updates on this issue?

          Surendar Suyamprakasam added a comment - Any updates on this issue?

          Dirk Hamborg added a comment -

          I have the same Error with Jenkins Version Jenkins 2.319, Info: upgrade Deployment
          ERROR: An error during the deployment org.jboss.resteasy.spi.ReaderException: com.thoughtworks.xstream.security.ForbiddenClassException: com.xebialabs.deployit.engine.api.dto.Deployment
          Build step 'Deploy with XL Deploy' marked build as failure

           

          I am not sure if someone of digital AI is looking on this bugs here. In the past they did not worked on my bugs which i posted here

          Dirk Hamborg added a comment - I have the same Error with Jenkins Version Jenkins 2.319 , Info: upgrade Deployment ERROR: An error during the deployment org.jboss.resteasy.spi.ReaderException: com.thoughtworks.xstream.security.ForbiddenClassException: com.xebialabs.deployit.engine.api.dto.Deployment Build step 'Deploy with XL Deploy' marked build as failure   I am not sure if someone of digital AI is looking on this bugs here. In the past they did not worked on my bugs which i posted here

          I am working on this issue, you can expect the fix in the next xl-deploy plugin version

          Surendar Suyamprakasam added a comment - I am working on this issue, you can expect the fix in the next xl-deploy plugin version

          Surendar Suyamprakasam added a comment - - edited

          This issue has been fixed in the latest version of xldeploy plugin version 10.0.6

          Surendar Suyamprakasam added a comment - - edited This issue has been fixed in the latest version of xldeploy plugin version 10.0.6

          Dirk Hamborg added a comment -

          With new Version 10.0.6 appears this error

           

          ERROR: Build step failed with exception
          java.lang.ClassCastException: class java.security.MessageDigest$Delegate cannot be cast to class scala.Function0 (java.security.MessageDigest$Delegate is in module java.base of loader 'bootstrap'; scala.Function0 is in unnamed module of loader hudson.PluginFirstClassLoader @353d5b5f)
          at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:94)
          at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:51)
          at hudson.remoting.LocalChannel.call(LocalChannel.java:46)
          at com.xebialabs.deployit.ci.DeployitPerformer.doPerform(DeployitPerformer.java:76)
          at com.xebialabs.deployit.ci.DeployitNotifier.perform(DeployitNotifier.java:134)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:763)
          at hudson.model.Build$BuildExecution.post2(Build.java:179)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
          at hudson.model.Run.execute(Run.java:1921)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          Build step 'Deploy with XL Deploy' marked build as failure

          Dirk Hamborg added a comment - With new Version 10.0.6 appears this error   ERROR: Build step failed with exception java.lang.ClassCastException: class java.security.MessageDigest$Delegate cannot be cast to class scala.Function0 (java.security.MessageDigest$Delegate is in module java.base of loader 'bootstrap'; scala.Function0 is in unnamed module of loader hudson.PluginFirstClassLoader @353d5b5f) at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:94) at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:51) at hudson.remoting.LocalChannel.call(LocalChannel.java:46) at com.xebialabs.deployit.ci.DeployitPerformer.doPerform(DeployitPerformer.java:76) at com.xebialabs.deployit.ci.DeployitNotifier.perform(DeployitNotifier.java:134) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:763) at hudson.model.Build$BuildExecution.post2(Build.java:179) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707) at hudson.model.Run.execute(Run.java:1921) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Build step 'Deploy with XL Deploy' marked build as failure

          Henk Spaan added a comment - - edited

          The new 1.0.6 version has an issue with xldPublishPackage when running the publish of several modules in parallel. This issue was not present in the 1.0.5 version.

          About half of the modules fail with exception:

          com.xebialabs.deployit.booter.remote.service.StreamingImportingService$ImportException: Failed to import dar file.

          On repeat the same occurs with a random subset of the modules. Publish is rather fast, so the workaround is easy, but still it is a bug and probably the cause is thread locking or inspecific session id's.

          As for the xlDeploy step: this works fine for me now, even in parallel.

           

          Henk Spaan added a comment - - edited The new 1.0.6 version has an issue with xldPublishPackage when running the publish of several modules in parallel. This issue was not present in the 1.0.5 version. About half of the modules fail with exception: com.xebialabs.deployit.booter.remote.service.StreamingImportingService$ImportException: Failed to import dar file. On repeat the same occurs with a random subset of the modules. Publish is rather fast, so the workaround is easy, but still it is a bug and probably the cause is thread locking or inspecific session id's. As for the xlDeploy step: this works fine for me now, even in parallel.  

          René Burgman added a comment -

          On the latest LTS of Jenkins 2.319.2, 10.0.5 the job runs fine. 

          After updating to 10.0.6 it failes instantly with the following error.

          08:45:53 Building remotely on BUILD-A in workspace F:\Tools\JenkinsAgent\TOOLING\workspace\System Test - XL-Deploy (central)08:45:53 Building remotely on BUILD-A in workspace F:\Tools\JenkinsAgent\TOOLING\workspace\System Test - XL-Deploy (central)08:45:55 Info: Package application Applications/ToolingTEST/ToolingAPP, version Test 7908:45:57 ERROR: Build step failed with exception08:45:57 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from app0696.svb.org/10.96.25.71:5622408:45:57 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)08:45:57 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)08:45:57 at hudson.remoting.Channel.call(Channel.java:1001)08:45:57 at com.xebialabs.deployit.ci.DeployitPerformer.doPerform(DeployitPerformer.java:76)08:45:57 at com.xebialabs.deployit.ci.DeployitNotifier.perform(DeployitNotifier.java:134)08:45:57 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)08:45:57 at hudson.model.Build$BuildExecution.post2(Build.java:178)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)08:45:57 at hudson.model.Run.execute(Run.java:1913)08:45:57 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)08:45:57 at hudson.model.ResourceController.execute(ResourceController.java:99)08:45:57 at hudson.model.Executor.run(Executor.java:432)08:45:57 java.lang.ClassCastException: class java.security.MessageDigest$Delegate cannot be cast to class scala.Function0 (java.security.MessageDigest$Delegate is in module java.base of loader 'bootstrap'; scala.Function0 is in unnamed module of loader hudson.remoting.RemoteClassLoader @16b48713)08:45:57 at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:94)08:45:57 at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:51)08:45:57 at hudson.remoting.UserRequest.perform(UserRequest.java:211)08:45:57 at hudson.remoting.UserRequest.perform(UserRequest.java:54)08:45:57 at hudson.remoting.Request$2.run(Request.java:376)08:45:57 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)08:45:57 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)08:45:57 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)08:45:57 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)08:45:57 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)08:45:57 at java.base/java.lang.Thread.run(Thread.java:834)08:45:57 Build step 'Deploy with XL Deploy' marked build as failure08:45:57 Finished: FAILURE

           

          René Burgman added a comment - On the latest LTS of Jenkins 2.319.2, 10.0.5 the job runs fine.  After updating to 10.0.6 it failes instantly with the following error. 08:45:53 Building remotely on BUILD-A in workspace F:\Tools\JenkinsAgent\TOOLING\workspace\System Test - XL-Deploy (central)08:45:53 Building remotely on BUILD-A in workspace F:\Tools\JenkinsAgent\TOOLING\workspace\System Test - XL-Deploy (central)08:45:55 Info: Package application Applications/ToolingTEST/ToolingAPP, version Test 7908:45:57 ERROR: Build step failed with exception08:45:57 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from app0696.svb.org/10.96.25.71:5622408:45:57 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)08:45:57 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)08:45:57 at hudson.remoting.Channel.call(Channel.java:1001)08:45:57 at com.xebialabs.deployit.ci.DeployitPerformer.doPerform(DeployitPerformer.java:76)08:45:57 at com.xebialabs.deployit.ci.DeployitNotifier.perform(DeployitNotifier.java:134)08:45:57 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)08:45:57 at hudson.model.Build$BuildExecution.post2(Build.java:178)08:45:57 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)08:45:57 at hudson.model.Run.execute(Run.java:1913)08:45:57 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)08:45:57 at hudson.model.ResourceController.execute(ResourceController.java:99)08:45:57 at hudson.model.Executor.run(Executor.java:432)08:45:57 java.lang.ClassCastException: class java.security.MessageDigest$Delegate cannot be cast to class scala.Function0 (java.security.MessageDigest$Delegate is in module java.base of loader 'bootstrap'; scala.Function0 is in unnamed module of loader hudson.remoting.RemoteClassLoader @16b48713)08:45:57 at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:94)08:45:57 at com.xebialabs.deployit.ci.dar.RemotePackaging.call(RemotePackaging.java:51)08:45:57 at hudson.remoting.UserRequest.perform(UserRequest.java:211)08:45:57 at hudson.remoting.UserRequest.perform(UserRequest.java:54)08:45:57 at hudson.remoting.Request$2.run(Request.java:376)08:45:57 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)08:45:57 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)08:45:57 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)08:45:57 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)08:45:57 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)08:45:57 at java.base/java.lang.Thread.run(Thread.java:834)08:45:57 Build step 'Deploy with XL Deploy' marked build as failure08:45:57 Finished: FAILURE  

          Dirk Hamborg added a comment -

          With the new Version of the plugin it works, why noone updated this ticket?

          That is not nice

          Dirk Hamborg added a comment - With the new Version of the plugin it works, why noone updated this ticket? That is not nice

          Oops. This issue reported has been closed in the previous release and I have closed this ticket. The issue reported on the comments are different issues. Those have been handled in different ticket. 

          Anyways, All the issues reported on comments have been resolved. So, I am closing this ticket.

          Thanks for your patience. 

          Surendar Suyamprakasam added a comment - Oops. This issue reported has been closed in the previous release and I have closed this ticket. The issue reported on the comments are different issues. Those have been handled in different ticket.  Anyways, All the issues reported on comments have been resolved. So, I am closing this ticket. Thanks for your patience. 

          Surendar Suyamprakasam added a comment - - edited

          Issue has been fixed and release version xldeploy-plugin-22.0.0

          Surendar Suyamprakasam added a comment - - edited Issue has been fixed and release version  xldeploy-plugin-22.0.0

            surendarsuyamprakasam Surendar Suyamprakasam
            ngourdon Nicolas Gourdon
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: