ERROR Layer could not be found

Last Published: April 25, 2020

Error Message

When adding a shapefile layer to a MapObjects Java application, the following error is returned: Layer could not be found (Mines_msc)	at Source)	at Source)	at Source)	at java.awt.Container.add( 



Two potential causes:

1) An incorrect path to the dataset has been specified.

2) MapObjects Java cannot read shapefile datasets that contain two or more fields where the first 10 characters are identical. This is a limitation imposed by the dBase III (dbf) definition associated with ESRI's proprietary shapefile format. Some applications (such as Arcview and ArcMap) have internal methods for handling dbf fields with more than 10 characters.

Solution or Workaround

1) Check the path to the dataset, and point it to the proper location if incorrect.

2) Verify the field names of the shapefile are in the correct format, and if not, alter them so that the first 10 characters of each field are unique.

    Article ID:000006131

    • Legacy Products

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic