You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Prakash Sridharan <PS...@selectica.com> on 2002/10/16 13:02:56 UTC
Getting ArrayIndexOutOfBoundsException when using xsltc transform
er
Hi All,
I am using xalan-j version 2_4_D1. I am getting the following exception
when I do the transformation using xsltc.
java.lang.ArrayIndexOutOfBoundsException
at org.apache.xalan.xsltc.dom.DOMImpl.isElement(DOMImpl.java:213)
at org.apache.xalan.xsltc.dom.DOMImpl.lookupNamespace(DOMImpl.java:189)
at
org.apache.xalan.xsltc.dom.DOMAdapter.lookupNamespace(DOMAdapter.java:295)
at org.apache.xalan.xsltc.dom.MultiDOM.lookupNamespace(MultiDOM.java:461)
at GregorSamsa.MergeHeader()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at
org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.j
ava:540)
at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:6
22)
at
org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:1
93)
at
com.selectica.foundationservices.manager.CxServiceCommand.respond(CxServiceC
ommand.java:287)
at
com.selectica.foundationservices.manager.CxServiceCommand.respond(CxServiceC
ommand.java:177)
at
com.selectica.foundationservices.manager.CxServiceCommand.execute(CxServiceC
ommand.java:111)
at
com.selectica.server.framework.CxCommandExecutor.process(CxCommandExecutor.j
ava:338)
at
com.selectica.server.framework.CxCommandExecutorRunnable.run(CxCommandExecut
orRunnable.java:282)
at java.lang.Thread.run(Unknown Source)
SystemId Unknown; Line 9; Column 268; Can not load requested doc: The value
of attribute "TYPE" must begin with either a single or double quote
character.
org.apache.fop.apps.FOPException: The root element is required in a
well-formeddocument.
at org.apache.fop.apps.Driver.render(Driver.java:464)
at org.apache.fop.apps.Driver.run(Driver.java:542)
at
com.selectica.foundationservices.fop.CxFOPEngine.buildFO(CxFOPEngine.java:63
)
I searched it in the bug database and found that it is fixed in 2.2.0 (See
below). But I am still getting error. Can anybody tell the work around for
this?
Thank you,
Prakash
_____
Apache Bug Databese <http://nagoya.apache.org/bugzilla/feather.gif>
Bugzilla version 2.14.2
Full Text Bug Listing
<http://nagoya.apache.org/bugzilla/1x1.gif>
ArrayIndexOutOfBoundsException in
org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilder.characters()
Bug#: 6189 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6189>
Product: XalanJ2 Version: 2.2.0 Platform: All
OS/Version: All Status: RESOLVED Severity: Critical
Priority: Medium
Resolution: FIXED Assigned To: xalan-dev@xml.apache.org Reported By:
ms53@inf.tu-dresden.de
Component: org.apache.xalan.xsltc Target milestone:---
URL:
Summary: ArrayIndexOutOfBoundsException in
org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilder.characters()
Keywords:
Description:
Under certain circumstances the execution (calling method transform(DOMImpl,
TextOutput)) of compiled translets throws the exception above.
In both characters() methods
resizeTextArray(_text.length * 2);
should be replaced by:
resizeTextArray(Math.max(_text.length * 2,_currentOffset + length));
The exception is thrown because doubling the size of the _text array is not
enough.
Sorry for not providing a test case, but the exception is thrown after
compiling a stylesheet with a lot of includes and only if the transformation
is
executed with special parametervalues.
_____
Re: Getting ArrayIndexOutOfBoundsException when using xsltc transformer
Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
Full Text Bug ListingPrakash,
Can you reproduce this problem using the command-line interface? If so, could you attach an xsl/xml pair?
-- Santiago
----- Original Message -----
From: Prakash Sridharan
To: xalan-j-users@xml.apache.org
Sent: Wednesday, October 16, 2002 7:02 AM
Subject: Getting ArrayIndexOutOfBoundsException when using xsltc transformer
Hi All,
I am using xalan-j version 2_4_D1. I am getting the following exception when I do the transformation using xsltc.
java.lang.ArrayIndexOutOfBoundsException
at org.apache.xalan.xsltc.dom.DOMImpl.isElement(DOMImpl.java:213)
at org.apache.xalan.xsltc.dom.DOMImpl.lookupNamespace(DOMImpl.java:189)
at org.apache.xalan.xsltc.dom.DOMAdapter.lookupNamespace(DOMAdapter.java:295)
at org.apache.xalan.xsltc.dom.MultiDOM.lookupNamespace(MultiDOM.java:461)
at GregorSamsa.MergeHeader()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:540)
at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:622)
at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:193)
at com.selectica.foundationservices.manager.CxServiceCommand.respond(CxServiceCommand.java:287)
at com.selectica.foundationservices.manager.CxServiceCommand.respond(CxServiceCommand.java:177)
at com.selectica.foundationservices.manager.CxServiceCommand.execute(CxServiceCommand.java:111)
at com.selectica.server.framework.CxCommandExecutor.process(CxCommandExecutor.java:338)
at com.selectica.server.framework.CxCommandExecutorRunnable.run(CxCommandExecutorRunnable.java:282)
at java.lang.Thread.run(Unknown Source)
SystemId Unknown; Line 9; Column 268; Can not load requested doc: The value of attribute "TYPE" must begin with either a single or double quote character.
org.apache.fop.apps.FOPException: The root element is required in a well-formeddocument.
at org.apache.fop.apps.Driver.render(Driver.java:464)
at org.apache.fop.apps.Driver.run(Driver.java:542)
at com.selectica.foundationservices.fop.CxFOPEngine.buildFO(CxFOPEngine.java:63)
I searched it in the bug database and found that it is fixed in 2.2.0 (See below). But I am still getting error. Can anybody tell the work around for this?
Thank you,
Prakash
------------------------------------------------------------------------------
Bugzilla version 2.14.2
Full Text Bug Listing
ArrayIndexOutOfBoundsException in org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilder.characters()
Bug#: 6189 Product: XalanJ2 Version: 2.2.0 Platform: All
OS/Version: All Status: RESOLVED Severity: Critical Priority: Medium
Resolution: FIXED Assigned To: xalan-dev@xml.apache.org Reported By: ms53@inf.tu-dresden.de
Component: org.apache.xalan.xsltc Target milestone:---
URL:
Summary: ArrayIndexOutOfBoundsException in org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilder.characters()
Keywords:
Description:
Under certain circumstances the execution (calling method transform(DOMImpl,
TextOutput)) of compiled translets throws the exception above.
In both characters() methods
resizeTextArray(_text.length * 2);
should be replaced by:
resizeTextArray(Math.max(_text.length * 2,_currentOffset + length));
The exception is thrown because doubling the size of the _text array is not
enough.
Sorry for not providing a test case, but the exception is thrown after
compiling a stylesheet with a lot of includes and only if the transformation is
executed with special parametervalues.
------------------------------------------------------------------------------