If you think you have the namespace declared either in the binding definition or in the DOM itself you can step through the code in DomMapperBase.marshalElement prior to the exception where I'm trying to find all the added namespaces. If it's declared in the binding definition the call to findNamespaceIndex(prefix, uri); is supposed to find it; otherwise, if it's an attribute of the DOM Element the loop the follows should find it.
This should really give a better error message - feel free to add a low-priority enhancement request to the Jira just for the error message alone.
- Dennis
Tilman Linden wrote:
hi,
i wanted to use the DomElementMapper provided in the extras package. unfortunately, i always get an ArrayIndexOutOfBoundException when marshalling an Element... Seems to have something to do with namespace indices, but could not figure out any details...
i am using jibx beta3c now. any explanations / fixes / workarounds would be appreciated!
greetings,
tilman
java.lang.ArrayIndexOutOfBoundsException: -1 at org.jibx.runtime.impl.StreamWriterBase.writePrefix(StreamWriterBase.java:242) at org.jibx.runtime.impl.XMLWriterBase.startTagOpen(XMLWriterBase.java:191) at org.jibx.extras.DomMapperBase.marshalElement(DomMapperBase.java:235) at org.jibx.extras.DomElementMapper.marshal(DomElementMapper.java:129) at de.fhrg.jobhandler.GridResource.JiBX_GridJobBinding_marshal_1_0(GridResource.java) at de.fhrg.jobhandler.JiBX_MungeAdapter.JiBX_GridJobBinding_marshal_1_0() at de.fhrg.jobhandler.GJobDLDocument.JiBX_GridJobBinding_marshal_1_0(GJobDLDocument.java) at de.fhrg.jobhandler.GJobDLGridJob.JiBX_GridJobBinding_marshal_3_0(GJobDLGridJob.java) at de.fhrg.jobhandler.JiBX_GridJobBindingGJobDLGridJob_access.marshal() at de.fhrg.jobhandler.GJobDLGridJob.marshal(GJobDLGridJob.java) at org.jibx.runtime.impl.MarshallingContext.marshalRoot(MarshallingContext.java:919) at org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:967) at de.fhrg.jobhandler.persistence.jibx.JiBX_GJobDLWriter.store(JiBX_GJobDLWriter.java:77) at de.fhrg.jobhandler.persistence.GJobDLWriter.propertyChange(GJobDLWriter.java:70) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:299) at de.fhrg.jobhandler.GJobDLGridJob.run(GJobDLGridJob.java:265)
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-- Dennis M. Sosnoski Enterprise Java, XML, and Web Services Training and Consulting http://www.sosnoski.com Redmond, WA 425.885.7197
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
