Error when pushing Blob to Feature service

392
1
09-13-2017 05:02 AM
FrancisGagne
New Contributor

I'm trying to create a Feature with an esriFieldTypeBlob but it crashes with an UnsupportedOperationException.

The value of the attribute is a byte array.

The FeatureLayer is a Feature service with the edition and addition enabled.

Map<String, Object> attributesMap = new HashMap<>();
for (Attribute attribute : attributeListAdapter.getAllAttribute()) {
    attributesMap.put(attribute.getName(), attribute.getValue());
}
final FeatureTable featureTable = featureLayer.getFeatureTable();

//the createFeature cause the exception
feature = featureTable.createFeature(attributesMap, sketch.getGeometry());


FATAL EXCEPTION: main Process: com.cgi.cgis, PID: 20311 
java.lang.UnsupportedOperationException: Conversion to CoreElement not implemented: class [B
 at com.esri.arcgisruntime.internal.n.g.a(SourceFile:528)
 at com.esri.arcgisruntime.internal.n.k$b.a(SourceFile:452)
 at com.esri.arcgisruntime.internal.n.k$b.add(SourceFile:399)
 at com.esri.arcgisruntime.internal.n.g.a(SourceFile:762)
 at com.esri.arcgisruntime.data.FeatureTable.createFeature(SourceFile:535)
 at com.cgi.cgis.core.edition.manager.EditionManager.createFeature(EditionManager.java:321)

If I put anything else in this attribute, I get a mismatch error, and if I put null, the creation runs fine and I can push it to the service.

Tags (2)
0 Kudos
1 Reply
AlexanderNohe1
Occasional Contributor III

I will research this and get back to you

0 Kudos