You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Tomas Kulhanek <to...@st.ms.mff.cuni.cz> on 2002/03/12 20:10:17 UTC

IndexOutOfBounds Exception when element larger then 250

Hi all,
If I try to add document to the collection, where is the content of at 
least one element larger then cca 250 characters, the server writes 
an IndexOutOfBoundsException. But the added large element is 
present in DB, looking through Xindice Browser. The added 
document has about 17kB. Is this bug or limitation of Xindice DB. I 
tried the same at another DB:XML databases (eXist) and it accepts 
this document without any exception.

Regards 
Tomas Kulhanek


Re: IndexOutOfBounds Exception when element larger then 250

Posted by Tomas Kulhanek <tk...@barbora.ms.mff.cuni.cz>.
> Sounds like a bug to me. Can you find a stack trace for this 
> exception 

I tried get the Exception with last xindice on CVS,
the stacktrace is:
S 64;0;22S 64;-6325;44DEBUG>
java.lang.IndexOutOfBoundsException
        at java.io.ByteArrayInputStream.read(Unknown Source)
        at 
org.apache.xindice.core.filer.Paged$Page.streamFrom(Paged.java:1
001)
        at 
org.apache.xindice.core.filer.Paged.writeValue(Paged.java:198)
        at 
org.apache.xindice.core.filer.BTreeFiler.writeRecord(BTreeFiler.java:
173)
        at 
org.apache.xindice.core.Collection.putDocument(Collection.java:629
)
        at 
org.apache.xindice.core.Collection.setDocument(Collection.java:670
)
        at 
org.apache.xindice.core.Database.setConfig(Database.java:192)
        at 
org.apache.xindice.server.services.XindiceService.initialize(XindiceS
ervice.java:106)
        at 
org.apache.xindice.server.standard.StdServiceManager.addService(
StdSe
rviceManager.java:166)
        at 
org.apache.xindice.server.standard.StdServiceManager$1.process(
StdSer
viceManager.java:104)
        at 
org.apache.xindice.util.Configuration.processChildren(Configuration.j
ava:684)
        at 
org.apache.xindice.server.standard.StdServiceManager.setConfig(St
dSer
viceManager.java:90)
        at org.apache.xindice.server.Kernel.loadAPI(Kernel.java:336)
        at org.apache.xindice.server.Kernel.<init>(Kernel.java:150)
        at org.apache.xindice.server.Kernel.<init>(Kernel.java:117)
        at org.apache.xindice.server.Xindice.main(Xindice.java:96)
Script: 'GET' added to script storage

I get the called parameters for the method, which produces the 
Exception in 
org.apache.xindice.core.filer.Paged$Page.streamFrom(Paged.java:1
001): ByteArrayInputStream.read(data, 64 - 6325, 44), 
where keyPos=64, header.keyLen=-6325, which is may be wrong 
and header.dataLen=44.

Tomas


Re: IndexOutOfBounds Exception when element larger then 250

Posted by Mike Gratton <mi...@vee.net>.

Tomas Kulhanek wrote:
> Is this bug or limitation of Xindice DB. I 
> tried the same at another DB:XML databases (eXist) and it accepts 
> this document without any exception.

Sounds like a bug to me. Can you find a stack trace for this exception 
and post it to the list? Even better, can you try reproducing the 
problem with the latest Xindice code built from CVS? That way you'll get 
a stack trace which contains line numbers, which would be very helpful.

Mike.

-- 
Mike Gratton <mi...@vee.net>, <http://web.vee.net/>
"Every motive escalate."