Hello Eric,Would you be able to share your code which is failing?
this is the part of the code where the feature service is started and the layers from the map package are accessed. The application seems to throw the exception in this section:
//Path of workspace directory
String dir = System.getProperty("user.dir");
//Basemap
ArcGISLocalDynamicMapServiceLayer basemap = new ArcGISLocalDynamicMapServiceLayer(dir+"\\shapes.mpk");
map.getLayers().add(basemap);
//new local feature service
LocalFeatureService service = new LocalFeatureService(dir+"\\myPackage.mpk");
//Getting details of all feature layers in the package
details = service.getFeatureLayers();
service.addLocalServiceStartCompleteListener(new LocalServiceStartCompleteListener() {
@Override
public void localServiceStartComplete(LocalServiceStartCompleteEvent arg0) {
//initialize a new feature layer for every layer in the package and add it to the map
for(int i = 0; i<details.size();i++)
{
featureLayer = new ArcGISFeatureLayer(details.get(i).getUrl());
map.getLayers().add(featureLayer);
}
}
});
//start the service asynchronous
service.startAsync();