Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2642

Nullpointer exception when trying to install a pom extension from a Maven repository

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Getting

      Caused by: java.lang.NullPointerException
          at java.util.concurrent.ConcurrentHashMap.get (ConcurrentHashMap.java:936)
          at org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager.getArtifactHandler (DefaultArtifactHandlerManager.java:46)
          at org.apache.maven.RepositoryUtils$MavenArtifactTypeRegistry.get (RepositoryUtils.java:358)
          at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.getExtension (AetherExtensionRepository.java:624)
          at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven (AetherExtensionRepository.java:599)
          at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven (AetherExtensionRepository.java:536)
          at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolveMaven (AetherExtensionRepository.java:522)
          at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.resolve (AetherExtensionRepository.java:343)
          at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.resolve (DefaultExtensionRepositoryManager.java:331)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.resolveExtension (AbstractInstallPlanJob.java:918)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependency (AbstractInstallPlanJob.java:750)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installMandatoryExtensionDependency (AbstractInstallPlanJob.java:719)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependency (AbstractInstallPlanJob.java:574)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependencies (AbstractInstallPlanJob.java:1138)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtension (AbstractInstallPlanJob.java:1058)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependency (AbstractInstallPlanJob.java:765)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installMandatoryExtensionDependency (AbstractInstallPlanJob.java:719)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependency (AbstractInstallPlanJob.java:574)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtensionDependencies (AbstractInstallPlanJob.java:1138)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtension (AbstractInstallPlanJob.java:1058)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtension (AbstractInstallPlanJob.java:868)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtension (AbstractInstallPlanJob.java:316)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.installExtension (AbstractInstallPlanJob.java:284)
          at org.xwiki.extension.job.internal.AbstractInstallPlanJob.start (AbstractInstallPlanJob.java:215)
          at org.xwiki.extension.job.internal.InstallPlanJob.runInternal (InstallPlanJob.java:74)
          at org.xwiki.job.AbstractJob.runInContext (AbstractJob.java:246)
          at org.xwiki.job.AbstractJob.run (AbstractJob.java:223)
          at org.xwiki.tool.extension.util.ExtensionMojoHelper.resolve (ExtensionMojoHelper.java:404)
          at org.xwiki.tool.extension.util.ExtensionMojoHelper.resolveDependencies (ExtensionMojoHelper.java:421)
          at org.xwiki.tool.extension.util.ExtensionMojoHelper.storeExtensionDependencies (ExtensionMojoHelper.java:381)
          at org.xwiki.tool.extension.XIPMojo.packageExtensions (XIPMojo.java:50)
          at org.xwiki.tool.extension.XIPMojo.executeInternal (XIPMojo.java:43)
          at org.xwiki.tool.extension.util.AbstractExtensionMojo.execute (AbstractExtensionMojo.java:132)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
          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:127)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
          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:960)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          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: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)
      

      We have a unit test for this very use case, unfortunately it's executed with Maven 3.6.0, and it seems Maven 3.8.6 (embedded in XWiki runtime) does not support null (the extension type in the case of a pom extension) as input to RepositoryUtils$MavenArtifactTypeRegistry.get.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: