Skip to content

Dirlist example throws exceptions during execution #113

Open

Description

@jmark99

When running the Dirlist example and executing

./bin/runex dirlist.Viewer....

exceptions are thrown in the terminal window. The Viewer GUI appears to work properly but the exceptions should be examined more closely and resolved if possible.

Activity

  1. Manno15 commented on Dec 11, 2022

    @Manno15
    Contributor

    @jmark99 Can you be more specific on what exception you see in the terminal? The exceptions I ran into were only Auth issues. One for user username which did not exist. Unsure if part of the example should be creating the user on its own or not.

    The other exception involved when running ./bin/runex dirlist.Viewer.... was the root user who didn't have the auth either. Giving root the auth seemed to resolve the exception but my file viewer didn't seem to work correctly (as in it did not seem to do anything of note).

  2. jmark99 commented on Dec 12, 2022

    @jmark99
    ContributorAuthor

    @Manno15 I have just been running the example as the root user and providing a path to some subset of my Accumulo dev directory as the argument for the Ingest command. I'm sure the documentation could use some more clarity.

    Providing the root user with the exampleVis auth then allows me to scan the tables. The exceptions I'm referring to occur when I run the Viewer program. The Viewer displays the data correctly and as expected, but exceptions are written to the console terminal that called the Viewer program. It would be nice to resolve them. The following is an example:

    Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: This client was closed.
            at org.apache.accumulo.core.clientImpl.ClientContext.ensureOpen(ClientContext.java:156)
            at org.apache.accumulo.core.clientImpl.ClientContext.createScanner(ClientContext.java:778)
            at org.apache.accumulo.examples.dirlist.QueryUtil.getDirList(QueryUtil.java:167)
            at org.apache.accumulo.examples.dirlist.Viewer.populate(Viewer.java:116)
            at org.apache.accumulo.examples.dirlist.Viewer.populateChildren(Viewer.java:126)
            at org.apache.accumulo.examples.dirlist.Viewer.treeExpanded(Viewer.java:170)
            at java.desktop/javax.swing.JTree.fireTreeExpanded(JTree.java:2812)
            at java.desktop/javax.swing.JTree.setExpandedState(JTree.java:3702)
            at java.desktop/javax.swing.JTree.expandPath(JTree.java:2244)
            at java.desktop/javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2616)
            at java.desktop/javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2601)
            at java.desktop/javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2549)
            at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:4007)
            at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3955)
            at java.desktop/java.awt.Component.processMouseEvent(Component.java:6629)
            at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
            at java.desktop/java.awt.Component.processEvent(Component.java:6397)
            at java.desktop/java.awt.Container.processEvent(Container.java:2263)
            at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
            at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
            at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
            at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
            at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4544)
            at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
            at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
            at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
            at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
            at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
            at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
            at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
            at java.base/java.security.AccessController.doPrivileged(Native Method)
            at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
            at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
            at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
            at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
            at java.base/java.security.AccessController.doPrivileged(Native Method)
            at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
            at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
            at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
            at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
            at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
            at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
            at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    
  3. Manno15 commented on Jan 22, 2023

    @Manno15
    Contributor

    After coming back to this, I have been able to reproduce the error. I am still looking for a solution but my guess is the client that was used to create the viewer was closed by the try-with-resources block that was used to create it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions