Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2851

NPE creating a project in a directory with only non-root POMs

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: @ ROO SHELL
    • Labels:
      None

      Description

      When attempting to execute the bikeshop script in a non-empty directory, but with no pom or other Roo-generated files or directories, the following NPE occurs:

      oo> script bikeshop.roo
      project --topLevelPackage com.springsource.bikeshop
      java.lang.NullPointerException
          at org.springframework.roo.project.MavenPathResolvingStrategy.getPathInformation(MavenPathResolvingStrategy.java:171)
          at org.springframework.roo.project.MavenPathResolvingStrategy.getIdentifier(MavenPathResolvingStrategy.java:213)
          at org.springframework.roo.project.DelegatePathResolver.getIdentifier(DelegatePathResolver.java:61)
          at org.springframework.roo.project.MavenOperationsImpl.createMavenPom(MavenOperationsImpl.java:167)
          at org.springframework.roo.project.MavenOperationsImpl.createProject(MavenOperationsImpl.java:66)
          at org.springframework.roo.project.MavenCommands.createProject(MavenCommands.java:54)
          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.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
          at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204)
          at org.springframework.roo.shell.AbstractShell.executeScriptLine(AbstractShell.java:144)
          at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:93)
          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.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
          at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204)
          at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:403)
          at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158)
          at java.lang.Thread.run(Thread.java:680)
      Script required 0.087 seconds to execute
      Script execution aborted
      java.lang.IllegalStateException: Script execution aborted
          at org.springframework.roo.shell.AbstractShell.script(AbstractShell.java:98)
          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.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183)
          at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146)
          at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
          at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204)
          at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:403)
          at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158)
          at java.lang.Thread.run(Thread.java:680)
      

      Project attached

        Attachments

          Activity

            People

            • Assignee:
              aswan Andrew Swan
              Reporter:
              stewarta Alan Stewart
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: