When creating a FeatureLayer from a FeatureTable I get an ArcGISRuntimeException: Invalid argument in JNI code

1682
10
02-21-2018 09:28 PM
ChristopherMugdan
New Contributor III

ArcGIS Java SDK 100.2

I am new to the Java SDK and I am trying a simple test case to create an image from an ArcGISMap with a few points in it. When I try to run it I get the following when I try to create  FeatureLayer from a FeatureCollectionTable:

Exception in thread "main" com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument
    at com.esri.arcgisruntime.internal.jni.CoreFeatureLayer.nativeCreateWithFeatureTable(Native Method)
    at com.esri.arcgisruntime.internal.jni.CoreFeatureLayer.<init>(SourceFile:67)
    at com.esri.arcgisruntime.layers.FeatureLayer.a(SourceFile:209)
    at com.esri.arcgisruntime.layers.FeatureLayer.<init>(SourceFile:194)

I could not see how to create a FeatureTable from some Features, hence my use of a FeatureCollectionTable. Maybe that is incorrect?

I have set the environment variable ARCGISRUNTIMESDKJAVA_100_2_0 to the correct path to find the JNI code which I presume is in jniLibs under that path?

I have attached the (very simple) test code. I presume I have missed something but what?

Cheers,
Chris Mugdan

0 Kudos
10 Replies
ChristopherMugdan
New Contributor III

Hi Eric,

Would you consider providing an SDK that does what we need without the javafx paraphernalia? I would even be happy to have the asynchronous operations with the ListenableFuture<> even though we do not need them to be asynchronous.

I guess that the licensing model would need to be different and it would be good to know from the outset what that might be, including estimated costs.

Chris