Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-3230

Fix schema disablement parsing in Studio Extractor

    XMLWordPrintable

    Details

      Description

      If in a project, you declare a schema disablement such as

      <schema name="files" enabled="false" />
      

      it fails with

      BUILD FAILED - at 2/5/20, 11:43 AM
      /home/fox/workspace/nuxeo/packages/src/main/assemble/assembly.xml:121: java.lang.NullPointerException
      	at java.base/java.util.Objects.requireNonNull(Objects.java:221)
      	at java.base/java.lang.ClassLoader.getResource(ClassLoader.java:1392)
      	at org.nuxeo.studio.components.common.runtime.ExtractorContext.getResource(ExtractorContext.java:114)
      	at org.nuxeo.studio.components.common.serializer.adapter.schema.SimpleSchemaReader.<init>(SimpleSchemaReader.java:43)
      	at org.nuxeo.studio.components.common.serializer.adapter.SchemaAdapter.adapt(SchemaAdapter.java:31)
      	at org.nuxeo.studio.components.common.serializer.adapter.SchemaAdapter.adapt(SchemaAdapter.java:26)
      	at org.nuxeo.studio.components.common.serializer.JacksonConverter.serialize(JacksonConverter.java:115)
      	at org.nuxeo.studio.components.common.serializer.StudioSerializer.serialize(StudioSerializer.java:84)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
      	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.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
      	at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeDescriptors(StudioSerializer.java:80)
      	at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeDescriptors(StudioSerializer.java:56)
      	at org.nuxeo.studio.components.common.serializer.StudioSerializer.lambda$serializeInto$0(StudioSerializer.java:50)
      	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      	at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeInto(StudioSerializer.java:50)
      	at org.nuxeo.studio.components.common.publisher.Publisher$FilePublisher.publish(Publisher.java:78)
      	at org.nuxeo.studio.components.common.ContributionsExtractor.publish(ContributionsExtractor.java:45)
      	at org.nuxeo.build.ant.StudioExtraction.execute(StudioExtraction.java:63)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      	at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:435)
      	at org.apache.tools.ant.Target.performTasks(Target.java:456)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
      	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
      	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      	at org.nuxeo.build.ant.AntClient.run(AntClient.java:161)
      	at org.nuxeo.build.ant.AntClient.run(AntClient.java:119)
      	at org.nuxeo.build.maven.AntBuildMojo.execute(AntBuildMojo.java:256)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
      

      Note that the ability to disable a schema was introduced by NXP-27962 (since 10.10-HF14)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.