IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

NPE on new nUIViewDisplay(NUIID);

  • 1.  NPE on new nUIViewDisplay(NUIID);

    Posted Wed February 08, 2012 10:34 AM

    Hi everyone,

    we have some unit tests that check whether our view layouts are correct.
    For that purpose we create nUIViewDisplay instances and assert their elements.
    This scheme was working for some time, but now the tests fail due to NPE on new nUIViewDisplay(id);
    At some point in the creation of the view, nUIController.getScreenWidth() is called, where the canvas_interface variable is not initialized which results in NPE.
    We use junit4.

    Is this expected behavior?
    Do we need to change the tests or the way they are executed?

    Thanks,
    Evgeni


    #Integration-Server-and-ESB
    #webMethods-General
    #mobile
    #webMethods


  • 2.  RE: NPE on new nUIViewDisplay(NUIID);

    Posted Wed February 08, 2012 11:34 AM

    Hi Evgeni,

    I assume this is on the desktop using Phoney? Setting up nUI components before the CanvasInterface has been added will always be problematic. We can look to patch that functionality so it doesn’t throw an Exception, but the generated View will likely have some of its internal set up incorrectly for future real use.

    Regards,

    Nick.


    #mobile
    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General