Hi,
I'm using VDT XML in production environment without problems since i discovered this issue.
In the main process, i get some elements offset and length without troubleshooting but when i want to get content offset and lenght VDT throws me a IndexOutOfBoundsException.
Below the stack :
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 131782
at com.ximpleware.extended.XMLBuffer.byteAt(XMLBuffer.java:101)
at com.ximpleware.extended.VTDNavHuge.getCharUnit(VTDNavHuge.java:876)
at com.ximpleware.extended.VTDNavHuge.getOffsetAfterHead(VTDNavHuge.java:956)
at com.ximpleware.extended.VTDNavHuge.getContentFragment(VTDNavHuge.java:3955)
at fr.gouv.finances.dgfip.exomile.test.TestVTDIndexOutOfBoundException.main(TestVTDIndexOutOfBoundException.java:30)
I debug it and the issue seems to be in computing offset, i think VDT doesn't detect the closing tag and exceed the end of file... But i don't understand why i can get element offset and length without exception but not when i want to get inner content ? Maybe the problem relate to encoding...
I join to my message a java test file and XML data.
I try and reproduce this issue in 2.11 and 2.13.
Thanks
Thanks! will look into it and get back
This bug is caused by an bug that was fixed in standard edition but not in the extended version... the bug is now fixed and you can download it by getting the latest VTDNavHuge.java.
Are you sure this bug was fixed in extended version? I checkout sources and there is no modification since 6 months... I clone VTD XML repository at https://github.com/jzhang2004/vtd-xml.git. Is it right ?
Actually I am referencing to the CVS repo on sourceforge
http://vtd-xml.cvs.sourceforge.net/viewvc/vtd-xml/ximple-dev/com/ximpleware/extended/VTDNavHuge.java?view=log
----- Original Message -----
From: "[vtd-xml:tickets] "
To:"[vtd-xml:tickets]"
Cc:
Sent:Wed, 02 Nov 2016 16:54:25 +0000
Subject:[vtd-xml:tickets] #8 ArrayIndexOutOfBoundsException with
getContentFragment
sources and there is no modification since 6 months... I clone VTD XML
repository at https://github.com/jzhang2004/vtd-xml.git. [1] Is it
right ?
GETCONTENTFRAGMENT
MILESTONE: 1.0
LABELS: fixed
CREATED: Thu Oct 20, 2016 01:36 PM UTC by Rainette
LAST UPDATED: Fri Oct 28, 2016 10:13 PM UTC
OWNER: jimmy zhang
ATTACHMENTS:
discovered this issue.
In the main process, i get some elements offset and length without
troubleshooting but when i want to get content offset and lenght VDT
throws me a IndexOutOfBoundsException.
Below the stack :
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
131782
at com.ximpleware.extended.XMLBuffer.byteAt(XMLBuffer.java:101)
at
com.ximpleware.extended.VTDNavHuge.getCharUnit(VTDNavHuge.java:876)
at
com.ximpleware.extended.VTDNavHuge.getOffsetAfterHead(VTDNavHuge.java:956)
at
com.ximpleware.extended.VTDNavHuge.getContentFragment(VTDNavHuge.java:3955)
at
fr.gouv.finances.dgfip.exomile.test.TestVTDIndexOutOfBoundException.main(TestVTDIndexOutOfBoundException.java:30)
doesn't detect the closing tag and exceed the end of file... But i
don't understand why i can get element offset and length without
exception but not when i want to get inner content ? Maybe the problem
relate to encoding...
I try and reproduce this issue in 2.11 and 2.13.
https://sourceforge.net/p/vtd-xml/tickets/8/ [4]
https://sourceforge.net/auth/subscriptions/ [5]
Links:
[1] https://github.com/jzhang2004/vtd-xml.git.
[2]
http://sitemail.hostway.com/HTTPS://SOURCEFORGE.NET/P/VTD-XML/TICKETS/8/
[3] https://sourceforge.net/p/vtd-xml/tickets/8/attachment/test.zip
[4] https://sourceforge.net/p/vtd-xml/tickets/8/
[5] https://sourceforge.net/auth/subscriptions/