You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/10 15:19:32 UTC
DO NOT REPLY [Bug 12478] New: -
ArrayIndexOutOfBoundsException in ParamReader
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12478>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12478
ArrayIndexOutOfBoundsException in ParamReader
Summary: ArrayIndexOutOfBoundsException in ParamReader
Product: Axis
Version: current (nightly)
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Blocker
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@xml.apache.org
ReportedBy: thomas@boerkel.de
New problem in RC1, this was OK in Beta3:
If you compile your web service class with -g (full debug info), then
ParamReader may get an ArrayIndexOutOfBoundsException (Axis 1.0 RC1).
Cause: The table length (line 183 in ParamReader.java) is one too big and so
ParamReader reads not only the parameter variables, but also one of the local
variables, which has a totally different index and so the reserved array is too
small.
I don't know why the table length is wrong. I have tried to compile with JDK
1.3.1, 1.4.0_01 and 1.4.1-RC: All the same. Either there is a bug in all JDKs
or ParamReader makes a wrong assumption about this table and its connection to
the number of parameters.
The problem method source code:
public static void main(String[] args) throws P2Exception
{
Connection conn, conn1, conn2;
Recordset rs, rs2, rs3, rs4, rs5;
String sql;
Date d1, d2;
Table table;
int i;
Here the table length is 2, if the class is compiled with -g, otherwise it's 1.
And so ParamReader not only reads args (index = 0), but also table (index =
12), but the array for the parameter variables has a size of 4 (normally 2,
because it's table length multiplied by 2).
I cannot provide a small repro, because it's happening only with one specific
source file at the moment.
I could provide the problem class, but it only compiles or loads if all our
classes and JAR files are available.