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

No parser found for duplicated code

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: dry-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Running Jenkins 1.556 on Windows 7 and get this error when running CPD:

      ava.io.IOException: No parser found for duplicated code results file D:\build\hudson\jobs\xtrunk CI\workspace\testoutput\pmd\cpd.xml
      01:08:58.336 	at hudson.plugins.dry.parser.DuplicationParserRegistry.parse(DuplicationParserRegistry.java:99)
      01:08:58.336 	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:300)
      01:08:58.336 	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:258)
      01:08:58.336 	at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:209)
      01:08:58.336 	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:178)
      01:08:58.336 	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      01:08:58.336 	at hudson.FilePath.act(FilePath.java:914)
      01:08:58.336 	at hudson.FilePath.act(FilePath.java:887)
      01:08:58.336 	at hudson.plugins.dry.DryPublisher.perform(DryPublisher.java:175)
      01:08:58.336 	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:144)
      01:08:58.336 	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333)
      01:08:58.336 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      01:08:58.336 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:742)
      01:08:58.336 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714)
      01:08:58.336 	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      01:08:58.336 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663)
      01:08:58.336 	at hudson.model.Run.execute(Run.java:1713)
      01:08:58.336 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      01:08:58.336 	at hudson.model.ResourceController.execute(ResourceController.java:88)
      01:08:58.336 	at hudson.model.Executor.run(Executor.java:231)
      

        Attachments

          Issue Links

            Activity

            Hide
            drulli Ulli Hafner added a comment -

            And? Without more information I can't help...

            Which plug-in and Jenkins version? Is the file a valid XML file (correct non-windows encoding?)? can you please attach the cpd.xml file?

            Show
            drulli Ulli Hafner added a comment - And? Without more information I can't help... Which plug-in and Jenkins version? Is the file a valid XML file (correct non-windows encoding?)? can you please attach the cpd.xml file?
            Hide
            clausfod clausfod added a comment -

            Hi Ulli,

            We are using Jenkins 1.556 and I guess it is the DRY plugin:

            [DRY] Collecting duplicate code analysis files...
            01:13:51.751 [DRY] Finding all files that match the pattern **/testoutput/pmd/cpd.xml
            01:13:51.751 [DRY] Parsing 1 files in D:\build\hudson\jobs\xportalen trunk CI\workspace
            01:13:51.751 [DRY] Parsing of file D:\build\hudson\jobs\xportalen trunk CI\workspace\testoutput\pmd\cpd.xml failed due to an exception:
            

            I tried without encoding set in the plugin and with ISO-8859-1 specified withou luck

            I will attache the file in a moment.

            Show
            clausfod clausfod added a comment - Hi Ulli, We are using Jenkins 1.556 and I guess it is the DRY plugin: [DRY] Collecting duplicate code analysis files... 01:13:51.751 [DRY] Finding all files that match the pattern **/testoutput/pmd/cpd.xml 01:13:51.751 [DRY] Parsing 1 files in D:\build\hudson\jobs\xportalen trunk CI\workspace 01:13:51.751 [DRY] Parsing of file D:\build\hudson\jobs\xportalen trunk CI\workspace\testoutput\pmd\cpd.xml failed due to an exception: I tried without encoding set in the plugin and with ISO-8859-1 specified withou luck I will attache the file in a moment.
            Hide
            drulli Ulli Hafner added a comment -

            I see, my parser currently expects the CPD files to be in UTF8. Did this change recently? Which CPD version are you using? The encoding in the UI is unrelated.

            Show
            drulli Ulli Hafner added a comment - I see, my parser currently expects the CPD files to be in UTF8. Did this change recently? Which CPD version are you using? The encoding in the UI is unrelated.
            Hide
            clausfod clausfod added a comment -

            We are running the analysis via ANT and uses PMD 4.2.5 on a 1.4 JVM.

            The error started when I upgraded to 1.552 from 1.546 (I think it was from 1.546) - still appears in the latest Jenkins version.

            Kind regards
            Claus Nielsen

            Show
            clausfod clausfod added a comment - We are running the analysis via ANT and uses PMD 4.2.5 on a 1.4 JVM. The error started when I upgraded to 1.552 from 1.546 (I think it was from 1.546) - still appears in the latest Jenkins version. Kind regards Claus Nielsen
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            .idea/libraries/Maven__commons_codec_commons_codec_1_6.xml
            .idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml
            .idea/libraries/Maven__javax_enterprise_cdi_api_1_0.xml
            .idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_3.xml
            .idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_2.xml
            .idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_1_0.xml
            .idea/libraries/Maven__org_apache_maven_maven_model_3_1_0.xml
            .idea/libraries/Maven__org_apache_maven_maven_model_builder_3_1_0.xml
            .idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_1_0.xml
            .idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_16.xml
            .idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_10.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_api_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_connector_basic_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_impl_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_spi_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_transport_file_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_transport_http_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_aether_aether_util_0_9_0_v20140226.xml
            .idea/libraries/Maven__org_eclipse_sisu_org_eclipse_sisu_inject_0_2_0.xml
            .idea/libraries/Maven__org_eclipse_sisu_org_eclipse_sisu_plexus_0_2_0.xml
            .idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_6_2.xml
            .idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_2_0.xml
            dry
            http://jenkins-ci.org/commit/analysis-suite-plugin/0488bc1705e7c5f058d2b48ba18627ad3d9099b6
            Log:
            [FIXED JENKINS-22356] Added native encoding support for CPD.

            Latest CPD version does not use UTF8 as default when writing
            the results XML files anymore.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: .idea/libraries/Maven__commons_codec_commons_codec_1_6.xml .idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml .idea/libraries/Maven__javax_enterprise_cdi_api_1_0.xml .idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_3.xml .idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_2.xml .idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_1_0.xml .idea/libraries/Maven__org_apache_maven_maven_model_3_1_0.xml .idea/libraries/Maven__org_apache_maven_maven_model_builder_3_1_0.xml .idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_1_0.xml .idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_16.xml .idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_10.xml .idea/libraries/Maven__org_eclipse_aether_aether_api_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_connector_basic_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_impl_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_spi_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_transport_file_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_transport_http_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_aether_aether_util_0_9_0_v20140226.xml .idea/libraries/Maven__org_eclipse_sisu_org_eclipse_sisu_inject_0_2_0.xml .idea/libraries/Maven__org_eclipse_sisu_org_eclipse_sisu_plexus_0_2_0.xml .idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_6_2.xml .idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_2_0.xml dry http://jenkins-ci.org/commit/analysis-suite-plugin/0488bc1705e7c5f058d2b48ba18627ad3d9099b6 Log: [FIXED JENKINS-22356] Added native encoding support for CPD. Latest CPD version does not use UTF8 as default when writing the results XML files anymore.

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                clausfod clausfod
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: