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

Blue Ocean on Wildfly 10.1.0.Final has problems with old Jackson version

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      Steps to reproduce:

      1. Install a wildfly-10.1.0.Final
      2. Install jenkins 2.85
      3. Install all plugins listed in environment
      4. Click on open blue ocean in the dashboard

      Expected:

      • Should work

      Actually:

      • Just shows a white screen a request produces a problem because an old Jackson version is used
      curl 'http://build.********.de/jenkins/blue/rest/organizations/jenkins/pipelines/test.******.de/runs/1140/' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: de' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' -H 'Accept: */*' -H 'Referer: http://build.********.de/jenkins/blue/pipelines/' -H 'Cookie: screenResolution=2560x1440; JSESSIONID=RYtitoop8brJCqmPSXKFndkzxTDTa-J5K26egup-.ip-172-31-28-204; G_ENABLED_IDPS=google; _ga=GA1.2.1055820180.1510573662; l10n-submitter=Manuel%20Blechschmidt; l10n-license-agreed=true; _gid=GA1.2.1533231619.1516001612' -H 'Connection: keep-alive' --compressed
      
      java.lang.NoSuchMethodError: com.fasterxml.jackson.core.io.JsonStringEncoder.quoteAsString(Ljava/lang/CharSequence;Ljava/lang/StringBuilder;)V
      	at io.jenkins.blueocean.commons.stapler.export.JSONDataWriter.value(JSONDataWriter.java:112)
      	at io.jenkins.blueocean.commons.stapler.export.JSONDataWriter.startObject(JSONDataWriter.java:154)
      	at io.jenkins.blueocean.commons.stapler.export.Model.writeTo(Model.java:198)
      	at io.jenkins.blueocean.commons.stapler.Export.writeOne(Export.java:148)
      	at io.jenkins.blueocean.commons.stapler.Export.serveExposedBean(Export.java:139)
      	at io.jenkins.blueocean.commons.stapler.Export.doJson(Export.java:79)
      	at io.jenkins.blueocean.commons.stapler.TreeResponse$Processor$1.generateResponse(TreeResponse.java:48)
      	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124)
      	at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69)
      	at org.kohsuke.stapler.Function.renderResponse(Function.java:136)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:119)
      	at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      	at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      	at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209)
      

          [JENKINS-48957] Blue Ocean on Wildfly 10.1.0.Final has problems with old Jackson version

          Updateing to 2.102 and adding the jboss-deployment-structure.xml did not help.

          Manuel Blechschmidt added a comment - Updateing to 2.102 and adding the jboss-deployment-structure.xml did not help.

          The following file did not solve the problem:

           cat vfs/temp/temp9f7a495d7cd4e8f9/content-6a1a7f956266524f/WEB-INF/jboss-deployment-structure.xml 
          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-deployment-structure>
              <deployment>
                  <exclusions>
                      <module name="com.fasterxml.jackson.core.jackson-core" />
                      <module name="com.fasterxml.jackson.core.jackson-annotations" />
                      <module name="com.fasterxml.jackson.core.jackson-databind" />
                      <module name="org.jboss.resteasy.resteasy-jackson-provider" />
                  </exclusions>
              </deployment>
          </jboss-deployment-structure>
          

          Manuel Blechschmidt added a comment - The following file did not solve the problem: cat vfs/temp/temp9f7a495d7cd4e8f9/content-6a1a7f956266524f/WEB-INF/jboss-deployment-structure.xml <?xml version= "1.0" encoding= "UTF-8" ?> <jboss-deployment-structure> <deployment> <exclusions> <module name= "com.fasterxml.jackson.core.jackson-core" /> <module name= "com.fasterxml.jackson.core.jackson-annotations" /> <module name= "com.fasterxml.jackson.core.jackson-databind" /> <module name= "org.jboss.resteasy.resteasy-jackson-provider" /> </exclusions> </deployment> </jboss-deployment-structure>

          Manuel Blechschmidt added a comment - - edited
          println(com.fasterxml.jackson.core.io.JsonStringEncoder.class.getClassLoader())
          
          ModuleClassLoader for Module "com.fasterxml.jackson.core.jackson-core:main" from local module loader @1c2c22f3 (finder: local module finder @18e8568 (roots: /opt/wildfly/modules,/opt/wildfly/modules/system/layers/base))
          

          Manuel Blechschmidt added a comment - - edited println(com.fasterxml.jackson.core.io.JsonStringEncoder. class. getClassLoader()) ModuleClassLoader for Module "com.fasterxml.jackson.core.jackson-core:main" from local module loader @1c2c22f3 (finder: local module finder @18e8568 (roots: /opt/wildfly/modules,/opt/wildfly/modules/system/layers/base))

          Michael Neale added a comment -

          Michael Neale added a comment - Can the version in https://github.com/jenkinsci/blueocean-plugin/blob/master/pom.xml  be tweaked safely? 

          michaelneale the problem was that wildfly automatically added a lot of JAX RS dependencies including an older Jackson version (2.7.3). This version was preferred compared to Jackson 2.8.6 which was delivered as part of the plugins. I added the following file to make sure wildfly does not touch the classpath required by Jenkins:

          ./jenkins/war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-deployment-structure>
              <deployment>
                  <exclusions>
                      <module name="com.fasterxml.jackson.core.jackson-core" />
                      <module name="com.fasterxml.jackson.core.jackson-annotations" />
                      <module name="com.fasterxml.jackson.core.jackson-databind" />
                      <module name="org.jboss.resteasy.resteasy-jackson-provider" />
                  </exclusions>
          	<exclude-subsystems>
          	    <subsystem name="jaxrs" />
          	</exclude-subsystems>    
              </deployment>
          </jboss-deployment-structure>
          

          Pull request is here:
          https://github.com/jenkinsci/jenkins/pull/3235

          Manuel Blechschmidt added a comment - michaelneale the problem was that wildfly automatically added a lot of JAX RS dependencies including an older Jackson version (2.7.3). This version was preferred compared to Jackson 2.8.6 which was delivered as part of the plugins. I added the following file to make sure wildfly does not touch the classpath required by Jenkins: ./jenkins/war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml <?xml version= "1.0" encoding= "UTF-8" ?> <jboss-deployment-structure> <deployment> <exclusions> <module name= "com.fasterxml.jackson.core.jackson-core" /> <module name= "com.fasterxml.jackson.core.jackson-annotations" /> <module name= "com.fasterxml.jackson.core.jackson-databind" /> <module name= "org.jboss.resteasy.resteasy-jackson-provider" /> </exclusions> <exclude-subsystems> <subsystem name= "jaxrs" /> </exclude-subsystems> </deployment> </jboss-deployment-structure> Pull request is here: https://github.com/jenkinsci/jenkins/pull/3235

          Code changed in jenkins
          User: Manuel Blechschmidt
          Path:
          war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
          http://jenkins-ci.org/commit/jenkins/6923dbc4f84b618a732b6cf598516aac61d70fe2
          Log:

          • JENKINS-48957 added jboss-deployment-structure to remove using of jackson from wildfly

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Blechschmidt Path: war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml http://jenkins-ci.org/commit/jenkins/6923dbc4f84b618a732b6cf598516aac61d70fe2 Log: JENKINS-48957 added jboss-deployment-structure to remove using of jackson from wildfly

          Code changed in jenkins
          User: Manuel Blechschmidt
          Path:
          war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
          http://jenkins-ci.org/commit/jenkins/d9d3efb10d0b99d4590d97319e280c4a24f3ec61
          Log:

          • JENKINS-48957 exclude whole jaxrs otherwise jackson is automatically added

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Blechschmidt Path: war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml http://jenkins-ci.org/commit/jenkins/d9d3efb10d0b99d4590d97319e280c4a24f3ec61 Log: JENKINS-48957 exclude whole jaxrs otherwise jackson is automatically added

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
          http://jenkins-ci.org/commit/jenkins/832f17fe52903fc993790fa4bb5bbc5b1b916eeb
          Log:
          Merge pull request #3235 from ManuelB/bug/JENKINS-48957-blue-ocean-wildfly-old-jackson

          JENKINS-48957 Prevent wildfly to deliver old jackson for blue ocean and other plugins

          Compare: https://github.com/jenkinsci/jenkins/compare/708c9db28fab...832f17fe5290

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml http://jenkins-ci.org/commit/jenkins/832f17fe52903fc993790fa4bb5bbc5b1b916eeb Log: Merge pull request #3235 from ManuelB/bug/ JENKINS-48957 -blue-ocean-wildfly-old-jackson JENKINS-48957 Prevent wildfly to deliver old jackson for blue ocean and other plugins Compare: https://github.com/jenkinsci/jenkins/compare/708c9db28fab...832f17fe5290

          Oleg Nenashev added a comment -

          It has been fixed and released in 2.103

          Oleg Nenashev added a comment - It has been fixed and released in 2.103

          Michael Neale added a comment -

          thanks oleg_nenashev and manuel_b!

          Michael Neale added a comment - thanks oleg_nenashev  and manuel_b !

            Unassigned Unassigned
            manuel_b Manuel Blechschmidt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: