Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept query or table name as argument in Query-to-File #306

Open
vogti opened this issue Mar 31, 2021 · 21 comments
Open

Accept query or table name as argument in Query-to-File #306

vogti opened this issue Mar 31, 2021 · 21 comments
Assignees
Labels
A-qtf Area: Query-to-File C-enhancement Category: An issue proposing an enhancement E-good-first-issue P-medium Priority: Medium

Comments

@vogti
Copy link
Member

vogti commented Mar 31, 2021

The Query-to-File tool has a JavaFX interface and simple command line interface. In order to integrate query-to-file into scripts and other applications, it would be useful to allow providing the query or table name as argument. It might also be useful to override configuration options (like the path where to mount the result or the Polypheny-DB host) with a parameter.

@vogti vogti added C-enhancement Category: An issue proposing an enhancement P-medium Priority: Medium E-good-first-issue A-qtf Area: Query-to-File labels Mar 31, 2021
@ebesojoseph
Copy link

I would like to work on this issue as part of my contribution to google summer of code

@vogti
Copy link
Member Author

vogti commented Apr 12, 2021

Hi @ebs237, welcome to Polypheny! It would be great if you can take care of this issue. I have just assigned it to you. Importing Polypheny Query-to-File in your favorite IDE is similar as described for Polypheny-DB here. The main-method is located in src/main/java/org/polypheny/qtf/Main.java. Please be aware that you need to have a running instance of Polypheny-DB and follow the instructions in the readme.

Please be aware, that Query-to-File it is currently not supported on Windows (see #297). Query to File is still in beta. There is only very limited documentation. Therefore, please ask here or open a thread in the discussions forum if you have any questions or experience any issues.

@ebesojoseph
Copy link

Thanks , I am getting to work right away

@ebesojoseph
Copy link

hello I have imported the project and added all needed dependencies but I am still having trouble with running the project

@vogti
Copy link
Member Author

vogti commented Apr 13, 2021

What kinds of issues do you have? What operating system are you using? Which Java version? Do you have a stacktrace?

@ebesojoseph
Copy link

I am running on mac catalina , java version 15.0.2+7-27
I tried running with gradle but it was not successful

@ebesojoseph
Copy link

the debugger pushes this line as an error

log.error("Could nor read line",e)

@vogti
Copy link
Member Author

vogti commented Apr 13, 2021

Do you have stacktrace?

@ebesojoseph
Copy link

ebesojoseph commented Apr 13, 2021

sorry for bothering the problem is because of fuse , i don't have it installed. please apart from using homebrew is there any other way by which I can install osxfuse ?

my homebrew keeps emitting errors when when I try to install

@vogti
Copy link
Member Author

vogti commented Apr 13, 2021

Yes, you can install it manually: https://github.com/osxfuse/osxfuse/releases

@ebesojoseph
Copy link

thanks for the help

@ebesojoseph
Copy link

what might be the cause of this

[WebSocketConnectReadThread-58]: an error occurred:java.net.ConnectException: Connection refused
18:34:24.711 ERROR [JavaFX Application Thread]: Could not connect to websocket.

@ebesojoseph
Copy link

please I need help , What could be the cause of this ?

[WebSocketConnectReadThread-24]: an error occurred:java.net.ConnectException: Connection refused
09:09:39.952 ERROR [JavaFX Application Thread]: Could not connect to websocket.v

@nilshansen94
Copy link
Member

Hi @ebs237, it looks like you have no Polypheny-DB instance running. Please make sure to clone, build and run Polypheny-DB as well. See this link on how to set up Polypheny-DB. If you run Polypheny-DB on a different host or a non-default port, make sure that the connection information in the Query-to-File config file is corrent.

@erdengk
Copy link
Contributor

erdengk commented Dec 19, 2021

My computer system is Mac OS Big Sur, apple M1 chip.
I also encountered problems similar to the above, but I have a running polyphenyl dB. But this error always occurs when I
want to run Query to file.

ERROR [JavaFX Application Thread]: Could not load fxml

I also used Google to search many web pages, but I couldn't find a solution.
@vogti @nilshansen94 Can you help me solve this problem?

The specific information is shown below:

> Task :Main.main()
kext load failed: -603947007
mount_osxfuse: the file system is not available (255)
18:37:25.488 ERROR [JavaFX Application Thread]: Could not load fxml
 javafx.fxml.LoadException: 
/Users/dk/Documents/pro/Query-to-File/build/resources/main/fxml/sample.fxml:12

	at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2707) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2685) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2517) ~[javafx-fxml-15.0.1-mac.jar:?]
	at org.polypheny.qtf.MainApp.start(MainApp.java:44) ~[main/:?]
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846) ~[javafx-graphics-15.0.1-mac.jar:?]
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455) ~[javafx-graphics-15.0.1-mac.jar:?]
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428) ~[javafx-graphics-15.0.1-mac.jar:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427) ~[javafx-graphics-15.0.1-mac.jar:?]
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) [javafx-graphics-15.0.1-mac.jar:?]
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS
	at ru.serce.jnrfuse.AbstractFuseFS.mount(AbstractFuseFS.java:293) ~[jnr-fuse-0.5.5.jar:?]
	at ru.serce.jnrfuse.Mountable.mount(Mountable.java:20) ~[jnr-fuse-0.5.5.jar:?]
	at org.polypheny.qtf.QueryInterface.<init>(QueryInterface.java:55) ~[main/:?]
	at org.polypheny.qtf.Controller.<init>(Controller.java:42) ~[main/:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS

	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:938) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634) ~[javafx-fxml-15.0.1-mac.jar:?]
	... 9 more
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS, return code = 1
	at ru.serce.jnrfuse.AbstractFuseFS.mount(AbstractFuseFS.java:289) ~[jnr-fuse-0.5.5.jar:?]
	at ru.serce.jnrfuse.Mountable.mount(Mountable.java:20) ~[jnr-fuse-0.5.5.jar:?]
	at org.polypheny.qtf.QueryInterface.<init>(QueryInterface.java:55) ~[main/:?]
	at org.polypheny.qtf.Controller.<init>(Controller.java:42) ~[main/:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:938) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808) ~[javafx-fxml-15.0.1-mac.jar:?]
	at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634) ~[javafx-fxml-15.0.1-mac.jar:?]
	... 9 more
Caused by: ru.serce.jnrfuse.FuseException: Unable to mount FS, return code = 1


> Task :Main.main() FAILED

Execution failed for task ':Main.main()'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

@vogti
Copy link
Member Author

vogti commented Dec 20, 2021

@erdengk It looks like it is unable to find fuse. Have you installed jnr-fuse as described in the readme?

@erdengk
Copy link
Contributor

erdengk commented Dec 26, 2021

@vogti Thank you for your prompt. I have successfully run the Query-to-File.

image

@erdengk
Copy link
Contributor

erdengk commented Dec 26, 2021

@vogti @nilshansen94
I want to confirm with you that the problem is to add a function to modify configuration options through parameters?

For example, the path where to mount the result or the polyphenyl DB host.

I'm trying to understand this project. I don't know where to start. Can you guide me on where to start? Thanks.

@vogti
Copy link
Member Author

vogti commented Jan 2, 2022

Yes, kind of. The idea is to have kind of a command line mode for Query-to-File. This would allow using it in scripts.

@landongyu
Copy link

I would like to work on this issue, as part of my contribution to google summer of code!

@vogti
Copy link
Member Author

vogti commented Mar 29, 2024

Hi @landongyu, welcome to Polypheny! It would be great if you can take care of this issue. I have just assigned it to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-qtf Area: Query-to-File C-enhancement Category: An issue proposing an enhancement E-good-first-issue P-medium Priority: Medium
Projects
None yet
Development

No branches or pull requests

5 participants