sfa-siard / SiardGui

SIARD Suite - SiardGui
Other
17 stars 3 forks source link

Exception on "Metadaten importieren" #18

Closed oschihin closed 4 years ago

oschihin commented 4 years ago

I downloaded the metadata of a database (oracle) for further analysis on the cli, this worked fine: java -cp lib/siardcmd.jar ch.admin.bar.siard2.cmd.SiardFromDb -q=0 -j=jdbc:oracle:thin:@[host]:[port]:[SID] -u=[user] -p=[password] -e=/some/folder/to/schema.xml

I can of course view the xml file in an editor, but want to analyse it in SIARD-Suite. The menu item "Datei > Metadaten importieren" is not described in the documentation, but I guess that's what I need. But this menu item fails. There is no reaction in the GUI. On the cli, I have this output:

/usr/bin/java -Xmx1024m -Dsun.awt.disablegrab=true -Djava.util.logging.config.file=./etc/logging.properties -jar ./lib/siardgui.jar 
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Folder parameter must be a valid folder
        at com.sun.glass.ui.CommonDialogs.convertFolder(CommonDialogs.java:238)
        at com.sun.glass.ui.CommonDialogs.showFileChooser(CommonDialogs.java:190)
        at com.sun.javafx.tk.quantum.QuantumToolkit.showFileChooser(QuantumToolkit.java:1503)
        at javafx.stage.FileChooser.showDialog(FileChooser.java:416)
        at javafx.stage.FileChooser.showOpenDialog(FileChooser.java:350)
        at ch.enterag.utils.fx.dialogs.FS.chooseExistingFile(FS.java:129)
        at ch.admin.bar.siard2.gui.actions.MetaDataAction.augmentMetaData(MetaDataAction.java:82)
        at ch.admin.bar.siard2.gui.SiardGui.augmentMetaData(SiardGui.java:436)
        at ch.admin.bar.siard2.gui.MainMenuBar.handle(MainMenuBar.java:131)
        at ch.admin.bar.siard2.gui.MainMenuBar.handle(MainMenuBar.java:26)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
        at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1405)
        at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$599(ContextMenuContent.java:1358)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$345(GlassViewEventHandler.java:432)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139)
        at java.lang.Thread.run(Thread.java:748)

I'm on SiardGUI 2.1.133 Any hints? What folder parameter?

HartwigThomas commented 4 years ago

Would it be possible to share the XML file with me?

oschihin commented 4 years ago

Would it be possible to share the XML file with me?

Sorry @HartwigThomas , been on holidays. I'll check that and contact you directly.

oschihin commented 4 years ago

@HartwigThomas As mentioned per mail, this is not an issue with the schema / XML file, but with the installation. I tried on Windows 7 and Linux Mint. Here a quick description of what's going wrong. Maybe the installation process needs to be adapted?

Windows 7

Linux Mint

Basically the same procedure. Missing folders should be under ~/data/SIARD Suite 2.1/.

Could this be solved by the "installer"?

HartwigThomas commented 4 years ago

The LOB folders are created, when you download a database and specify external storage of LOBs. (md folders are created, when you specify them when you export meta data.) They need not be created at installation time. If LOBs are referenced in meta data, they (or their folders) must not necessarily exist. I shall try to reproduce your error without existing LOB-folders.

oschihin commented 4 years ago

I understand the folders are created at download / export time. But they are missing and produce an error, if you want to import metadata you already have. I'd propose to simply create them at installation time to prevent that error from happeing.

HartwigThomas commented 4 years ago

I have now implemented a solution, where the folders for meta data and LOBs are created when they are needed. It will be published with the next Release. Meanwhile manually creating these folders is a valid work-around.