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

NoSuchMethodError: com.fasterxml.jackson.databind.introspect.Annotated.getGenericType()

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.222.3, BFA 1.25.1 or 1.24.2

      Recently we upgraded to 2.222.3 and BFA 1.25.1 (from previous Jenkins LTS line) and BFA 1.24.2

      We have detected that, apparently, since then, BFA is not working anymore.

      If you access to the Failure Cause Management, this is shown (screenshot attached):

      Could not fetch causes: java.lang.reflect.InvocationTargetException

      Also, scans aren't, anymore, doing their job. Have tried downgrading the plugin to previous 1.24.2 but same error, so far.

      We have 50-60 indications created, using mongo and mongo-wise, everything seems to be ok.

      Looking to logs, we are getting a good number of these:

      Could not scan build S.01.04 - PHPUnit - MSSQL #853
      java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.Annotated.getGenericType()Ljava/lang/reflect/Type;
      	at org.mongojack.internal.MongoAnnotationIntrospector.getTypeForAnnotated(MongoAnnotationIntrospector.java:81)
      	at org.mongojack.internal.MongoAnnotationIntrospector.findDeserializer(MongoAnnotationIntrospector.java:97)
      	at com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findDeserializer(AnnotationIntrospectorPair.java:665)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findDeserializerFromAnnotation(BasicDeserializerFactory.java:2092)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.constructCreatorProperty(BasicDeserializerFactory.java:1019)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._addExplicitPropertyCreator(BasicDeserializerFactory.java:634)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._addExplicitAnyCreator(BasicDeserializerFactory.java:661)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._addDeserializerConstructors(BasicDeserializerFactory.java:411)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:283)
      	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:224)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:220)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
      	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
      	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:491)
      	at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4669)
      Caused: java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedMethodAccessor1115.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.mongojack.internal.util.JacksonAccessor.invoke(JacksonAccessor.java:149)
      Caused: java.lang.RuntimeException
      	at org.mongojack.internal.util.JacksonAccessor.invoke(JacksonAccessor.java:153)
      	at org.mongojack.internal.util.JacksonAccessor.findDeserializer(JacksonAccessor.java:44)
      	at org.mongojack.internal.util.IdHandlerFactory.getIdHandlerForProperty(IdHandlerFactory.java:40)
      	at org.mongojack.JacksonDBCollection.<init>(JacksonDBCollection.java:138)
      	at org.mongojack.JacksonDBCollection.wrap(JacksonDBCollection.java:236)
      	at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBase.getJacksonCollection(MongoDBKnowledgeBase.java:1100)
      	at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBase.initCache(MongoDBKnowledgeBase.java:212)
      	at com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBase.getCauses(MongoDBKnowledgeBase.java:224)
      	at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scan(BuildFailureScanner.java:189)
      	at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scanIfNotScanned(BuildFailureScanner.java:165)
      	at com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandTask.scanBuild(ScanOnDemandTask.java:116)
      	at com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandTask.run(ScanOnDemandTask.java:78)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Just guessing if there is some dependencies conflict introduced by the latest versions causing that. For me it's dark area, so I really cannot say much else.

      If can help with anything else, I'll be keen to proceed.

      Ciao

          [JENKINS-62214] NoSuchMethodError: com.fasterxml.jackson.databind.introspect.Annotated.getGenericType()

          Kendall Trego added a comment - - edited

          On my staging instance I found the plugins sbeaulie mentions:
          -Plugin Utilities API
          -Bootstrap 4 API
          --Font Awesome API
          --Popper.js API
          --JQuery3 API

          But they aren't on my production instance. Looking into it, they appear to be from the latest version of the JUnit plugin which has a dependency on Bootstrap 4 and Plugin Utilities API. The Bootstrap 4 plugin then has dependencies on the rest.

          I had upgraded all the plugins (including JUnit) before installing the beta BFA plugin which is when I assume they got installed; after upgrading all plugins I didn't see any new dependencies when I installed BFA. BFA does have a dependency on JUnit though, so I assume that's where the new plugins came from for sbeaulie.

          Kendall Trego added a comment - - edited On my staging instance I found the plugins sbeaulie mentions: -Plugin Utilities API -Bootstrap 4 API --Font Awesome API --Popper.js API --JQuery3 API But they aren't on my production instance. Looking into it, they appear to be from the latest version of the JUnit plugin which has a dependency on Bootstrap 4 and Plugin Utilities API. The Bootstrap 4 plugin then has dependencies on the rest. I had upgraded all the plugins (including JUnit) before installing the beta BFA plugin which is when I assume they got installed; after upgrading all plugins I didn't see any new dependencies when I installed BFA. BFA does have a dependency on JUnit though, so I assume that's where the new plugins came from for sbeaulie .

          Thanks krtrego for the dependency tree.

          That makes me wonder if we need to depend on Junit at all?

          Samuel Beaulieu added a comment - Thanks krtrego for the dependency tree. That makes me wonder if we need to depend on Junit at all?

          Since we have functionality that scans failed test cases, we reference JUnit classes in the code, so yeah, I think we do.

          Tomas Westling added a comment - Since we have functionality that scans failed test cases, we reference JUnit classes in the code, so yeah, I think we do.

          I thought it was coming from core, since it's in hudson.tasks.test.* but I confirm it's the Junit plugin https://github.com/jenkinsci/junit-plugin/tree/master/src/main/java/hudson/tasks/test

          Samuel Beaulieu added a comment - I thought it was coming from core, since it's in hudson.tasks.test.* but I confirm it's the Junit plugin https://github.com/jenkinsci/junit-plugin/tree/master/src/main/java/hudson/tasks/test

          Eloy Lafuente added a comment -

          Hi,

          for the records, we have just upgraded to Jenkins 2.263.1, using BFA 2.0.0-beta-1, and everything seems to be working ok here:

          • Indications are being detected ok.
          • Information is being sent to mongodb ok.
          • The failures management UI seems to be working ok too.

          Those are the features we are using and became broken. Glad to have them back to work, yay!

          Ciao

          Eloy Lafuente added a comment - Hi, for the records, we have just upgraded to Jenkins 2.263.1, using BFA 2.0.0-beta-1, and everything seems to be working ok here : Indications are being detected ok. Information is being sent to mongodb ok. The failures management UI seems to be working ok too. Those are the features we are using and became broken. Glad to have them back to work, yay! Ciao

          Wen Zhou added a comment -

          tried out 2.0.0-beta-1 with jenkins core  2.249.3 works well for us 

          Wen Zhou added a comment - tried out 2.0.0-beta-1 with jenkins core   2.249.3  works well for us 

          Lisa H added a comment -

          t_westling Thank you so much for your work on this.

          There is one problem with this being in beta: It isn't available like the other plugins, you have to sideload it. This makes our support department reluctant to adopt the upgrade to the plugin for this very reason, even if it provides the functionality we want: regex matching for failure causes. We don't care about the graphing.

          Since there is no plans to support the graphing functionality, can you please consider releasing it officially? Just disclose it in the release notes: "Graphing functionality removed."

          I'm not convinced waiting to release it accomplishes your goal: "This is also the reason that this is released as a beta, to give the users of the graph support some time to adapt." They are still going to have to take the time to adapt regardless of the beta BFA because nobody (graph users or not) can upgrade jenkins with the existing released version of BFA.

          It seems to me there is only two choices right now if you do depend on the graphing functionality.

          1. Don't upgrade jenkins at all.
          2. Take over plugin maintenance and do it yourself

          Meanwhile it forces those who don't care about the graphing functionality to also wait while this adapting time takes place (maybe because you use another graphing tool), which after reading the comments here, more users seem fall on this side of things.

          1. Don't upgrade jenkins at all because your support people feel that the beta is unsafe or a hassle
          2. Upgrade jenkins and side load the beta

          If you release this officially then the graph users remain in the same boat (don't upgrade jenkins or do-it-yourself), but life gets easier for those of us who don't care about the graphing functionality since we can simply update it the same way as the rest of the plugins.

          Best regards,

          Lisa

          ps. For other commenters here, it would be interesting to know what people do for the graphing functionality these days either specifically related to failure causes, or for other jenkins job metrics (build duration, and so on.)

          pps. Meanwhile I'll continue my lobbying of my support department to install this anyhow

          Lisa H added a comment - t_westling Thank you so much for your work on this. There is one problem with this being in beta: It isn't available like the other plugins, you have to sideload it. This makes our support department reluctant to adopt the upgrade to the plugin for this very reason, even if it provides the functionality we want: regex matching for failure causes. We don't care about the graphing. Since there is no plans to support the graphing functionality, can you please consider releasing it officially? Just disclose it in the release notes: "Graphing functionality removed." I'm not convinced waiting to release it accomplishes your goal: "This is also the reason that this is released as a beta, to give the users of the graph support some time to adapt." They are still going to have to take the time to adapt regardless of the beta BFA because nobody (graph users or not) can upgrade jenkins with the existing released version of BFA. It seems to me there is only two choices right now if you do depend on the graphing functionality. Don't upgrade jenkins at all. Take over plugin maintenance and do it yourself Meanwhile it forces those who don't care about the graphing functionality to also wait while this adapting time takes place (maybe because you use another graphing tool), which after reading the comments here, more users seem fall on this side of things. Don't upgrade jenkins at all because your support people feel that the beta is unsafe or a hassle Upgrade jenkins and side load the beta If you release this officially then the graph users remain in the same boat (don't upgrade jenkins or do-it-yourself), but life gets easier for those of us who don't care about the graphing functionality since we can simply update it the same way as the rest of the plugins. Best regards, Lisa ps. For other commenters here, it would be interesting to know what people do for the graphing functionality these days either specifically related to failure causes, or for other jenkins job metrics (build duration, and so on.) pps. Meanwhile I'll continue my lobbying of my support department to install this anyhow

          lhe: I agree that it makes it much more cumbersome to upgrade when it isn't in the main repo. Being in the support department at the company myself,
          I don't have to run a campaign to get a weird beta installed, so maybe I underestimated that effort for other people.

          I didn't know what to expect with regards to the removal of the statistics, but in the month that has passed, very few have said that they used the graphs..
          The majority of users probably aren't aware that there is a beta though, so I wouldn't get that feedback anyhow.

          I'll look in to releasing it for real.

          Tomas Westling added a comment - lhe : I agree that it makes it much more cumbersome to upgrade when it isn't in the main repo. Being in the support department at the company myself, I don't have to run a campaign to get a weird beta installed, so maybe I underestimated that effort for other people. I didn't know what to expect with regards to the removal of the statistics, but in the month that has passed, very few have said that they used the graphs.. The majority of users probably aren't aware that there is a beta though, so I wouldn't get that feedback anyhow. I'll look in to releasing it for real.

          Hi there,

          I agree with Lisa's comment, we are in the same situation in my company: we are not relying on the graph feature, and because of the beta version of the plugin, our platform team is reluctant to install it.

          Thanks again Tomas for you effort, looking forward the new official release

           

          Mickael BRIDARD added a comment - Hi there, I agree with Lisa's comment, we are in the same situation in my company: we are not relying on the graph feature, and because of the beta version of the plugin, our platform team is reluctant to install it. Thanks again Tomas for you effort, looking forward the new official release  

          We, OTOH, do use the graphs.

          Dirk Heinrichs added a comment - We, OTOH, do use the graphs.

            t_westling Tomas Westling
            stronk7 Eloy Lafuente
            Votes:
            22 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated:
              Resolved: