You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Ian P. Springer (JIRA)" <xm...@xml.apache.org> on 2005/03/02 19:04:50 UTC

[jira] Commented: (XMLBEANS-99) NPE/AssertionFailure in newDomNode()

     [ http://issues.apache.org/jira/browse/XMLBEANS-99?page=comments#action_60060 ]
     
Ian P. Springer commented on XMLBEANS-99:
-----------------------------------------

I am getting an NPE at the same spot using v1.0.4. I am running with types generated for the attached schema (WS-BaseFaults-1_2-Draft_03.xsd). The call to newDomNode() in the below code causes the NPE when Saver#getUriMapping() is called on "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd":

BaseFaultDocument baseFaultDoc = BaseFaultDocument.Factory.newInstance();
       BaseFaultType baseFaultType = baseFaultDoc.addNewBaseFault();
       baseFaultType.setTimestamp( Calendar.getInstance() );
       baseFaultType.newDomNode() );

Note, however, if I instead call newDomNode() on baseFaultDoc, there is no problem; newDomNode() returns successfully.


> NPE/AssertionFailure in newDomNode()
> ------------------------------------
>
>          Key: XMLBEANS-99
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-99
>      Project: XMLBeans
>         Type: Bug
>   Components: DOM
>     Versions: Version 1.0.3
>     Reporter: Kevin Krouse
>     Assignee: Jacob Danner
>     Priority: Critical
>  Attachments: WS-BaseFaults-1_2-Draft_03.xsd, inst.xml, schema.xsd, test.java
>
> See attached repro and run with assertions enabled.  Creating a .newDomNode() from the parsed instance throws a NPE when looking up a prefix for the namespace "http://dufourrault"
> Exception in thread "main" java.lang.AssertionError
>         at org.apache.xmlbeans.impl.store.Saver.getUriMapping(Saver.java:1188)
>         at org.apache.xmlbeans.impl.store.Saver$DomSaver.emitContainer(Saver.java:4525)
>         at org.apache.xmlbeans.impl.store.Saver.processContainer(Saver.java:788)
>         at org.apache.xmlbeans.impl.store.Saver.process(Saver.java:531)
>         at org.apache.xmlbeans.impl.store.Saver$DomSaver.exportDom(Saver.java:4474)
>         at org.apache.xmlbeans.impl.store.Cursor.newDomNode(Cursor.java:2954)
>         at org.apache.xmlbeans.impl.values.XmlObjectBase.newDomNode(XmlObjectBase.java:155)
>         at org.apache.xmlbeans.impl.values.XmlObjectBase.newDomNode(XmlObjectBase.java:152)
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org