Re: Compiler error in TestAnyType*Helper.java in Eclipse

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Compiler error in TestAnyType*Helper.java in Eclipse

Andreas Veithen-2
Note that these classes are excluded from the compilation in the Maven
build (presumably because the generated code is faulty):

https://github.com/apache/axis2-java/blob/f68d3dfe0d8123a7eef8a0dd986e447463d681f9/modules/adb-tests/pom.xml#L480

maven-eclipse-plugin doesn't recognize that.

Also note that maven-eclipse-plugin is now considered deprecated in
favor of m2e (although in some respects maven-eclipse-plugin still
works better on the Axis2 code).

Andreas

On Wed, Aug 30, 2017 at 9:54 AM, Thorsten Schöning
<[hidden email]> wrote:

> Hi,
>
> I've checked out trunk and ran the following to get an Eclipse setup:
>
>> mvn -DskipTests=true install eclipse:eclipse
>
> I get lots of projects and stuff and the project "axis2-adb-test" shows
> the following error in the following files:
>
>> The method serialize(XMLStreamWriter) is undefined for the type Object
>
>> target\generated-test-sources\xsd2java\helper\org\apache\axis2\schema\testsuite\TestAnyType*Helper.java
>
>>      if (typedBean.localTestValue != null) {
>>        for (int i = 0; i < typedBean.localTestValue.length; i++) {
>>          if (typedBean.localTestValue[i] != null) {
>>            // write null attribute
>>            writeStartElement(
>>                null, "http://apache.org/axis2/schema/testsuite", "testValue", xmlWriter);
>>            typedBean.localTestValue[i].serialize(xmlWriter);
>>            xmlWriter.writeEndElement();
>>          } else {
>
> The files TestAnyType* contain the following relevant code:
>
>>   /** field for TestValue This was an Array! */
>>   protected java.lang.Object[] localTestValue;
>
> So the error seems to be correct and Eclipse suggests to fix it by
> using a CAST to some other types, like "OMSerializable" or such. I've
> attached a screenshot.
>
> But what should be the correct result after Maven ran? Is
> java.lang.Object only a fallback because of a problem somewhere else I
> need to look at or should it really be java.lang.Object? And if so,
> how is that supposed to compile? I have one successful run of "mvn
> clean && mvn install" on the shell currently.
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: [hidden email]
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]