1

I am currently making a FeatureLayer from a resultset.

The feature layer seems to work properly and will display on the map.

However when I choose "select all" on my feature layer I get the following automation exception:

AutomationException: 0x80004005 - Unspecified error
at com.esri.arcgis.carto.FeatureLayer.selectFeatures(Unknown Source)
at cc.nisc.mapping.controls.actions.selection.SelectAllAction.doActionPerformed(SelectAllAction.java:32)
at cc.nisc.gui.action.NiscAction.actionPerformed(NiscAction.java:225)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)

my relevant code is listed below:

 try {
        String sqliteFile = String.valueOf(mwfFileSystem.getFesDirectory()) + "\\query_exports\\" + queryName + ".sqlite";


        workspace = WorkspaceFactory.SQLITE.openFromFile(
                sqliteFile);

        IFeatureLayer featureLayer = new FeatureLayer();
        featureLayer.setSelectable(true);
            featureLayer.setFeatureClassByRef(workspace.openFeatureClass(queryName));
        featureLayer.setName(queryName);
        ActiveMapContainer mapContainer = ActiveMapContainer.getInstance();

        mapContainer.getMap().addLayer(featureLayer);
    } catch (ArcEngineException | IOException e) {
        e.printStackTrace();
    }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.