Uploaded image for project: 'DayTrader'
  1. DayTrader
  2. DAYTRADER-51

NPE when logging in with an unknown username

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1.7, 2.2.1, 3.0-M2, 3.0
    • Web Tier
    • None

    Description

      I was testing DayTrayder (in web services mode) and tried to log in with a bad username. That resulted in a bad NPE exception because org.apache.geronimo.samples.daytrader.direct.TradeDirect.login() returned null instead of throwing an exception. I assume an exception should be raised. If null can be returned the web services code needs to be changed to handle that.

      Here's what I see in the logs:

      14:29:43,775 ERROR [Log] Error: TradeDirect:login – failure to find account forhhh
      14:29:43,776 ERROR [Log] Error: TradeDirect:login – error logging in user
      javax.ejb.FinderException: Cannot find account forhhh
      javax.ejb.FinderException: Cannot find account forhhh
      at org.apache.geronimo.samples.daytrader.direct.TradeDirect.login(TradeDirect.java:1487)
      at org.apache.geronimo.samples.daytrader.TradeAction.login(TradeAction.java:455)
      at org.apache.geronimo.samples.daytrader.soap.TradeWSAction.login(TradeWSAction.java:177)

      .....

      Caused by: java.lang.NullPointerException
      at org.apache.geronimo.samples.daytrader.soap.Convert.convertAccountDataBean(Convert.java:97)
      at org.apache.geronimo.samples.daytrader.soap.TradeWSAction.login(TradeWSAction.java:177)
      ... 41 more

      Attachments

        Activity

          People

            xiaming Ming Xia
            gawor@mcs.anl.gov Jarek Gawor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: