Select to view content in your preferred language

ArcGIS Runtime for Java 10.2 examples not working

6809
16
11-05-2013 02:21 PM
BrunoMendes
Deactivated User
I've just installed ArcGIS Runtime for Java 10.2 and tried to open the samples, but none of them displays a map, just ESRI logo.

I've also guaranteed that I have access to the requested domain (in the first sample case, 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer').

For samples that use LocalServer I've assured the server is up and running at 'http://127.0.0.1:50000/9gSy7s/arcgis/rest/services'.

Nothing is printed at the Java console mentioning any error.

What could be the problem?


Thanks in advance.
0 Kudos
16 Replies
BrunoMendes
Deactivated User
The error you are seeing above (Failed to create a shared context) is due to the fact that your graphics card drivers are not supporting a very high version of OpenGL.  I bet you only have 1.1 support!  DirectX is usually most reliable in Windows, however as Vijay suggested it was worth a try switching to OpenGL!  The fact that you can see the esri logo when running in DirectX suggests to me that you don't have a rendering issue with DirectX mode.

I'm thinking that your locked down environment is hurting you here.  What I would suggest is creating a application which uses an online service like this:

        map = new JMap();
        window.getContentPane().add(map);

        ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(
            "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
        map.getLayers().add(tiledLayer);

You then need to configure Eclipse so you can capture the HTTP traffic in Fiddler.  You need to set your JVM run options so you use this:

  -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

Then watch if anything gets captured in Fiddler!

One thing I am surprised about is that you couldn't run an application which used a local tiled package.  This just uses basic file IO to read the the TPK file.  This does not use the local server and hence does not rely on HTTP traffic. 

Mark


I've gone the Fiddler route and it seems everything is fine, could even preview the images in Fiddler without any issues.
But the problem persists as shown in the attached image.

At home I was able to test and run the samples nicely, but at work it doesn't work at all.
The only difference is the graphics card... at work we have an Nvidia GForce 7300 SE/7200 GE with DirectX 11 installed.
0 Kudos
GayleYoung
Esri Contributor
Hi,
here are a couple of other things you could consider:

  1. The java 6 that you used appeared to be 32 bit (client). What is the java 7 version? It might be worth trying 64 bit server (though that should not matter).

  2. We are assuming you are not over remote desktop (again though that should not matter).

  3. Run dxdiag.exe, perhaps some of the DirectX acceleration features have been disabled. Consider using the 'Save All Information button' and attaching the results here.


Thanks,
Gayle
0 Kudos
BrunoMendes
Deactivated User
Hi,
here are a couple of other things you could consider:

  1. The java 6 that you used appeared to be 32 bit (client). What is the java 7 version? It might be worth trying 64 bit server (though that should not matter).

  2. We are assuming you are not over remote desktop (again though that should not matter).

  3. Run dxdiag.exe, perhaps some of the DirectX acceleration features have been disabled. Consider using the 'Save All Information button' and attaching the results here.


Thanks,
Gayle


Thanks for your considerations Gayle, the responses are:


  1. When running from eclipse I use JDK 64 bits.

  2. I've tested both ways, remote and non-remote.

  3. I've attached both outputs (32 and 64bits)

0 Kudos
GayleYoung
Esri Contributor
Thanks for the information,
from the 64bit dxdiag output i can see that Direct draw acceleration on the Display tab is not available (DDraw Status: Not Available). This is a hardware requirement on the video/graphics adapter (https://developers.arcgis.com/en/java/info/arcgis-runtime-sdk-for-java-system-requirements.htm). You could try updating/installing drivers from the Nvidia site, but it may be that beacuse you are in a server environment your graphics card is not suitable for running display accelerated client applications.
Gayle
0 Kudos
BrunoMendes
Deactivated User
Well, then I guess Runtime SDK for Java is not an option for my case.

Could you point me to another approach to provide offline maps with routing?
0 Kudos
GayleYoung
Esri Contributor
I'd recommend considering if you can get a graphics card that supports hardware acceleration, or the OpenGL requirements of ArcGIS Runtime. If this is not an option ArcGIS Engine is available. It has lower OpenGL requirements (version 2.0 minimum, and Shader Model 3.0 or higher) and supports your OS and network analysis:
current ArcGIS Engine Requirements.
0 Kudos
MarkBaird
Esri Regular Contributor
Are you absolutely sure that your graphics card drivers are up to date or correct?

For windows platforms DirectX rendering is most likely to be the best solution.  We support both DirectX 9 and with the 10.2 release we also use DirectX 11 if it is available.  The advantage of DirectX 11 (with WARP) is that it will work even if you remote desktop onto the machine.  http://msdn.microsoft.com/en-us/library/windows/desktop/gg615082(v=vs.85).aspx

dxdiag in my experience reliably tells you that the MS components are in place, but it still reports DX support even if the drivers are not correct.  A more reliable way of testing support for DX and OpenGL is to use a tool like GLview from Realtech. 

http://www.realtech-vr.com/glview/

I really would expect you to be able to get the runtime working with Windows 7 and a NVidia graphics card with DirectX and even OpenGL.  However if your graphics card drivers are not correct you will have problems.

If updating your graphics card drivers is not an option, another consideration is to use one of the web maded APIs.  Is running an application in a browser an option?
0 Kudos