Spring Roo
  1. Spring Roo
  2. ROO-2847

NPE in JLineShellComponent when starting Roo with no wired or wireless network

    Details

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

      Description

      A user reports upon starting the Roo shell, the following error occurs:

      Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
      Exception in thread "Spring Roo JLine Shell" java.lang.NullPointerException
      at org.springframework.roo.shell.jline.osgi.JLineShel lComponent.getLatestFavouriteTweet(JLineShel
      lComponent.java:97)
      at org.springframework.roo.shell.jline.osgi.JLineShel lComponent.getStartupNotifications(JLineShel
      lComponent.java:85)
      at org.springframework.roo.shell.jline.JLineShell.run (JLineShell.java:130)
      at java.lang.Thread.run(Thread.java:662)
      

        Activity

        Hide
        Alan Stewart added a comment -

        Though I am unable to reproduce this error with no network at all in 1.2.0.M1, I added a couple of null checks in Git ID daf49bc780d697a964ced8ee39bce9af857fb5f2. Please test

        Show
        Alan Stewart added a comment - Though I am unable to reproduce this error with no network at all in 1.2.0.M1, I added a couple of null checks in Git ID daf49bc780d697a964ced8ee39bce9af857fb5f2. Please test
        Hide
        Reggie added a comment -

        Who does this issue affect?
        ONLY users whose access to "Twitter.com" is BLOCKED, this is mostly in Corporate offices.

        How can a regular user test it?
        You need "Twitter.com" access blocked by a firewall, or network.

        What is the Error?
        / __ \/ __ \/ __ \
        / /_/ / / / / / / /
        / , _/ // / /_/ /
        // ||___/___/ 1.2.0.BUILD-SNAPSHOT [rev fdae33a]

        Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
        Exception in thread "Spring Roo JLine Shell" java.lang.NullPointerException
        at org.springframework.roo.shell.jline.osgi.JLineShellComponent.getLatestFavouriteTweet(JLineShel
        lComponent.java:94)
        at org.springframework.roo.shell.jline.osgi.JLineShellComponent.getStartupNotifications(JLineShel
        lComponent.java:82)
        at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:130)
        at java.lang.Thread.run(Thread.java:662)

        What happens after the error?
        The ROO console/shell just hangs

        Which version of ROO, does this happen?
        All 1.2 version (M1 and any Builds)

        Is there a work around?
        Yes, switch off your network, start ROO, then once you get the prompt, switch on your network connection.

        Show
        Reggie added a comment - Who does this issue affect? ONLY users whose access to "Twitter.com" is BLOCKED, this is mostly in Corporate offices. How can a regular user test it? You need "Twitter.com" access blocked by a firewall, or network. What is the Error? / __ \/ __ \/ __ \ / /_/ / / / / / / / / , _/ / / / /_/ / / / | |___ /_ __/ 1.2.0.BUILD-SNAPSHOT [rev fdae33a] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. Exception in thread "Spring Roo JLine Shell" java.lang.NullPointerException at org.springframework.roo.shell.jline.osgi.JLineShellComponent.getLatestFavouriteTweet(JLineShel lComponent.java:94) at org.springframework.roo.shell.jline.osgi.JLineShellComponent.getStartupNotifications(JLineShel lComponent.java:82) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:130) at java.lang.Thread.run(Thread.java:662) What happens after the error? The ROO console/shell just hangs Which version of ROO, does this happen? All 1.2 version (M1 and any Builds) Is there a work around? Yes, switch off your network, start ROO, then once you get the prompt, switch on your network connection.
        Hide
        Reggie added a comment -

        The issue may be in org.springframework.roo.shell.jline.osgi.JLineShellComponent
        on line 86 String string = sendGetRequest("http://api.twitter.com/1/favorites.json", "id=SpringRoo&count=1"); it makes a call to twitter API.

        Show
        Reggie added a comment - The issue may be in org.springframework.roo.shell.jline.osgi.JLineShellComponent on line 86 String string = sendGetRequest( "http://api.twitter.com/1/favorites.json" , "id=SpringRoo&count=1"); it makes a call to twitter API.
        Hide
        Alan Stewart added a comment -

        Confirmed that Git commit ID 6e4ef8c341d5b8bf5319c9656fc81b3c8c1f55e6 fixes the underlying issue. Verified by blocking twitter.com on my local home firewall and reproduced issue seen in 1.2.0.M1. This is now resolved.

        Show
        Alan Stewart added a comment - Confirmed that Git commit ID 6e4ef8c341d5b8bf5319c9656fc81b3c8c1f55e6 fixes the underlying issue. Verified by blocking twitter.com on my local home firewall and reproduced issue seen in 1.2.0.M1. This is now resolved.

          People

          • Assignee:
            Alan Stewart
            Reporter:
            Alan Stewart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: