Re: Need a few debugging pointers (no pun intended :)

From: Guido Neitzer (guido.neitze..harmaline.de)
Date: Tue Aug 24 2004 - 23:38:50 EDT

  • Next message: Brendan Duddridge: "Re: Need a few debugging pointers (no pun intended :)"

    Check whether you have a partial or full component ... I get also
    NullPointerExceptions when I try to use a form on a partial component
    which is not included in a wrapper.

    This can happen as WOLips (at least until beta 2) creates partial
    components by default.

    cug

    womai..ac.com wrote:

    > I'm working my way through Apple's Web Apps book, and have run into my
    > first debugging challenge. I'm in Chapter 7, the Component
    > Communication exercise.
    >
    > I'm getting a java.lang.NullPointerException when I hit the submit
    > button, but that's not really the problem. The problem is that I'm
    > trying to figure out how to debug this, and it's eluding me. I had no
    > problems with the basic stuff, setting breakpoints and stepping through
    > code. But I'm not sure what to do with this error.
    >
    > I have a function called submitChanges bound to the submit button, and
    > I put a breakpoint on the first line, but it's never getting there.
    > The stack trace in the console window (I'm using Eclipse 3) looks like
    > this (there's more of it but I figured this was enough):
    >
    > [2004-08-24 22:33:08 EDT] <WorkerThread0>
    > <com.webobjects.appserver._private.WOComponentRequestHandler>:
    > Exception occurred while handling request:
    > java.lang.NullPointerException
    > [2004-08-24 22:33:08 EDT] <WorkerThread0> java.lang.NullPointerException
    > at
    > com.webobjects.appserver._private.WOForm._enterFormInContext(WOForm.java
    > :58)
    > at
    > com.webobjects.appserver._private.WOForm.takeValuesFromRequest(WOForm.ja
    > va:69)
    >
    > The source for WOForm.class and WOComponent.class aren't able to be
    > found by Eclipse, and I don't know if it's a configuration snafu on my
    > part or if we just treat those as magic black boxes.
    >
    > So my question is, how do I go about figuring out where my error is?
    > I'll gladly RTFM, I just can't find an appropriate FM to R. I have
    > already looked at the debugging help in Eclipse but it wasn't detailed
    > enough for this situation (or for my state of newbieness, take your
    > pick :).
    >
    > thanks,
    >
    > janine
    >
    > PS thanks to the several people who posted and e-mailed me about how to
    > get past the "does not contain a main type" error. Baby steps... ;)



    This archive was generated by hypermail 2.0.0 : Tue Aug 24 2004 - 23:38:47 EDT