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

Bundles Jackson2 rather than depending on jackson2 plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Causing PCT test failures when run in conjunction with a plugin (such as metrics) that pulls in jackson2-plugin, e.g.

      1) Error injecting constructor, java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.SerializationConfig
        at jenkins.metrics.api.MetricsRootAction$Sampler.<init>(Unknown Source)
      
      1 error
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)
      	at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
      	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
      	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:472)
      	at hudson.ExtensionList.load(ExtensionList.java:365)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:303)
      	at hudson.ExtensionList.iterator(ExtensionList.java:157)
      	at hudson.ExtensionList.get(ExtensionList.java:148)
      	at jenkins.metrics.api.Metrics$HealthCheckMetricsProvider.getMetricSet(Metrics.java:385)
      	at jenkins.metrics.api.Metrics.afterExtensionsAugmented(Metrics.java:330)
      	at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:1089)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	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:748)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.SerializationConfig
      	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:535)
      	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:452)
      	at jenkins.metrics.api.MetricsRootAction$Sampler.<init>(MetricsRootAction.java:937)
      	at sun.reflect.GeneratedConstructorAccessor794.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:86)
      	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
      	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
      	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	... 27 more

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/test/java/jenkins/plugins/github/api/SmokeTest.java
            src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java
            src/test/java/jenkins/plugins/github/api/mock/MockObject.java
            src/test/java/jenkins/plugins/github/api/mock/MockOrganization.java
            src/test/java/jenkins/plugins/github/api/mock/MockOwner.java
            src/test/java/jenkins/plugins/github/api/mock/MockRepository.java
            src/test/java/jenkins/plugins/github/api/mock/MockUser.java
            src/test/resources/jenkins/plugins/github/api/mock/MockGitHub/index.jelly
            src/test/resources/jenkins/plugins/github/api/mock/MockOrganization/index.jelly
            src/test/resources/jenkins/plugins/github/api/mock/MockRepository/index.jelly
            src/test/resources/jenkins/plugins/github/api/mock/MockUser/index.jelly
            http://jenkins-ci.org/commit/github-api-plugin/27c3778696f48c0958efbaf9a12041277bce1461
            Log:
            JENKINS-44581 Before we go overriding the Jackson2 version, add some basic sanity tests

            • The tests use a very minimal mock GitHub server that only understands a subset of the API
            • We just need to verify that Jackson deserializes correctly and things like paged iterables function
            • Left as an excercise to subsequent committers are things like making a test JAR and making the mock
              more fluent and comprehensive.
            • Ideally would also be good if we had some mock verification tests, that allow comparing the mock
              output with the real github and a github enterprise, to eliminate api change issues
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/jenkins/plugins/github/api/SmokeTest.java src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java src/test/java/jenkins/plugins/github/api/mock/MockObject.java src/test/java/jenkins/plugins/github/api/mock/MockOrganization.java src/test/java/jenkins/plugins/github/api/mock/MockOwner.java src/test/java/jenkins/plugins/github/api/mock/MockRepository.java src/test/java/jenkins/plugins/github/api/mock/MockUser.java src/test/resources/jenkins/plugins/github/api/mock/MockGitHub/index.jelly src/test/resources/jenkins/plugins/github/api/mock/MockOrganization/index.jelly src/test/resources/jenkins/plugins/github/api/mock/MockRepository/index.jelly src/test/resources/jenkins/plugins/github/api/mock/MockUser/index.jelly http://jenkins-ci.org/commit/github-api-plugin/27c3778696f48c0958efbaf9a12041277bce1461 Log: JENKINS-44581 Before we go overriding the Jackson2 version, add some basic sanity tests The tests use a very minimal mock GitHub server that only understands a subset of the API We just need to verify that Jackson deserializes correctly and things like paged iterables function Left as an excercise to subsequent committers are things like making a test JAR and making the mock more fluent and comprehensive. Ideally would also be good if we had some mock verification tests, that allow comparing the mock output with the real github and a github enterprise, to eliminate api change issues
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            http://jenkins-ci.org/commit/github-api-plugin/614ba75f740ea3ef9bea4cf0fc9672ee489ae93e
            Log:
            [FIXED JENKINS-44581] Now commit the dependency update

            • also fix some other pom issues and update parent pom
            • also add the test jar
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml http://jenkins-ci.org/commit/github-api-plugin/614ba75f740ea3ef9bea4cf0fc9672ee489ae93e Log: [FIXED JENKINS-44581] Now commit the dependency update also fix some other pom issues and update parent pom also add the test jar
            Show
            stephenconnolly Stephen Connolly added a comment - https://github.com/jenkinsci/github-api-plugin/pull/13
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            http://jenkins-ci.org/commit/github-branch-source-plugin/86b8b5e4fab0a119967ce15bc42dd6071792b653
            Log:
            [JENKINS-44581 Follow-up] Update dependency

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml http://jenkins-ci.org/commit/github-branch-source-plugin/86b8b5e4fab0a119967ce15bc42dd6071792b653 Log: [JENKINS-44581 Follow-up] Update dependency
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            http://jenkins-ci.org/commit/github-branch-source-plugin/eb8298eccfd6829e9ae41175c4f6da4789d0a54f
            Log:
            Merge pull request #139 from stephenc/jenkins-44581-follow-up

            [JENKINS-44581 Follow-up] Update dependency

            Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/48c181358908...eb8298eccfd6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml http://jenkins-ci.org/commit/github-branch-source-plugin/eb8298eccfd6829e9ae41175c4f6da4789d0a54f Log: Merge pull request #139 from stephenc/jenkins-44581-follow-up [JENKINS-44581 Follow-up] Update dependency Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/48c181358908...eb8298eccfd6

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: