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

JTE JCasC export reults in FAILED TO EXPORT error - ClassCastException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • subversion-plugin
    • None
    • Jenkins: 2.293
      templating-engine: 2.2.2

      While the plugin works as expected, trying to export its JCasC configuration results in this error:

      FAILED TO EXPORT
      org.boozallen.plugins.jte.init.governance.config.ScmPipelineConfigurationProvider#scm: java.lang.ClassCastException: class [Lhudson.scm.SubversionSCM$ModuleLocation; cannot be cast to class hudson.scm.SubversionSCM$ModuleLocation ([Lhudson.scm.SubversionSCM$ModuleLocation; and hudson.scm.SubversionSCM$ModuleLocation are in unnamed module of loader hudson.ClassicPluginStrategy$AntClassLoader2 @7ccd4b7f)
      

      The JCasC yaml output includes the full exception stacktrace.

        templateGlobalConfig:
          tier:
            configurationProvider:
              scm:
                scm: |-
                  FAILED TO EXPORT
                  org.boozallen.plugins.jte.init.governance.config.ScmPipelineConfigurationProvider#scm: java.lang.ClassCastException: class [Lhudson.scm.SubversionSCM$ModuleLocation; cannot be cast to class hudson.scm.SubversionSCM$ModuleLocation ([Lhudson.scm.SubversionSCM$ModuleLocation; and hudson.scm.SubversionSCM$ModuleLocation are in unnamed module of loader hudson.ClassicPluginStrategy$AntClassLoader2 @7ccd4b7f)
                    at hudson.scm.SubversionSCM.<init>(SubversionSCM.java:377)
                  Caused: java.lang.reflect.InvocationTargetException
                    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
                    at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:308)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                    at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                    at io.vavr.control.Option.map(Option.java:392)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                    at io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:391)
                    at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:311)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                    at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                    at io.vavr.control.Option.map(Option.java:392)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                    at io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:391)
                    at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:311)
                    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                    at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:183)
                    at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:115)
                    at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.lambda$describe$3(GlobalConfigurationCategoryConfigurator.java:108)
                    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
                    at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
                    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
                    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
                    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
                    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
                    at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:108)
                    at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:33)
            librarySources:
            - libraryProvider:
                scm:
                  scm: |-
                    FAILED TO EXPORT
                    org.boozallen.plugins.jte.init.governance.libs.ScmLibraryProvider#scm: java.lang.ClassCastException: class [Lhudson.scm.SubversionSCM$ModuleLocation; cannot be cast to class hudson.scm.SubversionSCM$ModuleLocation ([Lhudson.scm.SubversionSCM$ModuleLocation; and hudson.scm.SubversionSCM$ModuleLocation are in unnamed module of loader hudson.ClassicPluginStrategy$AntClassLoader2 @7ccd4b7f)
                      at hudson.scm.SubversionSCM.<init>(SubversionSCM.java:377)
                    Caused: java.lang.reflect.InvocationTargetException
                      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
                      at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:308)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                      at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                      at io.vavr.control.Option.map(Option.java:392)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                      at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                      at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                      at io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:391)
                      at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:311)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                      at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                      at io.vavr.control.Option.map(Option.java:392)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                      at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                      at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                      at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:316)
                      at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                      at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:257)
                      at io.jenkins.plugins.casc.BaseConfigurator.compare(BaseConfigurator.java:391)
                      at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:311)
                      at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                      at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                      at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:183)
                      at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:115)
                      at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.lambda$describe$3(GlobalConfigurationCategoryConfigurator.java:108)
                      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
                      at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
                      at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
                      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
                      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
                      at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                      at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
                      at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:108)
                      at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:33)
      

            Unassigned Unassigned
            juliohm Julio Morimoto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: