java.lang.NullPointerException - ArcIMS

Last Published: April 25, 2020

Error Message

When clicking on any layer in the TOC, or Table of Contents, of a custom Java Viewer, the following error occurs in the java message console:



This error occurs if any of the tools in the Zoom and Pan ToolBar are unselected while designing the custom Java Viewer site using ArcIMS Designer.
When creating the Web site using Designer, at one point the tools to include in the Web site can be selected. By default, all the tools in the Zoom and Pan ToolBar are selected. If any of the tools are unchecked, the 'All' check box becomes unchecked itself. If 'All' is unchecked, the error occurs.

Solution or Workaround

Manually edit the JavaScript file in the Web site to eliminate this error.

  1. Find default.js file in the Java Viewer Web site folder and open it in a text editor.
  2. Find the function named enableFunctions within this file. This function makes a number of enableFunction() calls by passing in the ID and a boolean variable. The ID ranges from 10 to 50.

    See descriptions for IMSMap.enableFunction in 'Customizing ArcIMS : Java Viewer' document available in <ArcIMS Installation Directory>/Documentation folder for more descriptions about this function.

  3. Change the boolean argument to true in the enableFunction corresponding to ID=20:


    applet.enableFunction(20, true);

    ID value of 20 corresponds to All Zoom and Pan Functions.
    You can find more information on different ID values in Customizing Java Viewer.pdf file that ships with ArcIMS.

  4. Save the default.js file.

Article ID:000006528

  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options