Select to view content in your preferred language

Problems when open a samples

4617
13
09-17-2013 02:26 AM
IvanoIerace
Deactivated User
Hi,

I've installed the Runtime SDK for Java (10.1.1) without problems, but the Runtime Java Samples doesn't work very well.
It started without problems, but when I select one of samples, nothing appear on tabs and Console window shows an
exception ( see below )

has anyone had the same problem?

Thanks

Java version : 1.7.0_40 (Oracle Corporation) x86
Rendering engine : DirectX
- - - Executing sample com.esri.client.samples.mapping.tiledlayers.LocalTiledLayer - - -
Java version : 1.7.0_40 (Oracle Corporation) x86
Rendering engine : DirectX
Java version : 1.7.0_40 (Oracle Corporation) x86
Rendering engine : DirectX
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.esri.client.samples.SampleLauncher.launchSample(SampleLauncher.java:121)
at com.esri.client.samples.SampleViewer$11.valueChanged(SampleViewer.java:600)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
at javax.swing.JTree.setSelectionPath(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(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$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.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)
Caused by: java.lang.NullPointerException
at com.esri.client.samples.mapping.tiledlayers.LocalTiledLayer.createMap(LocalTiledLayer.java:137)
at com.esri.client.samples.mapping.tiledlayers.LocalTiledLayer.createUI(LocalTiledLayer.java:80)
... 48 more
0 Kudos
13 Replies
MarkBaird
Esri Regular Contributor
Hi

This isn't what it's supposed to do!

Can you give me some more information about your installation:

- OS version
- Machine spec. 
- Location of your installation files

If you are using Windows, do you have DirectX 9 or 11 support?

If you are using Linux, have you got OpenGL support?

Have you tried creating a simple application using the Eclipse plugin?

Using Eclipse, create a New Project - >ArcGIS Runtime Map Application.

When you run the application what happens.  You may get more information on the problem via eclipse.

Mark
0 Kudos
IvanoIerace
Deactivated User
Hi Mark,

here the informations

Windows XP Professional Sp3

Intel Core 2 Duo E8600 3.33GHz
3 Gb Ram
NVidia Quadro NVS 55/280 PCI 64 MB (OpenGL 2.0.3)


Installation path: C:\Program files\ArcGIS SDKs\java10.1.1

DirectX 9.0c

No I haven't create an application by eclipse. I just launch the Sample application contained in Runtime SDK.

Thanks
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
I'd check to ensure that the "ARCGISRUNTIMESDKJAVA_10_1_1" environment variable is set. the example you tried to run failed to locate the path to the local tiled layer file called "Topographic.tpk" which the installer places at "C:\Program files\ArcGIS SDKs\java10.1.1\samples\data\tpks\", and threw a null pointer exception because it could not find it. Based on your statement, it should be set to "C:\Program files\ArcGIS SDKs\java10.1.1" in order for the samples to locate their resources.
0 Kudos
MarkBaird
Esri Regular Contributor
Carlos has a good point about the environment variable.

I uninstall and reinstall the product lots of times (testing the latest build) and sometimes the env var isn't set.  Its quite rare, but logging out and back in again and its fine. 

If this doesn't help try testing with eclipse and you should see better errors.

Mark
0 Kudos
IvanoIerace
Deactivated User
I had already checked the environment variable and was successfully created with path: C:\Programmi\ArcGIS SDKs\java10.1.1 (NOTE Programmi = Program Files, my Win XP has italian language).

I will try with eclipse IDE

thanks
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
I had already checked the environment variable and was successfully created with path: C:\Programmi\ArcGIS SDKs\java10.1.1 (NOTE Programmi = Program Files, my Win XP has italian language)


Food for thought: "C:\Program files\ArcGIS SDKs\java10.1.1" is not the same as "C:\Programmi\ArcGIS SDKs\java10.1.1"
0 Kudos
IvanoIerace
Deactivated User
I did some test with Eclipse.

The first time my test didn't start, infact there was a problem with license (it did found it), so I added the statement ArcGISRuntime.setLicense(...) in the code and after it starts.

Now there is another problem. The test generate an exception

java.net.UnknownHostException: services.arcgisonline.com

because in the default generated test there is a ArcGISTiledMapServiceLayer with an http address for the maps,  I suppose.

Eclipse right configured for internet

After this I tried to load a my map package file, but the result is same though the exception is different:

java.net.MalformedURLException: no protocol: null/admin/createService
...
...
...

Message : Satrtup failed : Invalid license provided

Any idea??


thanks,
Ivano

PS: I have a valid license
0 Kudos
IvanoIerace
Deactivated User
Food for thought: "C:\Program files\ArcGIS SDKs\java10.1.1" is not the same as "C:\Programmi\ArcGIS SDKs\java10.1.1"


Yes, I know, it would be a little help for your understanding :). Anyway do you think that ArcGis could be problems with
folder name translated in local language? (italian in my case)
ArcGis could be work only with XP in english version??

Regarding the samples, my installation path is C:\Programmmi\ArcGIS SDKs\java10.1.1\sdk\samples\data\tpks\, instead of C:\Program files\ArcGIS SDKs\java10.1.1\samples\data\tpks as you write.
I have copied the samples folder one level earlier than my installation path, but the result is the same: it doesn't work

Ivano
0 Kudos
MarkBaird
Esri Regular Contributor
Okay does Programmi contain any special characters which are non utm8.  I'm thinking about accents like in French or similar.

Do you know what I mean?

Thanks

Mark
0 Kudos