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=12853>.
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=12853

ArrayIndexOutOfBoundsException caused by utils.bytecode

           Summary: ArrayIndexOutOfBoundsException caused by utils.bytecode
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Basic Architecture
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using one class to handle all requests (setService()) is being called for 
each SOAP call, then under stress (concurrent running clients), Axis RC1 
sometimes throws an ArrayIndexOutOfBoundsException. 

This is the stacktrace:
        at org.apache.axis.description.ServiceDesc.createOperationForMethod
(ServiceDesc.java:953)
        at org.apache.axis.description.ServiceDesc.createOperationsForName
(ServiceDesc.java:872)
        at org.apache.axis.description.ServiceDesc.getSyncedOperationsForName
(ServiceDesc.java:852)
        at 
org.apache.axis.description.ServiceDesc.loadServiceDescByIntrospectionRecursive
(ServiceDesc.java:720)
        at 
org.apache.axis.description.ServiceDesc.loadServiceDescByIntrospectionRecursive
(ServiceDesc.java:740)
        at 
org.apache.axis.description.ServiceDesc.loadServiceDescByIntrospection
(ServiceDesc.java:703)
        at org.apache.axis.providers.java.JavaProvider.initServiceDesc
(JavaProvider.java:548)
        at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc
(SOAPService.java:316)
        at org.apache.axis.MessageContext.setService(MessageContext.java:631)

In that snapshot situation paramTypes and paramNames have different lengths!

This is caused by unsynchronized access to global paramCache in 
org.apache.axis.utils.bytecode.ParamNameExtractor.getParameterNamesFromDebugInfo
(). Adding synchronized keyword to this method seems to do as a workaround, but 
is no "real" synchronization, of course.

BTW: paramNames array should be cached, too and not being rebuilt all the time 
by ParamReader.getParameterNames(), even if ParamReader is being cached.

Reply via email to