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

CPPNCSS Plugin fails with "WARNING: java.util.Calendar in JRE might be dangerous,"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: cppncss-plugin
    • Labels:
    • Environment:
      Jenkins 2.103
      CppNCSS plugin 1.1
    • Similar Issues:

      Description

      As in summary - after upgrading Jenkins all jobs using CppNCSS plugin fail with SecurityException. Whitelisting java.utils.Calendar does not help (or I'm doing it wrong).

      Quick look into plugin's code shows "Calendar" being used in BuildProxy class, which is marked Serializable...

      Complete info from build log:

      java.lang.SecurityException: Rejected: java.util.Calendar
      	at hudson.remoting.ClassFilter.check(ClassFilter.java:75)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:129)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1863)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1746)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1880)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1746)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2037)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2282)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2206)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2064)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:277)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
      	at hudson.remoting.Channel.call(Channel.java:909)
      	at hudson.FilePath.act(FilePath.java:1093)
      	at hudson.plugins.helpers.BuildProxy.doPerform(BuildProxy.java:68)
      	at hudson.plugins.helpers.AbstractPublisherImpl.perform(AbstractPublisherImpl.java:30)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1752)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      ERROR: Build step failed with exception
      java.lang.SecurityException: Rejected: java.util.Calendar
      	at hudson.remoting.ClassFilter.check(ClassFilter.java:75)
      	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:129)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1863)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1746)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1880)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1746)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2037)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2282)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2206)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2064)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:277)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
      	at hudson.remoting.Channel.call(Channel.java:909)
      	at hudson.FilePath.act(FilePath.java:1093)
      	at hudson.plugins.helpers.BuildProxy.doPerform(BuildProxy.java:68)
      Caused: java.lang.RuntimeException: Unexpected exception
      	at hudson.plugins.helpers.BuildProxy.unwrapException(BuildProxy.java:115)
      	at hudson.plugins.helpers.BuildProxy.doPerform(BuildProxy.java:77)
      	at hudson.plugins.helpers.AbstractPublisherImpl.perform(AbstractPublisherImpl.java:30)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1752)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Build step 'Publish Cpp NCSS Report' marked build as failure

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/cppncss-plugin/b7d5dd2be95e83de3df9fac1fc4e0d49df807122
            Log:
            JENKINS-49237 - Fix typo in the plugin URL noticed by @Wadeck

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/cppncss-plugin/b7d5dd2be95e83de3df9fac1fc4e0d49df807122 Log: JENKINS-49237 - Fix typo in the plugin URL noticed by @Wadeck
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            Jenkinsfile
            pom.xml
            src/main/java/hudson/plugins/cppncss/AbstractBuildReport.java
            src/main/java/hudson/plugins/cppncss/AbstractProjectReport.java
            src/main/java/hudson/plugins/cppncss/CppNCSSGhostwriter.java
            src/main/java/hudson/plugins/cppncss/CppNCSSHealthMetrics.java
            src/main/java/hudson/plugins/cppncss/CppNCSSPublisher.java
            src/main/java/hudson/plugins/cppncss/PluginImpl.java
            src/main/java/hudson/plugins/cppncss/parser/FormattedStatisticSummary.java
            src/main/java/hudson/plugins/cppncss/parser/Statistic.java
            src/main/java/hudson/plugins/cppncss/parser/StatisticSummary.java
            src/main/java/hudson/plugins/cppncss/parser/StatisticsResult.java
            src/main/java/hudson/plugins/cppncss/parser/StatisticsTotalResult.java
            src/main/java/hudson/plugins/cppncss/parser/StringStatisticSummary.java
            src/main/java/hudson/plugins/helpers/AbstractBuildAction.java
            src/main/java/hudson/plugins/helpers/BuildProxy.java
            src/main/java/hudson/plugins/helpers/BuildProxyCallableHelper.java
            src/main/java/hudson/plugins/helpers/GraphHelper.java
            src/main/java/hudson/plugins/helpers/health/HealthTarget.java
            src/main/resources/META-INF/hudson.remoting.ClassFilter
            src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/largeGraph.jelly
            src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/normalGraph.jelly
            src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/reportDetail.jelly
            src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/largeGraph.jelly
            src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/normalGraph.jelly
            src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/reportDetail.jelly
            src/main/resources/hudson/plugins/cppncss/CppNCSSPublisher/config.jelly
            src/main/resources/hudson/plugins/cppncss/parser/FormattedStatisticSummary/summary.jelly
            src/main/resources/hudson/plugins/cppncss/parser/StringStatisticSummary/summary.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/enlargedGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/floatingBox.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/index.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/largeGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/normalGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/reportDetail.jelly
            src/main/resources/hudson/plugins/helpers/AbstractBuildAction/summary.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/enlargedGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/floatingBox.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/index.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/largeGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/normalGraph.jelly
            src/main/resources/hudson/plugins/helpers/AbstractProjectAction/reportDetail.jelly
            src/main/resources/index.jelly
            src/main/resources/lib/health/row.jelly
            http://jenkins-ci.org/commit/cppncss-plugin/6f6123807b2a54c607d0c77fa4279d870d105703
            Log:
            Merge pull request #2 from oleg-nenashev/JENKINS-49237-jep-200

            [JENKINS-49237/JENKINS-21511] -Facelift the code and make it compatible with Jenkins 2.102+

            Compare: https://github.com/jenkinsci/cppncss-plugin/compare/de836b18e0bf...6f6123807b2a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile pom.xml src/main/java/hudson/plugins/cppncss/AbstractBuildReport.java src/main/java/hudson/plugins/cppncss/AbstractProjectReport.java src/main/java/hudson/plugins/cppncss/CppNCSSGhostwriter.java src/main/java/hudson/plugins/cppncss/CppNCSSHealthMetrics.java src/main/java/hudson/plugins/cppncss/CppNCSSPublisher.java src/main/java/hudson/plugins/cppncss/PluginImpl.java src/main/java/hudson/plugins/cppncss/parser/FormattedStatisticSummary.java src/main/java/hudson/plugins/cppncss/parser/Statistic.java src/main/java/hudson/plugins/cppncss/parser/StatisticSummary.java src/main/java/hudson/plugins/cppncss/parser/StatisticsResult.java src/main/java/hudson/plugins/cppncss/parser/StatisticsTotalResult.java src/main/java/hudson/plugins/cppncss/parser/StringStatisticSummary.java src/main/java/hudson/plugins/helpers/AbstractBuildAction.java src/main/java/hudson/plugins/helpers/BuildProxy.java src/main/java/hudson/plugins/helpers/BuildProxyCallableHelper.java src/main/java/hudson/plugins/helpers/GraphHelper.java src/main/java/hudson/plugins/helpers/health/HealthTarget.java src/main/resources/META-INF/hudson.remoting.ClassFilter src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/largeGraph.jelly src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/normalGraph.jelly src/main/resources/hudson/plugins/cppncss/AbstractBuildReport/reportDetail.jelly src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/largeGraph.jelly src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/normalGraph.jelly src/main/resources/hudson/plugins/cppncss/AbstractProjectReport/reportDetail.jelly src/main/resources/hudson/plugins/cppncss/CppNCSSPublisher/config.jelly src/main/resources/hudson/plugins/cppncss/parser/FormattedStatisticSummary/summary.jelly src/main/resources/hudson/plugins/cppncss/parser/StringStatisticSummary/summary.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/enlargedGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/floatingBox.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/index.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/largeGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/normalGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/reportDetail.jelly src/main/resources/hudson/plugins/helpers/AbstractBuildAction/summary.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/enlargedGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/floatingBox.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/index.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/largeGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/normalGraph.jelly src/main/resources/hudson/plugins/helpers/AbstractProjectAction/reportDetail.jelly src/main/resources/index.jelly src/main/resources/lib/health/row.jelly http://jenkins-ci.org/commit/cppncss-plugin/6f6123807b2a54c607d0c77fa4279d870d105703 Log: Merge pull request #2 from oleg-nenashev/ JENKINS-49237 -jep-200 [JENKINS-49237/JENKINS-21511] -Facelift the code and make it compatible with Jenkins 2.102+ Compare: https://github.com/jenkinsci/cppncss-plugin/compare/de836b18e0bf...6f6123807b2a
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Apparently I cannot access Jenkins repo ports from FOSDEM network. Will try to push the release on the evening

            Show
            oleg_nenashev Oleg Nenashev added a comment - Apparently I cannot access Jenkins repo ports from FOSDEM network. Will try to push the release on the evening
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in 1.2

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in 1.2
            Hide
            hcorg Konrad Grochowski added a comment -

            It works, thanks!

            Show
            hcorg Konrad Grochowski added a comment - It works, thanks!

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                hcorg Konrad Grochowski
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: