NullPointerException on submitting empty instance

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException on submitting empty instance

Adrian Baker-2
I accidentally made the top level node of my instance non-relevant, and
then submitted this which gave me a NullPointerException:

2006-05-04 10:31:57,731 DEBUG
org.orbeon.oxf.xforms.processor.XFormsServer  - XForms - submit error
exception: java.lang.NullPointerException
    at
org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:278)
    at
org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:273)
    at org.orbeon.oxf.xforms.XFormsModel.doRevalidate(XFormsModel.java:940)
    at
org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:827)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)
    at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:215)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)

So this is been thrown from
final List childrenElements = element.elements();

because instance.getRootElement() is null.

I'm not sure what the spec-compliant behaviour is, but a quick
improvement would be to throw a more specific exception from doRevalidate.

Adrian





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException on submitting empty instance

Alessandro  Vernet
Administrator
Adrian,

I tried to add an <xforms:bind nodeset="/*" relevant="false()"/> to an
existing document I had, and didn't see the problem. Would you have a
use case that we can run the XForms sandbox?

Alex

On 5/3/06, Adrian Baker <[hidden email]> wrote:

> I accidentally made the top level node of my instance non-relevant, and
> then submitted this which gave me a NullPointerException:
>
> 2006-05-04 10:31:57,731 DEBUG
> org.orbeon.oxf.xforms.processor.XFormsServer  - XForms - submit error
> exception: java.lang.NullPointerException
>     at
> org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:278)
>     at
> org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:273)
>     at org.orbeon.oxf.xforms.XFormsModel.doRevalidate(XFormsModel.java:940)
>     at
> org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:827)
>     at
> org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)
>     at
> org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:215)
>     at
> org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)
>
> So this is been thrown from
> final List childrenElements = element.elements();
>
> because instance.getRootElement() is null.
>
> I'm not sure what the spec-compliant behaviour is, but a quick
> improvement would be to throw a more specific exception from doRevalidate.
>
> Adrian
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException on submitting empty instance

Adrian Baker-2
The attached form does a submit on startup (xforms-ready) which results in the null pointer. I can't tell though if the exception is still triggered in the OPS sandbox since I don't have access to the log, and in true XForms style the form still happily loads up despite the error :)

Adrian

Alessandro Vernet wrote:
Adrian,

I tried to add an <xforms:bind nodeset="/*" relevant="false()"/> to an
existing document I had, and didn't see the problem. Would you have a
use case that we can run the XForms sandbox?

Alex

On 5/3/06, Adrian Baker [hidden email] wrote:
I accidentally made the top level node of my instance non-relevant, and
then submitted this which gave me a NullPointerException:

2006-05-04 10:31:57,731 DEBUG
org.orbeon.oxf.xforms.processor.XFormsServer  - XForms - submit error
exception: java.lang.NullPointerException
    at
org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:278)
    at
org.orbeon.oxf.xforms.XFormsUtils.iterateInstanceData(XFormsUtils.java:273)
    at org.orbeon.oxf.xforms.XFormsModel.doRevalidate(XFormsModel.java:940)
    at
org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:827)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)
    at
org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:215)
    at
org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:615)

So this is been thrown from
final List childrenElements = element.elements();

because instance.getRootElement() is null.

I'm not sure what the spec-compliant behaviour is, but a quick
improvement would be to throw a more specific exception from doRevalidate.

Adrian






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws





--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

nullPointerOnSubmit.xhtml (28K) Download Attachment