-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: NSCC-0.1.1
-
Component/s: nuxeo-studio-components-common
-
Tags:
When parsing schema resources to create Studio json registries, some configurations are not handled correctly.
For instance, the sample package build is currently failing with a NPE:
https://qa.nuxeo.org/jenkins/job/master/job/addons_FT_nuxeo-sample-project-master/1014/console
16:26:07 [INFO] Serialize: org.nuxeo.studio.components.common.serializer.adapter.schema.Schema@26908ea4 16:26:07 [INFO] Serialize: org.nuxeo.studio.components.common.serializer.adapter.schema.Schema@4f8e687 16:26:07 [ERROR] 16:26:07 BUILD FAILED - at 9/3/18 4:26 PM 16:26:07 /opt/jenkins/workspace/master/addons_FT_nuxeo-sample-project-master/marketplace-nonxr/src/main/assemble/assembly.xml:61: java.lang.NullPointerException 16:26:07 at sun.misc.MetaIndex.mayContain(MetaIndex.java:242) 16:26:07 at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:995) 16:26:07 at sun.misc.URLClassPath.getResource(URLClassPath.java:212) 16:26:07 at sun.misc.URLClassPath.getResource(URLClassPath.java:265) 16:26:07 at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1264) 16:26:07 at java.lang.ClassLoader.getResource(ClassLoader.java:1093) 16:26:07 at org.codehaus.plexus.classworlds.realm.ClassRealm.getResource(ClassRealm.java:287) 16:26:07 at java.lang.ClassLoader.getResource(ClassLoader.java:1091) 16:26:07 at java.lang.ClassLoader.getResource(ClassLoader.java:1091) 16:26:07 at org.nuxeo.studio.components.common.runtime.ExtractorContext.getResource(ExtractorContext.java:132) 16:26:07 at org.nuxeo.studio.components.common.serializer.adapter.schema.SimpleSchemaReader.<init>(SimpleSchemaReader.java:43) 16:26:07 at org.nuxeo.studio.components.common.serializer.adapter.SchemaAdapter.adapt(SchemaAdapter.java:31) 16:26:07 at org.nuxeo.studio.components.common.serializer.adapter.SchemaAdapter.adapt(SchemaAdapter.java:26) 16:26:07 at org.nuxeo.studio.components.common.serializer.JacksonConverter.serialize(JacksonConverter.java:115) 16:26:07 at org.nuxeo.studio.components.common.serializer.StudioSerializer.serialize(StudioSerializer.java:84) 16:26:07 at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 16:26:07 at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) 16:26:07 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 16:26:07 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 16:26:07 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 16:26:07 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 16:26:07 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 16:26:07 at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeDescriptors(StudioSerializer.java:80) 16:26:07 at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeDescriptors(StudioSerializer.java:56) 16:26:07 at org.nuxeo.studio.components.common.serializer.StudioSerializer.lambda$serializeInto$0(StudioSerializer.java:50) 16:26:07 at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) 16:26:07 at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) 16:26:07 at org.nuxeo.studio.components.common.serializer.StudioSerializer.serializeInto(StudioSerializer.java:50) 16:26:07 at org.nuxeo.studio.components.common.publisher.Publisher$FilePublisher.publish(Publisher.java:78) 16:26:07 at org.nuxeo.studio.components.common.ContributionsExtractor.publish(ContributionsExtractor.java:45) 16:26:07 at org.nuxeo.build.ant.StudioExtraction.execute(StudioExtraction.java:63) 16:26:07 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) 16:26:07 at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) 16:26:07 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:26:07 at java.lang.reflect.Method.invoke(Method.java:498) 16:26:07 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 16:26:07 at org.apache.tools.ant.Task.perform(Task.java:348) 16:26:07 at org.apache.tools.ant.Target.execute(Target.java:435) 16:26:07 at org.apache.tools.ant.Target.performTasks(Target.java:456) 16:26:07 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) 16:26:07 at org.apache.tools.ant.Project.executeTarget(Project.java:1376) 16:26:07 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 16:26:07 at org.nuxeo.build.ant.AntClient.run(AntClient.java:161) 16:26:07 at org.nuxeo.build.ant.AntClient.run(AntClient.java:119) 16:26:07 at org.nuxeo.build.maven.AntBuildMojo.execute(AntBuildMojo.java:256) 16:26:07 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 16:26:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) 16:26:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 16:26:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 16:26:07 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 16:26:07 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 16:26:07 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 16:26:07 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 16:26:07 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 16:26:07 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 16:26:07 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 16:26:07 at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129) 16:26:07 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:26:07 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 16:26:07 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:26:07 at java.lang.reflect.Method.invoke(Method.java:498) 16:26:07 at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) 16:26:07 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) 16:26:07 at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176) 16:26:07 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:26:07 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 16:26:07 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:26:07 at java.lang.reflect.Method.invoke(Method.java:498) 16:26:07 at hudson.maven.Maven3Builder.call(Maven3Builder.java:139) 16:26:07 at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) 16:26:07 at hudson.remoting.UserRequest.perform(UserRequest.java:152) 16:26:07 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 16:26:07 at hudson.remoting.Request$2.run(Request.java:332) 16:26:07 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 16:26:07 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 16:26:07 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 16:26:07 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 16:26:07 at java.lang.Thread.run(Thread.java:745) 16:26:07 16:26:07 Total time: 7 seconds 16:26:08 Notifying upstream projects
First it would be nice to have better debug logs to understand the culprit issue more easily.
Second this error is generated by the following valid runtime contribution:
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype"> <proxies> <schema name="collectionMember" /> </proxies> </extension>
So the generator should not try to fetch the source as if it was a schema declaration.