HOW TO

Resolve erroneous connections in a MapObjects-Java applet

Last Published: April 25, 2020

Summary

Various erroneous connections may be created when a MapObjects-Java applet is deployed.

Procedure

Several types of these erroneous connections are listed below. The type of error message, the cause of the problem and a solution (if available) are provided for each of the cases.
  1. Requesting locale-specific property files and classes

    Error messages:

    Code:
    Connecting http:// localhost:8080/com/esri/mo2/res/Res_en.class with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/Res_en.properties with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/Res_en_US.class with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/Res_en_US.properties with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/geod.class with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/geod_en.class with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/geod_en.properties with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/geod_en_US.class with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/geod_en_US.properties with no proxy

    Source of the problem:

    This problem is caused by the way the Java Virtual Machine loads resources using the ResourceBundle class
    (refer to the class definition for the ResourceBundle). A Java applet class loader will first try to load a locale-specific property file. If none is present, it will look for the default one that is provided with MapObjects-Java.

    Solution:

    1) Create the following empty classes:
    com/esri/mo2/res/Res_en.class
    com/esri/mo2/res/Res_en_US.class
    com/esri/mo2/res/geod_en.class
    com/esri/mo2/res/geod_en_US.class

    2) Copy com.esri.mo2.res.Res.properties to com.esri.mo2.res.Res_en.properties and com.esri.mo2.res.Res_en_US.properties.
    3) Copy com.esri.mo2.res.geod.properties to com.esri.mo2.res.geod_en.properties and com.esri.mo2.res.geod_en_US.properties.

    Note:
    These instructions are for the U.S.-specific locale. The same steps can be used with the appropriate classes and properties for any locale.

    4) Package these new classes and property files into a new jar file or place them into the same jar file that contains all the MapObjects-Java classes and resources.

  2. Requesting non-existent icon images from the resource bundle

    Error messages:

    Code:
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/zi.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/zo.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/zoomtheme.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/zoomfull.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/back2ex.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/forw2ex.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/cmn/pan.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/directional.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/pan_north.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/pan_south.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/pan_east.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/tb/pan_west.gif with no proxy
    Connecting http:// localhost:8080/com/esri/mo2/res/laf/metal/ico/cmn/identify.gif with no proxy

    Source of the problem:

    These missing icon messages are caused by the Java applet’s look & feel (L&F) settings. By default, a Java applet will use the Metal L&F so the applet will request icon images for this specific L&F. If the images are not found, then it will look in the default location in the downloaded or cached MapObjects jar file(s).

    Solution:

    1) Un-jar the MapObjects resource jar: esri_mo21res.jar.

    2) Create a new folder called ‘metal’ for the Metal L&F under the com/esri/mo2/res directory.

    3) Copy the ico folder in the com/esri/mo2/res directory to this newly created folder.

    4) Re-jar all the MapObjects resources into a single jar file.

  3. Requesting a non-existent JAI operation registry file

    Error message:

    Code:
    Connecting http://localhost:8080/META-INF/services/javax.media.jai.OperationRegistrySpi with no proxy

    Source of the problem:

    This problem is caused by the manner in which the Java Advanced Imaging (JAI) registers customized or user-defined JAI operations for image processing. The JAI classes themselves search for an OperationRegistrySpi file. Since MapObjects-Java does not define any new JAI operations, this file is not provided.

    Solution:

    No solution is available, but refer to the documentation on OperationRegistrySpi for more information.

Article ID:000007733

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic