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

          Supratim Samanta created issue -
          Supratim Samanta made changes -
          Summary Original: When connectin to TestLink find error ClassCastException New: When connecting to TestLink, finding error ClassCastException
          Supratim Samanta made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]

          Fred Beringer added a comment -

          I'm running into the same issue with a local install of Jenkins and TestLink. Configuration looks correct on my side:

          Preparing TestLink client API.
          Using TestLink URL: http://localhost/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:804)
          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:586)
          at hudson.model.Run.execute(Run.java:1516)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:236)

          Fred Beringer added a comment - I'm running into the same issue with a local install of Jenkins and TestLink. Configuration looks correct on my side: Preparing TestLink client API. Using TestLink URL: http://localhost/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:804) 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:586) at hudson.model.Run.execute(Run.java:1516) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236)

          Bruno P. Kinoshita added a comment - - edited

          Hello @Supratim,

          Sorry for the delay. I've been busy with other project/plug-ins and couldn't find a cycle to work on Jenkins, TestLink or on this plug-in. Sorry.

          Since last Wednesday I've been working on these tools, but first I had to release a 1.9.4 testlink-java-api version. Yesterday I released another version of the testlink-java-api, 1.9.5-0. Now I'm working on these issues for 1.9.5/1.9.6.

          Thanks for confirming this issue @Fred. I'll take a look on this. Looks like a simple mismatch between the parameters of the testlink-java-api used by the plug-in, and TestLink.

          BTW, let me say that today I'm extremely happy, to receive a comment in this plug-in by you. When I wrote this plug-in, the initial version, was highly influenced by your blog entries. I was working on a telecom company, as QA engineer for the first time, and faced the need to integrate my CI jobs with the Test Management team. Not knowing much about test management, your blog was one of the most important resources. So, thank you very much!!!

          Bruno P. Kinoshita added a comment - - edited Hello @Supratim, Sorry for the delay. I've been busy with other project/plug-ins and couldn't find a cycle to work on Jenkins, TestLink or on this plug-in. Sorry. Since last Wednesday I've been working on these tools, but first I had to release a 1.9.4 testlink-java-api version. Yesterday I released another version of the testlink-java-api, 1.9.5-0. Now I'm working on these issues for 1.9.5/1.9.6. Thanks for confirming this issue @Fred. I'll take a look on this. Looks like a simple mismatch between the parameters of the testlink-java-api used by the plug-in, and TestLink. BTW, let me say that today I'm extremely happy, to receive a comment in this plug-in by you. When I wrote this plug-in, the initial version, was highly influenced by your blog entries. I was working on a telecom company, as QA engineer for the first time, and faced the need to integrate my CI jobs with the Test Management team. Not knowing much about test management, your blog was one of the most important resources. So, thank you very much!!!
          Bruno P. Kinoshita made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Bruno P. Kinoshita added a comment - - edited

          Bug confirmed when using the plug-in with TestLlink 1.9.6. Apparently, TestLink XML-RPC method getTestProjectByName, which used to return an array, is now returning a map.

          Please see [1] to track the changes, but probably tomorrow (Saturday) it will be fixed in trunk, and a release is to be cut in the next days.

          Thanks!

          [1] https://github.com/kinow/testlink-java-api/issues/12

          Bruno P. Kinoshita added a comment - - edited Bug confirmed when using the plug-in with TestLlink 1.9.6. Apparently, TestLink XML-RPC method getTestProjectByName, which used to return an array, is now returning a map. Please see [1] to track the changes, but probably tomorrow (Saturday) it will be fixed in trunk, and a release is to be cut in the next days. Thanks! [1] https://github.com/kinow/testlink-java-api/issues/12
          Bruno P. Kinoshita made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          pom.xml
          http://jenkins-ci.org/commit/testlink-plugin/b75daa2edbfdaf4cac83c90bf003f940bf4d917a
          Log:
          [FIXED JENKINS-17442] updated testlink-java-api to 1.9.6-0, which fixes the communication issue

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: pom.xml http://jenkins-ci.org/commit/testlink-plugin/b75daa2edbfdaf4cac83c90bf003f940bf4d917a Log: [FIXED JENKINS-17442] updated testlink-java-api to 1.9.6-0, which fixes the communication issue
          Bruno P. Kinoshita made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: