Bug 10744 - Bindings Project -> JAR2XML Fails
Summary: Bindings Project -> JAR2XML Fails
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.6.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-02-27 14:41 UTC by Redth
Modified: 2013-02-28 07:13 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Skyhook api .jar (391.91 KB, application/octet-stream)
2013-02-27 14:41 UTC, Redth
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Redth 2013-02-27 14:41:46 UTC
Created attachment 3503 [details]
Skyhook api .jar

The API Analyzer (jar2xml) is failing on a particular jar file (which is attached).  Here's the build output:



Building: SkyHook.Xamdroid (Debug)

Build started 2/27/2013 2:40:44 PM.



__________________________________________________



Project "C:\Users\20363\Dropbox\Code\ArPresentation\SkyHook.Xamdroid\SkyHook.Xamdroid.csproj" (Build target(s)):







Target ResolveLibraryProjects:



  Skipping target "ResolveLibraryProjects" because it has no inputs.



Target _ResolveMonoAndroidSdks:



    MonoAndroid Tools: C:\Program Files (x86)\MSBuild\Xamarin\Android\



    MonoAndroid Framework: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\



    Android SDK: C:\Program Files (x86)\Android\android-sdk\



    Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_31\



Target ExportJarToXml:



      Assemblies: 



        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll



        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll



        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll



        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll



      Jars: 



      ResolvedResourceDirectories: 



      SourceJars:



        Jars\wpsapi.jar



      ReferenceJars:



    C:\Program Files (x86)\Java\jdk1.6.0_31\bin\java.exe -jar "C:\Program Files (x86)\MSBuild\Xamarin\Android\jar2xml.jar" --jar=C:\Users\20363\Dropbox\Code\ArPresentation\SkyHook.Xamdroid\Jars\wpsapi.jar --ref="C:\Program Files (x86)\Android\android-sdk\platforms\android-8\android.jar" --out=C:\Users\20363\Dropbox\Code\ArPresentation\SkyHook.Xamdroid\obj\Debug\api.xml 



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkbb._sdka   class com.skyhookwireless._sdkab ----- int



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkcb._sdka   class com.skyhookwireless._sdkab ----- long



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkgb._sdka   int ----- class com.skyhookwireless._sdkab



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkhd._sdkd   void ----- class java.lang.String



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkhd._sdke   boolean ----- void



    JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdknd._sdka   boolean ----- class java.lang.String



    java.lang.NullPointerException



    	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.toString(WildcardTypeImpl.java:191)



    	at jar2xml.JavaClass.getGenericTypeName(JavaClass.java:794)



    	at jar2xml.JavaClass.getGenericTypeName(JavaClass.java:787)



    	at jar2xml.JavaClass.appendParameters(JavaClass.java:113)



    	at jar2xml.JavaClass.doAppendCtor(JavaClass.java:149)



    	at jar2xml.JavaClass.appendCtor(JavaClass.java:130)



    	at jar2xml.JavaClass.doAppendToDocument(JavaClass.java:613)



    	at jar2xml.JavaClass.appendToDocument(JavaClass.java:544)



    	at jar2xml.JavaPackage.appendToDocument(JavaPackage.java:72)



    	at jar2xml.Start.main(Start.java:115)



    JARTOXML : error J2X0002: API analyzer failed with java exception. See verbose output for details.



Done building target "ExportJarToXml" in project "SkyHook.Xamdroid.csproj" -- FAILED.







Done building project "SkyHook.Xamdroid.csproj" -- FAILED.







Build FAILED.







JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkbb._sdka   class com.skyhookwireless._sdkab ----- int



JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkcb._sdka   class com.skyhookwireless._sdkab ----- long



JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkgb._sdka   int ----- class com.skyhookwireless._sdkab



JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkhd._sdkd   void ----- class java.lang.String



JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdkhd._sdke   boolean ----- void



JARTOXML : warning J2XA007: method collision: com.skyhookwireless._sdknd._sdka   boolean ----- class java.lang.String



JARTOXML : error J2X0002: API analyzer failed with java exception. See verbose output for details.



    6 Warning(s)



    1 Error(s)







Time Elapsed 00:00:00.30





---------------------- Done ----------------------


Build: 1 error, 6 warnings
Comment 1 Atsushi Eno 2013-02-28 07:13:13 UTC
Looks like Oracle Java has another crasher that is caused by mere Type.toString() invocation. In general we cannot predict their framework level bugs.

I made some changes in our API analyzer so that the analyzer itself does not crash for this specific case (exception while attempt to get type name in this condition). It will be available in the next non-minor release.

After the fix it will build with this metadata fixup:

<metadata>
  <remove-node path="/api/package/class[starts-with(@name, '_sdk')]" />
  <remove-node path="/api/package/interface[starts-with(@name, '_sdk')]" />
  <attr path="/api/package/class[@name='WPSGeoFence.Handle']" name="managedName">WPSGeoFence.HandleClass</attr>
  <attr path="/api/package[@name='com.skyhookwireless.wps']/class[@name='WPSGeoFence']/method[@name='getType']" name="managedName">GetGeoFenceType</attr>
</metadata>