RunTimeException when trying to display military messages

934
1
10-23-2016 02:40 PM
DarkRider
New Contributor II

I am using ArcGIS 10.2.4.6 and Eclipse Neon.1 on Windows 7

I've followed the following tutorial:

Display military messages—ArcGIS Runtime SDK for Java | ArcGIS for Developers 

For that I've created an ArcGIS Map application. I've attached the code file.

When I run the code, I get the following error message:


java.lang.RuntimeException: Internal error exception - Group layer is not bound to map, or map not initialized
    at com.esri.core.internal.symbol.advanced.MessageProcessorInternal.nativeProcessMessage(Native Method)
    at com.esri.core.internal.symbol.advanced.MessageProcessorInternal.a(Unknown Source)
    at com.esri.core.symbol.advanced.MessageProcessor.processMessage(Unknown Source)
    at MainClass$2.run(MainClass.java:94)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Although the group layer is bound to the map and the map is initialized. Can anybody help me with this?

0 Kudos
1 Reply
nita14
by
Occasional Contributor III

Hi,

//EDITED - MAP is not yet ready

Map is not yet initialized. Try to add "addMapEventListener" to the map, and then process the message in the mapReady method.

map.addMapEventListener(new MapEventListener(){

@Override
public void mapDispose(MapEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mapExtentChanged(MapEvent arg0) {
// TODO Auto-generated method stub

}

@Override
public void mapReady(MapEvent arg0) {
// TODO Auto-generated method stub


}
});

Hope this helps,

Adam


					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
0 Kudos