From java-dev-return-97121-archive-asf-public=cust-asf.ponee.io@axis.apache.org Tue Mar 12 07:34:07 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9CEDB180600 for ; Tue, 12 Mar 2019 08:34:06 +0100 (CET) Received: (qmail 46706 invoked by uid 500); 12 Mar 2019 07:34:04 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 46697 invoked by uid 99); 12 Mar 2019 07:34:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2019 07:34:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8BF01C6566 for ; Tue, 12 Mar 2019 07:34:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id HZBIaz4zACeM for ; Tue, 12 Mar 2019 07:34:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 56B016116D for ; Tue, 12 Mar 2019 07:34:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6AF01E070A for ; Tue, 12 Mar 2019 07:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1EC56257FF for ; Tue, 12 Mar 2019 07:34:00 +0000 (UTC) Date: Tue, 12 Mar 2019 07:34:00 +0000 (UTC) From: "Yiman Wang (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AXIS2-5426) ArrayIndexOutOfBoundsException in BeanUtil.deserialize() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-5426?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1679= 0316#comment-16790316 ]=20 Yiman Wang commented on AXIS2-5426: ----------------------------------- Hi, I am also facing the same issue using Axis2-1.7.6,CXF. Did you resolve = this issue? > ArrayIndexOutOfBoundsException in BeanUtil.deserialize() > -------------------------------------------------------- > > Key: AXIS2-5426 > URL: https://issues.apache.org/jira/browse/AXIS2-5426 > Project: Axis2 > Issue Type: Bug > Components: adb > Affects Versions: 1.6.2 > Reporter: Robert J=C3=A4schke > Priority: Major > Labels: ArrayIndexOutOfBoundsException > > Using Axis2 I have created Java stubs for the Amazon Mechanical Turk WSDL= and implemented the server and client side. Now upon receiving a SOAP mess= age, I get an ArrayIndexOutOfBoundsException on the server side: > [2012-09-19 17:26:32,907] [DEBUG] [org.apache.axis2.client.Options] - set= Action Old action is (null) > [2012-09-19 17:26:32,907] [DEBUG] [org.apache.axis2.client.Options] - set= Action New action is (urn:createHITResponse) > [2012-09-19 17:26:32,907] [DEBUG] [org.apache.axis2.context.Configuration= Context] - OnDemandLogger initialized for class org.apache.axis2.context.Co= nfigurationContext is:org.apache.commons.logging.impl.Log4JLogger@1e34f445 > [2012-09-19 17:26:32,907] [DEBUG] [org.apache.axis2.context.Configuration= Context] - messageID is null. > [2012-09-19 17:29:17,286] [ERROR] [org.apache.axis2.rpc.receivers.RPCMess= ageReceiver] - 1 > java.lang.ArrayIndexOutOfBoundsException: 1 > =09at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.ja= va:630) > =09at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:= 153) > =09at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.j= ava:206) > =09at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLog= ic(RPCMessageReceiver.java:117) > =09at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusin= essLogic(AbstractInOutMessageReceiver.java:40) > =09at org.apache.axis2.receivers.AbstractMessageReceiver.receive(Abstract= MessageReceiver.java:114) > =09at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) > =09at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostR= equest(HTTPTransportUtils.java:172) > =09at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java= :146) > =09at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) > [...] > This happens at this code position in BeanUtil.deserialize(): > while ((parameterNames !=3D null) && > (!omElement.getQName().getLocalPart().startsWith("arg"= )) && > (!omElement.getQName().getLocalPart().startsWith("item= ")) && > !omElement.getQName().getLocalPart().equals(parameterN= ames[count])) { > // POJO handles OMElement in a differnt way so need this = check for OMElement > Class paramClassType =3D (Class) javaTypes[count]; > if (!paramClassType.getName().equals(OMElement.class.getN= ame())) { > count++; > } else { > break; > } > } > The access to parameterNames[count] in the while loop is causing the Arra= yIndexOutOfBoundsException because count is increased beyond the array's si= ze in the following if statement. In my case the value of paramClassType is= "com.amazonaws.mturk.requester.doc._2012_03_25.CreateHIT" and not "org.apa= che.axiom.om.OMElement" and hence the check fails. > Is this an error in Axis2 or am I doing something wrong? Actually, I have= not modified the generated code (it's automatically re-generated by Maven = anyway) so I would expect that I can't do anything wrong to this respect. > (To be honest, I had to change something: I am doing > client._getServiceClient().getOptions().setProperty(org.apache.axis2.Cons= tants.Configuration.DISABLE_SOAP_ACTION, org.apache.axis2.Constants.VALUE_T= RUE); > because otherwise the client sends a SOAPAction HTTP header with the valu= e "http://soap.amazon.com/" which causes the server not to find the action.= My setup is "weird" in the sense that I am not just programming the client= that shall work against Amazon Mechanical Turk but I have also implemented= the server side myself and thus I am using http://localhost:4321/axis/serv= ices/amt as endpoint and not amazon.com.) -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org