Mojo's NetBeans Module Maven Plugin
  1. Mojo's NetBeans Module Maven Plugin
  2. MNBMODULE-79

default-cluster-app goal fails with NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.2
    • Fix Version/s: 3.3
    • Labels:
      None
    • Environment:
      mac 10.5 maven3-snapshot
    • Number of attachments :
      0

      Description

      [ERROR] Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.2:cluster-app (default-cluster-app) on project application: Execution default-cluster-app of goal org.codehaus.mojo:nbm-maven-plugin:3.2:cluster-app failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.2:cluster-app (default-cluster-app) on project application: Execution default-cluster-app of goal org.codehaus.mojo:nbm-maven-plugin:3.2:cluster-app failed.
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:640)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:550)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:337)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:254)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cluster-app of goal org.codehaus.mojo:nbm-maven-plugin:3.2:cluster-app failed.
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:114)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:624)
      ... 15 more
      Caused by: java.lang.NullPointerException
      at java.io.Reader.<init>(Reader.java:61)
      at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
      at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:280)
      at org.codehaus.plexus.util.IOUtil.toString(IOUtil.java:336)
      at org.codehaus.plexus.util.IOUtil.toString(IOUtil.java:320)
      at org.codehaus.mojo.nbm.CreateClusterAppMojo.createBinEtcDir(CreateClusterAppMojo.java:483)
      at org.codehaus.mojo.nbm.CreateClusterAppMojo.execute(CreateClusterAppMojo.java:396)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
      ... 16 more

        Issue Links

          Activity

          Hide
          Milos Kleint added a comment -

          I'm wondering if the same project builds with maven 2.2.x?
          the issue could be related to maven 3.x and some possible changes in classloading there.

          Show
          Milos Kleint added a comment - I'm wondering if the same project builds with maven 2.2.x? the issue could be related to maven 3.x and some possible changes in classloading there.
          Hide
          Milos Kleint added a comment -

          I wonder if you can check out the 3.3-SNAPSHOT version at http://snapshots.repository.codehaus.org/ and let me know if it works?

          Show
          Milos Kleint added a comment - I wonder if you can check out the 3.3-SNAPSHOT version at http://snapshots.repository.codehaus.org/ and let me know if it works?
          Hide
          Jesse Glick added a comment -

          This change seems to have fixed the problem in 3.3-SNAPSHOT:

          @@ -478,8 +477,7 @@
                           InputStream instream = null;
                           try
                           {
          -                    instream = getClass().getClassLoader().getResourceAsStream(
          -                        "/app.conf" );
          +                    instream = getClass().getClassLoader().getResourceAsStream("app.conf" );
                               str = IOUtil.toString( instream, "UTF-8" );
                           }
                           finally
          
          Show
          Jesse Glick added a comment - This change seems to have fixed the problem in 3.3-SNAPSHOT : @@ -478,8 +477,7 @@ InputStream instream = null; try { - instream = getClass().getClassLoader().getResourceAsStream( - "/app.conf" ); + instream = getClass().getClassLoader().getResourceAsStream("app.conf" ); str = IOUtil.toString( instream, "UTF-8" ); } finally
          Hide
          Milos Kleint added a comment -

          ok. the change was already in trunk and since jesse verified the fix, closing as fixed.

          Show
          Milos Kleint added a comment - ok. the change was already in trunk and since jesse verified the fix, closing as fixed.

            People

            • Assignee:
              Milos Kleint
              Reporter:
              Erik Martino Hansen
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: