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 "Brett Walker (Created) (JIRA)" <ji...@apache.org> on 2011/11/22 00:53:40 UTC

[jira] [Created] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Throwing ArrayStoreException on construction of URI List
--------------------------------------------------------

                 Key: AXIS2-5190
                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
             Project: Axis2
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.6.1
         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
            Reporter: Brett Walker
            Priority: Critical


This stacktrace is generated on the client side when constructing Java classes by parsing xml data

org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
  at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
  at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
  at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
  .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
Caused by: java.lang.ArrayStoreException 
  at java.lang.System.arraycopy(Native Method) 
  at java.util.ArrayList.toArray(ArrayList.java:306) 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
  ... 27 more 

The section of code that creates the Java classes follows:

757        StringReader in = new StringReader( xmlString ); 
758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
759 
760        try 
761        { 
762          ManageContentRequest.Factory.parse( reader ); 
763        } 
764        catch ( Exception e ) 
765        { 
766          this.log.error( xmlString ); 
767          this.log.info( e.getLocalizedMessage(), e ); 
768          e.printStackTrace(); 
769        } 

The portion of the Java-Axis2 class that is involved in the stacktrace is 

      java.util.ArrayList list25 = new java.util.ArrayList();

      // Process the array and step past its final element's end.
      list25.add(reader.getElementText());

      //loop until we find a start element that is not part of this array
      boolean loopDone25 = false;

      while(!loopDone25){
        // Ensure we are at the EndElement
        while (!reader.isEndElement()){
          reader.next();
        }

        // Step out of this element
        reader.next();

        // Step to next element event.
        while (!reader.isStartElement() && !reader.isEndElement())
          reader.next();

        if (reader.isEndElement()){
          //two continuous end elements means we are exiting the xml structure
          loopDone25 = true;
        } else {
          if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
            list25.add(reader.getElementText());
          }else{
            loopDone25 = true;
          }
        }
      }

          // call the converter utility  to convert and set the array
      object.setURL((org.apache.axis2.databinding.types.URI[])
3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
          org.apache.axis2.databinding.types.URI.class,list25));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13158117#comment-13158117 ] 

Brett Walker commented on AXIS2-5190:
-------------------------------------

Hi Sangara,

This exception is occuring on client-side. I have attached the relevant WSDL and the associated XSD in the wsdl.zip attachment as you have requested.

Given the xml string contained in the request.xml attachment I performed the following actions

  StringReader in = new StringReader( xmlString );
  XMLStreamReader reader = StAXUtils.createXMLStreamReader( in );

  try
  {
    ManageContentRequest.Factory.parse( reader );
  }
  catch ( Exception e )
  {
    this.log.error( xmlString );
    this.log.info( e.getLocalizedMessage(), e );
    e.printStackTrace();
  }

The xmlString is a string; it is not read from a file. The production of the xmlString is beyond my immediate control as it is produced by another system. I take this xmlString and perfom a web service request. I have not got to the stage of making the request as I have yet to obtain a valid ManageContentRequest object from the parse method of the Factory object.

The stacktrace in the original description occurs when I try to parse the XML string. The XML String is faulty as I latter discovered. The URL about 1/3 of the way into the string is invalid. A MalformedURLException is the root cause of the stacktrace but this is obfuscated but the ArrayStoreException being thrown.

See my original comment about the issue. Better error handling is needed IMHO.

Hope this clarifies the situation.

Brett
                
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Minor
>         Attachments: request.xml, service.xsd, wsdl.zip
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154799#comment-13154799 ] 

Brett Walker commented on AXIS2-5190:
-------------------------------------

I have since found the root cause of this issue. It is related to a bad URI. But the structure of the following method hid the root cause:

    /**
     * @param returnArray
     * @param baseArrayClass
     * @param objectList
     */
    private static void ConvertToArbitraryObjectArray(Object returnArray,
                                                      Class baseArrayClass,
                                                      List objectList) {
        if (!(ADBBean.class.isAssignableFrom(baseArrayClass))) {
            try {
                for (int i = 0; i < objectList.size(); i++) {
                    Object o = objectList.get(i);
                    if (o == null) {
                        // if the string is null the object value must be null
                        Array.set(returnArray, i, null);
                    } else {
                        Array.set(returnArray, i, getObjectForClass(
                                baseArrayClass,
                                o.toString()));
                    }

                }
                return;
            } catch (Exception e) {
                //oops! - this cannot be converted fall through and
                //try the other alternative
            }
        }

        try {
            objectList.toArray((Object[])returnArray);
        } catch (Exception e) {
            //we are over with alternatives - throw the
            //converison exception
            throw new ObjectConversionException(e);
        }
    }

A MalformedURIException was being throw in the top half of the method resulting in the bottom half being executed. This threw the ArrayStoreException. By ignoring the exception I was unaware of the root cause. No attempt was made to log the error. If a warning message appeared in the log that would have been very helpful. I have wasted almost a day in debugging this problem.
                
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Critical
>         Attachments: request.xml, service.xsd
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Walker updated AXIS2-5190:
--------------------------------

    Priority: Minor  (was: Critical)
    
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Minor
>         Attachments: request.xml, service.xsd
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Walker updated AXIS2-5190:
--------------------------------

    Description: 
This stacktrace is generated on the client side when constructing Java classes by parsing xml data

org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
  at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
  at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
  at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
  .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
Caused by: java.lang.ArrayStoreException 
  at java.lang.System.arraycopy(Native Method) 
  at java.util.ArrayList.toArray(ArrayList.java:306) 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
  ... 27 more 

The section of code that creates the Java classes follows:

757        StringReader in = new StringReader( xmlString ); 
758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
759 
760        try 
761        { 
762          ManageContentRequest.Factory.parse( reader ); 
763        } 
764        catch ( Exception e ) 
765        { 
766          this.log.error( xmlString ); 
767          this.log.info( e.getLocalizedMessage(), e ); 
768          e.printStackTrace(); 
769        } 

The portion of the Java-Axis2 class that is involved in the stacktrace is 

      java.util.ArrayList list25 = new java.util.ArrayList();

      // Process the array and step past its final element's end.
      list25.add(reader.getElementText());

      //loop until we find a start element that is not part of this array
      boolean loopDone25 = false;

      while(!loopDone25){
        // Ensure we are at the EndElement
        while (!reader.isEndElement()){
          reader.next();
        }

        // Step out of this element
        reader.next();

        // Step to next element event.
        while (!reader.isStartElement() && !reader.isEndElement())
          reader.next();

        if (reader.isEndElement()){
          //two continuous end elements means we are exiting the xml structure
          loopDone25 = true;
        } else {
          if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
            list25.add(reader.getElementText());
          }else{
            loopDone25 = true;
          }
        }
      }

          // call the converter utility  to convert and set the array
      object.setURL((org.apache.axis2.databinding.types.URI[])
3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
          org.apache.axis2.databinding.types.URI.class,list25));

See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

  was:
This stacktrace is generated on the client side when constructing Java classes by parsing xml data

org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
  at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
  at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
  at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
  at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
  .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
Caused by: java.lang.ArrayStoreException 
  at java.lang.System.arraycopy(Native Method) 
  at java.util.ArrayList.toArray(ArrayList.java:306) 
  at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
  ... 27 more 

The section of code that creates the Java classes follows:

757        StringReader in = new StringReader( xmlString ); 
758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
759 
760        try 
761        { 
762          ManageContentRequest.Factory.parse( reader ); 
763        } 
764        catch ( Exception e ) 
765        { 
766          this.log.error( xmlString ); 
767          this.log.info( e.getLocalizedMessage(), e ); 
768          e.printStackTrace(); 
769        } 

The portion of the Java-Axis2 class that is involved in the stacktrace is 

      java.util.ArrayList list25 = new java.util.ArrayList();

      // Process the array and step past its final element's end.
      list25.add(reader.getElementText());

      //loop until we find a start element that is not part of this array
      boolean loopDone25 = false;

      while(!loopDone25){
        // Ensure we are at the EndElement
        while (!reader.isEndElement()){
          reader.next();
        }

        // Step out of this element
        reader.next();

        // Step to next element event.
        while (!reader.isStartElement() && !reader.isEndElement())
          reader.next();

        if (reader.isEndElement()){
          //two continuous end elements means we are exiting the xml structure
          loopDone25 = true;
        } else {
          if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
            list25.add(reader.getElementText());
          }else{
            loopDone25 = true;
          }
        }
      }

          // call the converter utility  to convert and set the array
      object.setURL((org.apache.axis2.databinding.types.URI[])
3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
          org.apache.axis2.databinding.types.URI.class,list25));

    
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Critical
>         Attachments: request.xml, service.xsd
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Walker updated AXIS2-5190:
--------------------------------

    Attachment: service.xsd
                request.xml
    
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Critical
>         Attachments: request.xml, service.xsd
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Scott Pelton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468713#comment-13468713 ] 

Scott Pelton commented on AXIS2-5190:
-------------------------------------

For what it may be worth to anyone:

It seems this problem is analogous (and may have been related) to an ArrayStoreException problem I came across when processing a schema list (see stack trace below). I had this ArrayStoreException issue in 1.5.4 but did not have it when I moved to 1.6.2.


 Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
     [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
     [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
     [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
     [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
     [java] 	... 2 more
     [java] Caused by: java.lang.reflect.InvocationTargetException
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     [java] 	at java.lang.reflect.Method.invoke(Unknown Source)
     [java] 	at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
     [java] 	... 3 more
     [java] Caused by: java.lang.RuntimeException: java.lang.ArrayStoreException
     [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
     [java] 	... 8 more
     [java] Caused by: java.lang.ArrayStoreException
     [java] 	at java.lang.System.arraycopy(Native Method)
     [java] 	at java.util.ArrayList.toArray(Unknown Source)
     [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.convertToSchemaArray(CodeGenerationUtility.java:562)
     [java] 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
     [java] 	... 8 more
                
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Minor
>         Attachments: request.xml, service.xsd, wsdl.zip
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156529#comment-13156529 ] 

Sagara Gunathunga  commented on AXIS2-5190:
-------------------------------------------

Is this exception occur in server side or client side ? Please attach WSDL if this is on client side or if you use contract first in server side ? 

Also I'm not clear about each steps you follows, better if you can describe in step by step ?   
                
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Minor
>         Attachments: request.xml, service.xsd
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5190) Throwing ArrayStoreException on construction of URI List

Posted by "Brett Walker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Walker updated AXIS2-5190:
--------------------------------

    Attachment: wsdl.zip
    
> Throwing ArrayStoreException on construction of URI List
> --------------------------------------------------------
>
>                 Key: AXIS2-5190
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5190
>             Project: Axis2
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.6.1
>         Environment: Windows 7, 64-bit; Java 1.6.0_24; Tomcat 7.0.8
>            Reporter: Brett Walker
>            Priority: Minor
>         Attachments: request.xml, service.xsd, wsdl.zip
>
>
> This stacktrace is generated on the client side when constructing Java classes by parsing xml data
> org.apache.axis2.databinding.utils.ConverterUtil$ObjectConversionException: java.lang.ArrayStoreException 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1211) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:1172) 
>   at au.gov.business.ablis._2011_09.data.ServiceType$Factory.parse(ServiceType.java:3864) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItemChoice_type0$Factory.parse(RequestItemChoice_type0.java:1202) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.RequestItem_type0$Factory.parse(RequestItem_type0.java:463) 
>   at au.gov.business.ablis._2011_09.messages.contentmanagement.ManageContentRequest$Factory.parse(ManageContentRequest.java:544) 
>   at com.geometryit.blis.production.Publish.publishLicenceUsingWebService(Publish.java:762) 
>   .. 21  more (mainly tomcat portion of stacktrace, excluded for brevity)
> Caused by: java.lang.ArrayStoreException 
>   at java.lang.System.arraycopy(Native Method) 
>   at java.util.ArrayList.toArray(ArrayList.java:306) 
>   at org.apache.axis2.databinding.utils.ConverterUtil.ConvertToArbitraryObjectArray(ConverterUtil.java:1207) 
>   ... 27 more 
> The section of code that creates the Java classes follows:
> 757        StringReader in = new StringReader( xmlString ); 
> 758        XMLStreamReader reader = StAXUtils.createXMLStreamReader( in ); 
> 759 
> 760        try 
> 761        { 
> 762          ManageContentRequest.Factory.parse( reader ); 
> 763        } 
> 764        catch ( Exception e ) 
> 765        { 
> 766          this.log.error( xmlString ); 
> 767          this.log.info( e.getLocalizedMessage(), e ); 
> 768          e.printStackTrace(); 
> 769        } 
> The portion of the Java-Axis2 class that is involved in the stacktrace is 
>       java.util.ArrayList list25 = new java.util.ArrayList();
>       // Process the array and step past its final element's end.
>       list25.add(reader.getElementText());
>       //loop until we find a start element that is not part of this array
>       boolean loopDone25 = false;
>       while(!loopDone25){
>         // Ensure we are at the EndElement
>         while (!reader.isEndElement()){
>           reader.next();
>         }
>         // Step out of this element
>         reader.next();
>         // Step to next element event.
>         while (!reader.isStartElement() && !reader.isEndElement())
>           reader.next();
>         if (reader.isEndElement()){
>           //two continuous end elements means we are exiting the xml structure
>           loopDone25 = true;
>         } else {
>           if (new javax.xml.namespace.QName("http://ablis.business.gov.au/2011-09/Data","URL").equals(reader.getName())){
>             list25.add(reader.getElementText());
>           }else{
>             loopDone25 = true;
>           }
>         }
>       }
>           // call the converter utility  to convert and set the array
>       object.setURL((org.apache.axis2.databinding.types.URI[])
> 3864    org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
>           org.apache.axis2.databinding.types.URI.class,list25));
> See the attachments for the relevant xml string and the relevant xsd. These are not complete files but snippets. More detailed information can be provided if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org