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

When connecting to TestLink, finding error ClassCastException

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • testlink-plugin
    • TestLink installed in Windows Server 2003

      Jenkins is deployed in apache tomcat 6.x in Redhat Linux server

      When connecting to TestLink from jenkins, the following error is coming.

      Started by user Admin
      Building on master in workspace /home/nabslink/.jenkins/jobs/Jenkins-TaskLink-Plugin-Example/workspace
      Preparing TestLink client API.
      Using TestLink URL: http://xenapdev001/testlink/lib/api/xmlrpc.php

      FATAL: java.util.HashMap cannot be cast to [Ljava.lang.Object;
      java.lang.ClassCastException: java.util.HashMap cannot be cast to [Ljava.lang.Object;
      at br.eti.kinoshita.testlinkjavaapi.util.Util.castToArray(Util.java:642)
      at br.eti.kinoshita.testlinkjavaapi.TestProjectService.getTestProjectByName(TestProjectService.java:111)
      at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.getTestProjectByName(TestLinkAPI.java:485)
      at hudson.plugins.testlink.TestLinkBuilder.getTestLinkSite(TestLinkBuilder.java:246)
      at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:134)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:798)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
      at hudson.model.Run.execute(Run.java:1575)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)

          [JENKINS-17442] When connecting to TestLink, finding error ClassCastException

          Ho no, I am using TestLink 1.9.5 and 1.9.2.
          There are some compatibility issues?

          Jeanjean LaGuigne added a comment - Ho no, I am using TestLink 1.9.5 and 1.9.2. There are some compatibility issues?

          Yup, check the compatibility matrix in the plug-in Wiki [1]

          Unfortunately you have to stick to a specific version of the plug-in, until you're able to update your TestLink instance.

          Reasons for not having compatibility between versions include:

          • Newer version of the plug-in may use new features in TestLink.
          • Methods changed/removed/etc in TestLink XML-RPC API (this was, by the way, what was causing this bug :=)
          • Bugs in the PHP XML-RPC API, or in the Java API (testlink-java-api)
          • My laziness (and lack of time) for hacking an extra abstraction layer for this

          Sorry for not being able to be of more help. If you're ok with it, I'll close the issue again, ok?

          Thanks!

          [1] https://wiki.jenkins-ci.org/display/JENKINS/TestLink+Plugin#TestLinkPlugin-CompatibilityMatrix

          Bruno P. Kinoshita added a comment - Yup, check the compatibility matrix in the plug-in Wiki [1] Unfortunately you have to stick to a specific version of the plug-in, until you're able to update your TestLink instance. Reasons for not having compatibility between versions include: Newer version of the plug-in may use new features in TestLink. Methods changed/removed/etc in TestLink XML-RPC API (this was, by the way, what was causing this bug :=) Bugs in the PHP XML-RPC API, or in the Java API (testlink-java-api) My laziness (and lack of time) for hacking an extra abstraction layer for this Sorry for not being able to be of more help. If you're ok with it, I'll close the issue again, ok? Thanks! [1] https://wiki.jenkins-ci.org/display/JENKINS/TestLink+Plugin#TestLinkPlugin-CompatibilityMatrix

          Ok, thanks for your fast answers!
          Of course we can close this issue ^^

          Jeanjean LaGuigne added a comment - Ok, thanks for your fast answers! Of course we can close this issue ^^

          Thanks for understanding!
          Let me know if you need anything else.

          Cheers, B

          Bruno P. Kinoshita added a comment - Thanks for understanding! Let me know if you need anything else. Cheers, B

          Yes I have a little thing to ask you ^^

          I wondered if it was possible to add test results in Notes under Testlink (especially a failure message of the testCase) for this I think we need to edit the file JUnitCaseClassNameResultSeeker.java (with the method "getJUnitNotes").

          But I don't know how, could you plz help me again ?

          Jeanjean LaGuigne added a comment - Yes I have a little thing to ask you ^^ I wondered if it was possible to add test results in Notes under Testlink (especially a failure message of the testCase) for this I think we need to edit the file JUnitCaseClassNameResultSeeker.java (with the method "getJUnitNotes"). But I don't know how, could you plz help me again ?

          No it's done!

          Cheers, Jeanjean

          Jeanjean LaGuigne added a comment - No it's done! Cheers, Jeanjean

          Was going to comment here, but glad you've already found the solution. Feel free to drop me a message or file new issues if you have any problem

          All the best, and have fun with the plug-in
          /B

          Bruno P. Kinoshita added a comment - Was going to comment here, but glad you've already found the solution. Feel free to drop me a message or file new issues if you have any problem All the best, and have fun with the plug-in /B

          TestLink is used a lot in entreprise. But when a tester needs to analyse 200 tests failed, it's not convenient to open 200 files ".xml". So what do you think to add this in your new release :

          JUnitCaseClassNameResultSeeker.java --> "getJUnitNotes(CaseResult testCase)" --> notes.append(testCase.getErrorStackTrace());

          Jeanjean LaGuigne added a comment - TestLink is used a lot in entreprise. But when a tester needs to analyse 200 tests failed, it's not convenient to open 200 files ".xml". So what do you think to add this in your new release : JUnitCaseClassNameResultSeeker.java --> "getJUnitNotes(CaseResult testCase)" --> notes.append(testCase.getErrorStackTrace());

          That's definitely doable could you file a new issue, and we'll move the discussion there. Maybe we can even include it in 3.4 (scheduled for this weekend or next week).

          Thanks!!!

          Bruno P. Kinoshita added a comment - That's definitely doable could you file a new issue, and we'll move the discussion there. Maybe we can even include it in 3.4 (scheduled for this weekend or next week). Thanks!!!

          Hi, I was not here last weekend, sorry!
          We could do this this week.

          Cheers!

          Jeanjean LaGuigne added a comment - Hi, I was not here last weekend, sorry! We could do this this week. Cheers!

            kinow Bruno P. Kinoshita
            supratim Supratim Samanta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: