adobe / aemanalyser-maven-plugin

A Maven plugin used by developers who develop Java components for AEMaaCS (AEM as a Cloud Service) during their local Java builds to ensure that their components work correctly in when deployed to AEM as a Cloud Service.
Apache License 2.0
23 stars 20 forks source link

Content Package Converter Exception: javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.adobe.com/jcr/granite/1.0}InboxItem #215

Open kwin opened 7 months ago

kwin commented 7 months ago

With aemanalyser:1.5.8:project-analyse I get the following exception

[INFO] --- aemanalyser:1.5.8:project-analyse (analyser) @ novonordisk-aem-hcp-integrations-all-container ---
Downloading from central: https://repo.maven.apache.org/maven2/com/adobe/aem/aemanalyser-maven-plugin/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/com/adobe/aem/aemanalyser-maven-plugin/maven-metadata.xml (1.6 kB at 15 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/com/adobe/aem/aem-sdk-api/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/com/adobe/aem/aem-sdk-api/maven-metadata.xml (12 kB at 1.2 MB/s)
[INFO] Using detected SDK Version for analysis: com.adobe.aem:aem-sdk-api:2024.4.15787.20240404T134829Z-231200
[INFO] Using current project as content package: .... all-container:content-package:1.0-SNAPSHOT
[INFO] Converting packages [...all-container:content-package:1.0-SNAPSHOT]
[INFO] Reading content-package '...all-container-1.0-SNAPSHOT.zip'...
[INFO] Processing bundle ...integrations-data-access-1.0-SNAPSHOT.jar...
[INFO] Reading '...integrations-data-access-1.0-SNAPSHOT' bundle GAV from META-INF/maven/...integrations-data-access/pom.xml...
[INFO] Reading '...integrations-data-access-1.0-SNAPSHOT' bundle GAV from META-INF/maven/...integrations-data-access/pom.properties...
[INFO] Ignoring inputstream /jcr_root/apps/.../install/...integrations-data-access-1.0-SNAPSHOT.jar with id ...integrations-data-access:1.0-SNAPSHOT
[INFO] Processing bundle aem-sdk-api-2024.2.15262.20240224T002940Z-231200.jar...
[INFO] Cleaning up tmp directory /var/folders/f8/_3c0rvgd00n324sqjc8y_3wr0000gn/T/cp2fm-converter7952585159657370471
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.366 s
[INFO] Finished at: 2024-04-08T13:26:31+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.adobe.aem:aemanalyser-maven-plugin:1.5.8:project-analyse (analyser) on project novonordisk-aem-hcp-integrations-all-container: Content Package Converter Exception {http://www.adobe.com/jcr/granite/1.0}InboxItem -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.adobe.aem:aemanalyser-maven-plugin:1.5.8:project-analyse (analyser) on project novonordisk-aem-hcp-integrations-all-container: Content Package Converter Exception {http://www.adobe.com/jcr/granite/1.0}InboxItem
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.MojoExecutionException: Content Package Converter Exception {http://www.adobe.com/jcr/granite/1.0}InboxItem
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.convertContentPackages (AemAnalyseMojo.java:167)
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.doExecute (AemAnalyseMojo.java:129)
    at com.adobe.aem.analyser.mojos.AbstractAnalyseMojo.execute (AbstractAnalyseMojo.java:122)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.io.IOException: {http://www.adobe.com/jcr/granite/1.0}InboxItem
    at org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.JcrNamespaceRegistryProvider.provideRegistryFromBundle (JcrNamespaceRegistryProvider.java:84)
    at org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.BundleSlingInitialContentExtractContext.<init> (BundleSlingInitialContentExtractContext.java:67)
    at org.apache.sling.feature.cpconverter.handlers.SlingInitialContentBundleHandler.processBundleInputStream (SlingInitialContentBundleHandler.java:52)
    at org.apache.sling.feature.cpconverter.handlers.BundleEntryHandler.handle (BundleEntryHandler.java:141)
    at org.apache.sling.feature.cpconverter.vltpkg.RecollectorVaultPackageScanner.onFile (RecollectorVaultPackageScanner.java:61)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:112)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:91)
    at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.firstPass (ContentPackage2FeatureModelConverter.java:288)
    at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.convert (ContentPackage2FeatureModelConverter.java:267)
    at com.adobe.aem.analyser.AemPackageConverter.convert (AemPackageConverter.java:180)
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.convertContentPackages (AemAnalyseMojo.java:162)
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.doExecute (AemAnalyseMojo.java:129)
    at com.adobe.aem.analyser.mojos.AbstractAnalyseMojo.execute (AbstractAnalyseMojo.java:122)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.adobe.com/jcr/granite/1.0}InboxItem
    at org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistryImpl.getEffectiveNodeType (NodeTypeRegistryImpl.java:413)
    at org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistryImpl.getEffectiveNodeType (NodeTypeRegistryImpl.java:236)
    at org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl.getNodeType (NodeTypeManagerImpl.java:133)
    at org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl.getNodeType (NodeTypeManagerImpl.java:349)
    at org.apache.jackrabbit.commons.cnd.CndImporter.ensureNtBase (CndImporter.java:183)
    at org.apache.jackrabbit.commons.cnd.CndImporter.registerNodeTypes (CndImporter.java:158)
    at org.apache.sling.feature.cpconverter.vltpkg.JcrNamespaceRegistry.registerCnd (JcrNamespaceRegistry.java:58)
    at org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.JcrNamespaceRegistryProvider.registerCndIntoRegistry (JcrNamespaceRegistryProvider.java:116)
    at org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.JcrNamespaceRegistryProvider.provideRegistryFromBundle (JcrNamespaceRegistryProvider.java:80)
    at org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.BundleSlingInitialContentExtractContext.<init> (BundleSlingInitialContentExtractContext.java:67)
    at org.apache.sling.feature.cpconverter.handlers.SlingInitialContentBundleHandler.processBundleInputStream (SlingInitialContentBundleHandler.java:52)
    at org.apache.sling.feature.cpconverter.handlers.BundleEntryHandler.handle (BundleEntryHandler.java:141)
    at org.apache.sling.feature.cpconverter.vltpkg.RecollectorVaultPackageScanner.onFile (RecollectorVaultPackageScanner.java:61)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:112)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:104)
    at org.apache.sling.feature.cpconverter.vltpkg.BaseVaultPackageScanner.traverse (BaseVaultPackageScanner.java:91)
    at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.firstPass (ContentPackage2FeatureModelConverter.java:288)
    at org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.convert (ContentPackage2FeatureModelConverter.java:267)
    at com.adobe.aem.analyser.AemPackageConverter.convert (AemPackageConverter.java:180)
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.convertContentPackages (AemAnalyseMojo.java:162)
    at com.adobe.aem.analyser.mojos.AemAnalyseMojo.doExecute (AemAnalyseMojo.java:129)
    at com.adobe.aem.analyser.mojos.AbstractAnalyseMojo.execute (AbstractAnalyseMojo.java:122)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
kwin commented 7 months ago

The exception message does unfortunately not even expose in which bundle's initial content the problem lies...

kwin commented 7 months ago

Turned out this happens when (not deliberately) embedding aem-sdk-api itself in the container package. Although clearly a mistake with building the package this should lead to a better error message.