Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-16

NullPointerException in wildfly-swarm-plugin

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.Alpha6
    • Component/s: None
    • Labels:
      None

      Description

      I was playing around with Swarm on new samples but also existing ones.

      In an existing JAX-RS sample that I had, I wanted to add Swarm, and I came across a NullPointerException when doing a mvn clean install. The reason is that I had declared the wildfly-swarm-plugin in the pom.xml but not the wildfly-swarm-jaxrs dependency (but instead just the usual jboss-jaxrs-api_1.1_spec.

      To reproduce it, you can use the example-jaxrs sample (just get rid of the wildfly-swarm-jaxrs dependency and insteaduse jboss-jaxrs-api_1.1_spec).

      [ERROR] Failed to execute goal org.wildfly.swarm:wildfly-swarm-plugin:1.0.0.Alpha1:create (default) on project wildfly-swarm-example-jaxrs: Execution default of goal org.wildfly.swarm:wildfly-swarm-plugin:1.0.0.Alpha1:create failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.swarm:wildfly-swarm-plugin:1.0.0.Alpha1:create (default) on project wildfly-swarm-example-jaxrs: Execution default of goal org.wildfly.swarm:wildfly-swarm-plugin:1.0.0.Alpha1:create failed.
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
              at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.wildfly.swarm:wildfly-swarm-plugin:1.0.0.Alpha1:create failed.
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
              ... 20 more
      Caused by: java.lang.NullPointerException
              at org.wildfly.swarm.plugin.CreateMojo.expandArtifact(CreateMojo.java:352)
              at org.wildfly.swarm.plugin.CreateMojo.addJBossModules(CreateMojo.java:341)
              at org.wildfly.swarm.plugin.CreateMojo.execute(CreateMojo.java:78)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
              ... 21 more
      [ERROR] 
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                agoncal Antonio Goncalves
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: