Error Message
When running the wsdl2java command from the Glue 5.x toolkit, an error occurs that begins with the following lines:
"java.lang.NullPointerException
at java.lang.reflect.Array.newArray(Native Method)
at java.lang.reflect.Array.newInstance(Array.java:52)
..."
Cause
Repeatedly running the WSDL2JAVA command for more than one Web service and using the same output directory may cause this error. When more than one Web service uses the same object type Glue cannot resolve the common objects unless the previous .JAVA files have been compiled.
Solution or Workaround
Solve this problem by either compiling the .JAVA files to get .CLASS files or move the .MAP files to a different location.
- Run the wsdl2java command for one of the ArcWeb Services you are using. Example:
wsdl2java http://www.arcwebservices.com/services/v2006_1/glue/PlaceFinderSample.wsdl -p aws.v2006_1.gluestubs -g
This creates .MAP files in the current directory and .JAVA files in the esri/arcwebservices directory.
- Move the .MAP files from the current directory to the WEB-INF/maps directory.
- Compile the .JAVA files created in the esri/arcwebservices directory.
- Repeat the process for the next ArcWeb Service used.
If this does not solve the problem, perform the above process in a new directory.