Basex Standalone : [bxerr:BXSQ0007] Could not initialize supplied driver: 'com.mysql.jdbc.Driver'

Monday, 11 May 2015 · 11 messages · last reply 12 May 2015
JM
jean-marc Mercier11 May 2015 15:56 #
Hi, I am struggling to use Basex sql module together with Basex Standalone. I am getting the error : [bxerr:BXSQ0007] Could not initialize supplied driver: 'com.mysql.jdbc.Driver' The sql connection works finely while using the Basex server. I guess that it might be due to the fact that I don't know how to include multiple jar while using with eclipse. I tried to go to Windows/Preferences/XQUERY/Interpreters and set -classpath {BaseXDirectory}\lib\*, but it does not work. Maybe somebody already met this small issue before ? Thanks for your answer, cheers
CG
Christian Grün11 May 2015 22:05 #
Hi Jean-Marc,
Quoted text · jean-marc Mercier · 4 lines
> I guess that it might be due to the fact that I don't know how to include > multiple jar while using with eclipse. I tried to go to > Windows/Preferences/XQUERY/Interpreters and set -classpath > {BaseXDirectory}\lib\*, but it does not work.
You will probably have to include the libraries as follows: Project → Properties → Java Build Path → Libraries → Add JARs... Hope this helps, Christian
Quoted text · jean-marc Mercier · 6 lines
> > Maybe somebody already met this small issue before ? > > Thanks for your answer, > > cheers
JM
jean-marc Mercier12 May 2015 11:28 #
Christian, Hello. Thx for your answer. I've tried your suggestion, but I can't set the Java Build path using Eclipse/ Project / Properties (my IDE is eclipse together with BaseX Interpreter) : [image: Images intégrées 1] This is a minor issue : I can survive using the BaseX server. It is only hardening dev / debug, since I don't know how to trace using BAseX server (fn:trace seems not to output anything using the basex server, maybe I missed something here ?). Cheers 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 24 lines
> Hi Jean-Marc, > > > I guess that it might be due to the fact that I don't know how to include > > multiple jar while using with eclipse. I tried to go to > > Windows/Preferences/XQUERY/Interpreters and set -classpath > > {BaseXDirectory}\lib\*, but it does not work. > > You will probably have to include the libraries as follows: > > Project → Properties → Java Build Path → > Libraries → Add JARs... > > Hope this helps, > Christian > > > > > > > Maybe somebody already met this small issue before ? > > > > Thanks for your answer, > > > > cheers >
CG
Christian Grün12 May 2015 11:31 #
You may need to create a Java project and try it again. Please note that, from the Eclipse perspective, the XQuery processor of BaseX is a Java application.
Quoted text · jean-marc Mercier · 45 lines
On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < jeanmarc.mercier at gmail.com> wrote: > Christian, > > Hello. Thx for your answer. I've tried your suggestion, but I can't set > the Java Build path using Eclipse/ Project / Properties (my IDE is > eclipse together with BaseX Interpreter) : > [image: Images intégrées 1] > This is a minor issue : I can survive using the BaseX server. It is only > hardening dev / debug, since I don't know how to trace using BAseX server > (fn:trace seems not to output anything using the basex server, maybe I > missed something here ?). > > Cheers > > > 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: > >> Hi Jean-Marc, >> >> > I guess that it might be due to the fact that I don't know how to >> include >> > multiple jar while using with eclipse. I tried to go to >> > Windows/Preferences/XQUERY/Interpreters and set -classpath >> > {BaseXDirectory}\lib\*, but it does not work. >> >> You will probably have to include the libraries as follows: >> >> Project → Properties → Java Build Path → >> Libraries → Add JARs... >> >> Hope this helps, >> Christian >> >> >> >> > >> > Maybe somebody already met this small issue before ? >> > >> > Thanks for your answer, >> > >> > cheers >> > >
JM
jean-marc Mercier12 May 2015 12:01 #
Christian, Hi. I confess that I don't know how to set a JAVA project running XQUERY with Basex interpreter under eclipse. I just know how to set an XQUERY project as pointed in http://docs.basex.org/wiki/Integrating_Eclipse. Maybe a possibility to avoid changing my whole project setting could be use an alternative Eclipse running Configuration ? [image: Images intégrées 1] I've tried but didn't find out so far how to set it properly. 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 53 lines
> You may need to create a Java project and try it again. Please note that, > from the Eclipse perspective, the XQuery processor of BaseX is a Java > application. > > > > On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >> Christian, >> >> Hello. Thx for your answer. I've tried your suggestion, but I can't set >> the Java Build path using Eclipse/ Project / Properties (my IDE is >> eclipse together with BaseX Interpreter) : >> [image: Images intégrées 1] >> This is a minor issue : I can survive using the BaseX server. It is only >> hardening dev / debug, since I don't know how to trace using BAseX server >> (fn:trace seems not to output anything using the basex server, maybe I >> missed something here ?). >> >> Cheers >> >> >> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >>> Hi Jean-Marc, >>> >>> > I guess that it might be due to the fact that I don't know how to >>> include >>> > multiple jar while using with eclipse. I tried to go to >>> > Windows/Preferences/XQUERY/Interpreters and set -classpath >>> > {BaseXDirectory}\lib\*, but it does not work. >>> >>> You will probably have to include the libraries as follows: >>> >>> Project → Properties → Java Build Path → >>> Libraries → Add JARs... >>> >>> Hope this helps, >>> Christian >>> >>> >>> >>> > >>> > Maybe somebody already met this small issue before ? >>> > >>> > Thanks for your answer, >>> > >>> > cheers >>> >> >> >
CG
Christian Grün12 May 2015 12:07 #
Just a guess, but have you already tried to add all the additional BaseX libraries in this window (Add JARs...)?
Quoted text · jean-marc Mercier · 72 lines
On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier < jeanmarc.mercier at gmail.com> wrote: > Christian, > > Hi. I confess that I don't know how to set a JAVA project running XQUERY > with Basex interpreter under eclipse. > I just know how to set an XQUERY project as pointed in > http://docs.basex.org/wiki/Integrating_Eclipse. > > Maybe a possibility to avoid changing my whole project setting could be > use an alternative Eclipse running Configuration ? > > [image: Images intégrées 1] > I've tried but didn't find out so far how to set it properly. > > > 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: > >> You may need to create a Java project and try it again. Please note that, >> from the Eclipse perspective, the XQuery processor of BaseX is a Java >> application. >> >> >> >> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < >> jeanmarc.mercier at gmail.com> wrote: >> >>> Christian, >>> >>> Hello. Thx for your answer. I've tried your suggestion, but I can't set >>> the Java Build path using Eclipse/ Project / Properties (my IDE is >>> eclipse together with BaseX Interpreter) : >>> [image: Images intégrées 1] >>> This is a minor issue : I can survive using the BaseX server. It is only >>> hardening dev / debug, since I don't know how to trace using BAseX server >>> (fn:trace seems not to output anything using the basex server, maybe I >>> missed something here ?). >>> >>> Cheers >>> >>> >>> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >>> >>>> Hi Jean-Marc, >>>> >>>> > I guess that it might be due to the fact that I don't know how to >>>> include >>>> > multiple jar while using with eclipse. I tried to go to >>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath >>>> > {BaseXDirectory}\lib\*, but it does not work. >>>> >>>> You will probably have to include the libraries as follows: >>>> >>>> Project → Properties → Java Build Path → >>>> Libraries → Add JARs... >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> >>>> > >>>> > Maybe somebody already met this small issue before ? >>>> > >>>> > Thanks for your answer, >>>> > >>>> > cheers >>>> >>> >>> >> >
JM
jean-marc Mercier12 May 2015 12:27 #
Well I tried to add all JAR contained in the BaseX\lib in this windows. If I try to launch a XQUERY script with this running configuration, here is the result
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.NoClassDefFoundError: Could not initialize class
org.fusesource.jansi.internal.Kernel32
at
org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50)
at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:204)
at jline.WindowsTerminal.init(WindowsTerminal.java:82)
at jline.TerminalFactory.create(TerminalFactory.java:101)
at jline.TerminalFactory.get(TerminalFactory.java:158)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:229)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.basex.util.ConsoleReader$JLineConsoleReader.<init>(ConsoleReader.java:132)
at org.basex.util.ConsoleReader.get(ConsoleReader.java:57)
at org.basex.BaseX.console(BaseX.java:183)
at org.basex.BaseX.<init>(BaseX.java:169)
at org.basex.BaseX.main(BaseX.java:42)
2015-05-12 12:07 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 78 lines
> Just a guess, but have you already tried to add all the additional BaseX > libraries in this window (Add JARs...)? > > > On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >> Christian, >> >> Hi. I confess that I don't know how to set a JAVA project running XQUERY >> with Basex interpreter under eclipse. >> I just know how to set an XQUERY project as pointed in >> http://docs.basex.org/wiki/Integrating_Eclipse. >> >> Maybe a possibility to avoid changing my whole project setting could be >> use an alternative Eclipse running Configuration ? >> >> [image: Images intégrées 1] >> I've tried but didn't find out so far how to set it properly. >> >> >> 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >>> You may need to create a Java project and try it again. Please note >>> that, from the Eclipse perspective, the XQuery processor of BaseX is a Java >>> application. >>> >>> >>> >>> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < >>> jeanmarc.mercier at gmail.com> wrote: >>> >>>> Christian, >>>> >>>> Hello. Thx for your answer. I've tried your suggestion, but I can't >>>> set the Java Build path using Eclipse/ Project / Properties (my IDE is >>>> eclipse together with BaseX Interpreter) : >>>> [image: Images intégrées 1] >>>> This is a minor issue : I can survive using the BaseX server. It is >>>> only hardening dev / debug, since I don't know how to trace using BAseX >>>> server (fn:trace seems not to output anything using the basex server, maybe >>>> I missed something here ?). >>>> >>>> Cheers >>>> >>>> >>>> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >>>> >>>>> Hi Jean-Marc, >>>>> >>>>> > I guess that it might be due to the fact that I don't know how to >>>>> include >>>>> > multiple jar while using with eclipse. I tried to go to >>>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath >>>>> > {BaseXDirectory}\lib\*, but it does not work. >>>>> >>>>> You will probably have to include the libraries as follows: >>>>> >>>>> Project → Properties → Java Build Path → >>>>> Libraries → Add JARs... >>>>> >>>>> Hope this helps, >>>>> Christian >>>>> >>>>> >>>>> >>>>> > >>>>> > Maybe somebody already met this small issue before ? >>>>> > >>>>> > Thanks for your answer, >>>>> > >>>>> > cheers >>>>> >>>> >>>> >>> >> >
CG
Christian Grün12 May 2015 12:50 #
Hm, this is probably something we cannot control. The stack trace points to the JLine library; maybe you can exclude this library?
Quoted text · jean-marc Mercier · 93 lines
On Tue, May 12, 2015 at 12:27 PM, jean-marc Mercier <jeanmarc.mercier at gmail.com> wrote: > > Well I tried to add all JAR contained in the BaseX\lib in this windows. If I try to launch a XQUERY script with this running configuration, here is the result > > [ERROR] Terminal initialization failed; falling back to unsupported > java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32 > at org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50) > at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:204) > at jline.WindowsTerminal.init(WindowsTerminal.java:82) > at jline.TerminalFactory.create(TerminalFactory.java:101) > at jline.TerminalFactory.get(TerminalFactory.java:158) > at jline.console.ConsoleReader.<init>(ConsoleReader.java:229) > at jline.console.ConsoleReader.<init>(ConsoleReader.java:221) > at jline.console.ConsoleReader.<init>(ConsoleReader.java:209) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) > at java.lang.reflect.Constructor.newInstance(Unknown Source) > at java.lang.Class.newInstance(Unknown Source) > at org.basex.util.ConsoleReader$JLineConsoleReader.<init>(ConsoleReader.java:132) > at org.basex.util.ConsoleReader.get(ConsoleReader.java:57) > at org.basex.BaseX.console(BaseX.java:183) > at org.basex.BaseX.<init>(BaseX.java:169) > at org.basex.BaseX.main(BaseX.java:42) > > > 2015-05-12 12:07 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >> Just a guess, but have you already tried to add all the additional BaseX libraries in this window (Add JARs...)? >> >> >> On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier <jeanmarc.mercier at gmail.com> wrote: >>> >>> Christian, >>> >>> Hi. I confess that I don't know how to set a JAVA project running XQUERY with Basex interpreter under eclipse. >>> I just know how to set an XQUERY project as pointed in http://docs.basex.org/wiki/Integrating_Eclipse. >>> >>> Maybe a possibility to avoid changing my whole project setting could be use an alternative Eclipse running Configuration ? >>> >>> >>> I've tried but didn't find out so far how to set it properly. >>> >>> >>> 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >>>> >>>> You may need to create a Java project and try it again. Please note that, from the Eclipse perspective, the XQuery processor of BaseX is a Java application. >>>> >>>> >>>> >>>> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier <jeanmarc.mercier at gmail.com> wrote: >>>>> >>>>> Christian, >>>>> >>>>> Hello. Thx for your answer. I've tried your suggestion, but I can't set the Java Build path using Eclipse/ Project / Properties (my IDE is eclipse together with BaseX Interpreter) : >>>>> >>>>> This is a minor issue : I can survive using the BaseX server. It is only hardening dev / debug, since I don't know how to trace using BAseX server (fn:trace seems not to output anything using the basex server, maybe I missed something here ?). >>>>> >>>>> Cheers >>>>> >>>>> >>>>> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >>>>>> >>>>>> Hi Jean-Marc, >>>>>> >>>>>> > I guess that it might be due to the fact that I don't know how to include >>>>>> > multiple jar while using with eclipse. I tried to go to >>>>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath >>>>>> > {BaseXDirectory}\lib\*, but it does not work. >>>>>> >>>>>> You will probably have to include the libraries as follows: >>>>>> >>>>>> Project → Properties → Java Build Path → >>>>>> Libraries → Add JARs... >>>>>> >>>>>> Hope this helps, >>>>>> Christian >>>>>> >>>>>> >>>>>> >>>>>> > >>>>>> > Maybe somebody already met this small issue before ? >>>>>> > >>>>>> > Thanks for your answer, >>>>>> > >>>>>> > cheers >>>>> >>>>> >>>> >>> >> >
JM
jean-marc Mercier12 May 2015 13:05 #
I excluded JLine and we are getting closer : this now pop up the BaseX interpreter command line in the console application (see end of mail). I've tried to pass the Program argument EXECUTE ${query_file} as arguments, replies [XPDY0002] EXECUTE: no context value bound [image: Images intégrées 1] BaseX 8.0 beta [Standalone] Try help to get more information.
Quoted text · Christian Grün · 1 line
> help
Try HELP [...] to get info on a specific command. ADD (TO [path]) [input] Add resource to database. ALTER [DATABASE|PASSWORD|USER] [...] Alter database or user data. CHECK [input] Open or create database. CLOSE Close current database. COPY [name] [newname] Copy database. CREATE [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Create database, index, user, backup or event. DELETE [path] Delete resources from database. DROP [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Drop database, index, user, backup or event. EXIT Exit application. EXPORT [path] Export database to XML. FIND [keywords] Run a keyword query. FLUSH Flush database. GET [option] Show global option. GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [pattern]) TO [user] Grant user permissions. HELP ([command]) Get help on BaseX commands. INFO ([DATABASE|INDEX|STORAGE]) Show information on current database. INSPECT Perform integrity checks. KILL [name] Kill user sessions. LIST ([name] ([path])) List databases or resources of database. OPEN [name] ([path]) Open database. OPTIMIZE (ALL) Optimize the database. PASSWORD ([password]) Change password. QUIT Exit application. RENAME [path] [newpath] Rename resources in database. REPLACE [path] [input] Replace resources in database. REPO [DELETE|INSTALL|LIST] Install, delete or list packages. RESTORE [name-(date)] Restore database. RETRIEVE [path] Retrieve raw data. RUN [path] Run query or command script. EXECUTE [input] Execute command script. SET [option] ([value]) Set global options. SHOW [BACKUPS|EVENTS|SESSIONS|USERS] Show server information. STORE (TO [path]) [input] Store raw data. TEST [path] Run XQUnit tests. XQUERY [query] Run XQuery.
Quoted text · Christian Grün · 1 line
>
2015-05-12 12:50 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 119 lines
> Hm, this is probably something we cannot control. The stack trace > points to the JLine library; maybe you can exclude this library? > > > On Tue, May 12, 2015 at 12:27 PM, jean-marc Mercier > <jeanmarc.mercier at gmail.com> wrote: > > > > Well I tried to add all JAR contained in the BaseX\lib in this windows. > If I try to launch a XQUERY script with this running configuration, here is > the result > > > > [ERROR] Terminal initialization failed; falling back to unsupported > > java.lang.NoClassDefFoundError: Could not initialize class > org.fusesource.jansi.internal.Kernel32 > > at > org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50) > > at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:204) > > at jline.WindowsTerminal.init(WindowsTerminal.java:82) > > at jline.TerminalFactory.create(TerminalFactory.java:101) > > at jline.TerminalFactory.get(TerminalFactory.java:158) > > at jline.console.ConsoleReader.<init>(ConsoleReader.java:229) > > at jline.console.ConsoleReader.<init>(ConsoleReader.java:221) > > at jline.console.ConsoleReader.<init>(ConsoleReader.java:209) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) > > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown > Source) > > at java.lang.reflect.Constructor.newInstance(Unknown Source) > > at java.lang.Class.newInstance(Unknown Source) > > at > org.basex.util.ConsoleReader$JLineConsoleReader.<init>(ConsoleReader.java:132) > > at org.basex.util.ConsoleReader.get(ConsoleReader.java:57) > > at org.basex.BaseX.console(BaseX.java:183) > > at org.basex.BaseX.<init>(BaseX.java:169) > > at org.basex.BaseX.main(BaseX.java:42) > > > > > > 2015-05-12 12:07 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: > >> > >> Just a guess, but have you already tried to add all the additional > BaseX libraries in this window (Add JARs...)? > >> > >> > >> On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >>> > >>> Christian, > >>> > >>> Hi. I confess that I don't know how to set a JAVA project running > XQUERY with Basex interpreter under eclipse. > >>> I just know how to set an XQUERY project as pointed in > http://docs.basex.org/wiki/Integrating_Eclipse. > >>> > >>> Maybe a possibility to avoid changing my whole project setting could > be use an alternative Eclipse running Configuration ? > >>> > >>> > >>> I've tried but didn't find out so far how to set it properly. > >>> > >>> > >>> 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: > >>>> > >>>> You may need to create a Java project and try it again. Please note > that, from the Eclipse perspective, the XQuery processor of BaseX is a Java > application. > >>>> > >>>> > >>>> > >>>> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >>>>> > >>>>> Christian, > >>>>> > >>>>> Hello. Thx for your answer. I've tried your suggestion, but I can't > set the Java Build path using Eclipse/ Project / Properties (my IDE is > eclipse together with BaseX Interpreter) : > >>>>> > >>>>> This is a minor issue : I can survive using the BaseX server. It is > only hardening dev / debug, since I don't know how to trace using BAseX > server (fn:trace seems not to output anything using the basex server, maybe > I missed something here ?). > >>>>> > >>>>> Cheers > >>>>> > >>>>> > >>>>> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com > >: > >>>>>> > >>>>>> Hi Jean-Marc, > >>>>>> > >>>>>> > I guess that it might be due to the fact that I don't know how to > include > >>>>>> > multiple jar while using with eclipse. I tried to go to > >>>>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath > >>>>>> > {BaseXDirectory}\lib\*, but it does not work. > >>>>>> > >>>>>> You will probably have to include the libraries as follows: > >>>>>> > >>>>>> Project → Properties → Java Build Path → > >>>>>> Libraries → Add JARs... > >>>>>> > >>>>>> Hope this helps, > >>>>>> Christian > >>>>>> > >>>>>> > >>>>>> > >>>>>> > > >>>>>> > Maybe somebody already met this small issue before ? > >>>>>> > > >>>>>> > Thanks for your answer, > >>>>>> > > >>>>>> > cheers > >>>>> > >>>>> > >>>> > >>> > >> > > >
CG
Christian Grün12 May 2015 13:21 #
Quoted text · jean-marc Mercier · 1 line
> I've tried to pass the Program argument EXECUTE ${query_file} as arguments, replies [XPDY0002] EXECUTE: no context value bound
You'd need to use the -c flag if you want to launch BaseX commands such as EXECUTE. What happens if you simply get rid of the EXECUTE string? See the documentation for more info [1]... Christian [1] http://docs.basex.org/wiki/Command-Line_Options#Standalone What's the content of your command script?
Quoted text · jean-marc Mercier · 184 lines
> > > > > > BaseX 8.0 beta [Standalone] > Try help to get more information. > > > help > Try HELP [...] to get info on a specific command. > > ADD (TO [path]) [input] > Add resource to database. > ALTER [DATABASE|PASSWORD|USER] [...] > Alter database or user data. > CHECK [input] > Open or create database. > CLOSE > Close current database. > COPY [name] [newname] > Copy database. > CREATE [BACKUP|DATABASE|EVENT|INDEX|USER] [...] > Create database, index, user, backup or event. > DELETE [path] > Delete resources from database. > DROP [BACKUP|DATABASE|EVENT|INDEX|USER] [...] > Drop database, index, user, backup or event. > EXIT > Exit application. > EXPORT [path] > Export database to XML. > FIND [keywords] > Run a keyword query. > FLUSH > Flush database. > GET [option] > Show global option. > GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [pattern]) TO [user] > Grant user permissions. > HELP ([command]) > Get help on BaseX commands. > INFO ([DATABASE|INDEX|STORAGE]) > Show information on current database. > INSPECT > Perform integrity checks. > KILL [name] > Kill user sessions. > LIST ([name] ([path])) > List databases or resources of database. > OPEN [name] ([path]) > Open database. > OPTIMIZE (ALL) > Optimize the database. > PASSWORD ([password]) > Change password. > QUIT > Exit application. > RENAME [path] [newpath] > Rename resources in database. > REPLACE [path] [input] > Replace resources in database. > REPO [DELETE|INSTALL|LIST] > Install, delete or list packages. > RESTORE [name-(date)] > Restore database. > RETRIEVE [path] > Retrieve raw data. > RUN [path] > Run query or command script. > EXECUTE [input] > Execute command script. > SET [option] ([value]) > Set global options. > SHOW [BACKUPS|EVENTS|SESSIONS|USERS] > Show server information. > STORE (TO [path]) [input] > Store raw data. > TEST [path] > Run XQUnit tests. > XQUERY [query] > Run XQuery. > > > > 2015-05-12 12:50 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >> Hm, this is probably something we cannot control. The stack trace >> points to the JLine library; maybe you can exclude this library? >> >> >> On Tue, May 12, 2015 at 12:27 PM, jean-marc Mercier >> <jeanmarc.mercier at gmail.com> wrote: >> > >> > Well I tried to add all JAR contained in the BaseX\lib in this windows. If I try to launch a XQUERY script with this running configuration, here is the result >> > >> > [ERROR] Terminal initialization failed; falling back to unsupported >> > java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32 >> > at org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50) >> > at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:204) >> > at jline.WindowsTerminal.init(WindowsTerminal.java:82) >> > at jline.TerminalFactory.create(TerminalFactory.java:101) >> > at jline.TerminalFactory.get(TerminalFactory.java:158) >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:229) >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:221) >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:209) >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) >> > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) >> > at java.lang.reflect.Constructor.newInstance(Unknown Source) >> > at java.lang.Class.newInstance(Unknown Source) >> > at org.basex.util.ConsoleReader$JLineConsoleReader.<init>(ConsoleReader.java:132) >> > at org.basex.util.ConsoleReader.get(ConsoleReader.java:57) >> > at org.basex.BaseX.console(BaseX.java:183) >> > at org.basex.BaseX.<init>(BaseX.java:169) >> > at org.basex.BaseX.main(BaseX.java:42) >> > >> > >> > 2015-05-12 12:07 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >> >> >> Just a guess, but have you already tried to add all the additional BaseX libraries in this window (Add JARs...)? >> >> >> >> >> >> On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier <jeanmarc.mercier at gmail.com> wrote: >> >>> >> >>> Christian, >> >>> >> >>> Hi. I confess that I don't know how to set a JAVA project running XQUERY with Basex interpreter under eclipse. >> >>> I just know how to set an XQUERY project as pointed in http://docs.basex.org/wiki/Integrating_Eclipse. >> >>> >> >>> Maybe a possibility to avoid changing my whole project setting could be use an alternative Eclipse running Configuration ? >> >>> >> >>> >> >>> I've tried but didn't find out so far how to set it properly. >> >>> >> >>> >> >>> 2015-05-12 11:31 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >>>> >> >>>> You may need to create a Java project and try it again. Please note that, from the Eclipse perspective, the XQuery processor of BaseX is a Java application. >> >>>> >> >>>> >> >>>> >> >>>> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier <jeanmarc.mercier at gmail.com> wrote: >> >>>>> >> >>>>> Christian, >> >>>>> >> >>>>> Hello. Thx for your answer. I've tried your suggestion, but I can't set the Java Build path using Eclipse/ Project / Properties (my IDE is eclipse together with BaseX Interpreter) : >> >>>>> >> >>>>> This is a minor issue : I can survive using the BaseX server. It is only hardening dev / debug, since I don't know how to trace using BAseX server (fn:trace seems not to output anything using the basex server, maybe I missed something here ?). >> >>>>> >> >>>>> Cheers >> >>>>> >> >>>>> >> >>>>> 2015-05-11 22:05 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: >> >>>>>> >> >>>>>> Hi Jean-Marc, >> >>>>>> >> >>>>>> > I guess that it might be due to the fact that I don't know how to include >> >>>>>> > multiple jar while using with eclipse. I tried to go to >> >>>>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath >> >>>>>> > {BaseXDirectory}\lib\*, but it does not work. >> >>>>>> >> >>>>>> You will probably have to include the libraries as follows: >> >>>>>> >> >>>>>> Project → Properties → Java Build Path → >> >>>>>> Libraries → Add JARs... >> >>>>>> >> >>>>>> Hope this helps, >> >>>>>> Christian >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> > >> >>>>>> > Maybe somebody already met this small issue before ? >> >>>>>> > >> >>>>>> > Thanks for your answer, >> >>>>>> > >> >>>>>> > cheers >> >>>>> >> >>>>> >> >>>> >> >>> >> >> >> > > >
JM
jean-marc Mercier12 May 2015 13:52 #
Christian, thx ! Now it works finely :) My command script connect to a mysql server and dump a sql database to a basex (graph) database. To keep record of this ECLIPSE / XQUERY setting (see http://docs.basex.org/wiki/Integrating_Eclipse) for standalone BaseX : 1- set a new Running Application as JAVA Application, as Mainclass pointing to org.basex.BaseX [image: Images intégrées 1] 2) Put all BAsex JAR and other needed JAR into classpath, and exlude JLIne JAR library [image: Images intégrées 2] 3) Set as argument your XQUERY File [image: Images intégrées 3] and run. That's all ! 2015-05-12 13:21 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 224 lines
> > I've tried to pass the Program argument EXECUTE ${query_file} as > arguments, replies [XPDY0002] EXECUTE: no context value bound > > You'd need to use the -c flag if you want to launch BaseX commands > such as EXECUTE. What happens if you simply get rid of the EXECUTE > string? See the documentation for more info [1]... > > Christian > > [1] http://docs.basex.org/wiki/Command-Line_Options#Standalone > > > What's the content of your command script? > > > > > > > > > > > > > BaseX 8.0 beta [Standalone] > > Try help to get more information. > > > > > help > > Try HELP [...] to get info on a specific command. > > > > ADD (TO [path]) [input] > > Add resource to database. > > ALTER [DATABASE|PASSWORD|USER] [...] > > Alter database or user data. > > CHECK [input] > > Open or create database. > > CLOSE > > Close current database. > > COPY [name] [newname] > > Copy database. > > CREATE [BACKUP|DATABASE|EVENT|INDEX|USER] [...] > > Create database, index, user, backup or event. > > DELETE [path] > > Delete resources from database. > > DROP [BACKUP|DATABASE|EVENT|INDEX|USER] [...] > > Drop database, index, user, backup or event. > > EXIT > > Exit application. > > EXPORT [path] > > Export database to XML. > > FIND [keywords] > > Run a keyword query. > > FLUSH > > Flush database. > > GET [option] > > Show global option. > > GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [pattern]) TO [user] > > Grant user permissions. > > HELP ([command]) > > Get help on BaseX commands. > > INFO ([DATABASE|INDEX|STORAGE]) > > Show information on current database. > > INSPECT > > Perform integrity checks. > > KILL [name] > > Kill user sessions. > > LIST ([name] ([path])) > > List databases or resources of database. > > OPEN [name] ([path]) > > Open database. > > OPTIMIZE (ALL) > > Optimize the database. > > PASSWORD ([password]) > > Change password. > > QUIT > > Exit application. > > RENAME [path] [newpath] > > Rename resources in database. > > REPLACE [path] [input] > > Replace resources in database. > > REPO [DELETE|INSTALL|LIST] > > Install, delete or list packages. > > RESTORE [name-(date)] > > Restore database. > > RETRIEVE [path] > > Retrieve raw data. > > RUN [path] > > Run query or command script. > > EXECUTE [input] > > Execute command script. > > SET [option] ([value]) > > Set global options. > > SHOW [BACKUPS|EVENTS|SESSIONS|USERS] > > Show server information. > > STORE (TO [path]) [input] > > Store raw data. > > TEST [path] > > Run XQUnit tests. > > XQUERY [query] > > Run XQuery. > > > > > > > 2015-05-12 12:50 GMT+02:00 Christian Grün <christian.gruen at gmail.com>: > >> > >> Hm, this is probably something we cannot control. The stack trace > >> points to the JLine library; maybe you can exclude this library? > >> > >> > >> On Tue, May 12, 2015 at 12:27 PM, jean-marc Mercier > >> <jeanmarc.mercier at gmail.com> wrote: > >> > > >> > Well I tried to add all JAR contained in the BaseX\lib in this > windows. If I try to launch a XQUERY script with this running > configuration, here is the result > >> > > >> > [ERROR] Terminal initialization failed; falling back to unsupported > >> > java.lang.NoClassDefFoundError: Could not initialize class > org.fusesource.jansi.internal.Kernel32 > >> > at > org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50) > >> > at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:204) > >> > at jline.WindowsTerminal.init(WindowsTerminal.java:82) > >> > at jline.TerminalFactory.create(TerminalFactory.java:101) > >> > at jline.TerminalFactory.get(TerminalFactory.java:158) > >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:229) > >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:221) > >> > at jline.console.ConsoleReader.<init>(ConsoleReader.java:209) > >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > >> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > Source) > >> > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown > Source) > >> > at java.lang.reflect.Constructor.newInstance(Unknown Source) > >> > at java.lang.Class.newInstance(Unknown Source) > >> > at > org.basex.util.ConsoleReader$JLineConsoleReader.<init>(ConsoleReader.java:132) > >> > at org.basex.util.ConsoleReader.get(ConsoleReader.java:57) > >> > at org.basex.BaseX.console(BaseX.java:183) > >> > at org.basex.BaseX.<init>(BaseX.java:169) > >> > at org.basex.BaseX.main(BaseX.java:42) > >> > > >> > > >> > 2015-05-12 12:07 GMT+02:00 Christian Grün <christian.gruen at gmail.com > >: > >> >> > >> >> Just a guess, but have you already tried to add all the additional > BaseX libraries in this window (Add JARs...)? > >> >> > >> >> > >> >> On Tue, May 12, 2015 at 12:01 PM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >> >>> > >> >>> Christian, > >> >>> > >> >>> Hi. I confess that I don't know how to set a JAVA project running > XQUERY with Basex interpreter under eclipse. > >> >>> I just know how to set an XQUERY project as pointed in > http://docs.basex.org/wiki/Integrating_Eclipse. > >> >>> > >> >>> Maybe a possibility to avoid changing my whole project setting > could be use an alternative Eclipse running Configuration ? > >> >>> > >> >>> > >> >>> I've tried but didn't find out so far how to set it properly. > >> >>> > >> >>> > >> >>> 2015-05-12 11:31 GMT+02:00 Christian Grün < > christian.gruen at gmail.com>: > >> >>>> > >> >>>> You may need to create a Java project and try it again. Please > note that, from the Eclipse perspective, the XQuery processor of BaseX is a > Java application. > >> >>>> > >> >>>> > >> >>>> > >> >>>> On Tue, May 12, 2015 at 11:28 AM, jean-marc Mercier < > jeanmarc.mercier at gmail.com> wrote: > >> >>>>> > >> >>>>> Christian, > >> >>>>> > >> >>>>> Hello. Thx for your answer. I've tried your suggestion, but I > can't set the Java Build path using Eclipse/ Project / Properties (my IDE > is eclipse together with BaseX Interpreter) : > >> >>>>> > >> >>>>> This is a minor issue : I can survive using the BaseX server. It > is only hardening dev / debug, since I don't know how to trace using BAseX > server (fn:trace seems not to output anything using the basex server, maybe > I missed something here ?). > >> >>>>> > >> >>>>> Cheers > >> >>>>> > >> >>>>> > >> >>>>> 2015-05-11 22:05 GMT+02:00 Christian Grün < > christian.gruen at gmail.com>: > >> >>>>>> > >> >>>>>> Hi Jean-Marc, > >> >>>>>> > >> >>>>>> > I guess that it might be due to the fact that I don't know how > to include > >> >>>>>> > multiple jar while using with eclipse. I tried to go to > >> >>>>>> > Windows/Preferences/XQUERY/Interpreters and set -classpath > >> >>>>>> > {BaseXDirectory}\lib\*, but it does not work. > >> >>>>>> > >> >>>>>> You will probably have to include the libraries as follows: > >> >>>>>> > >> >>>>>> Project → Properties → Java Build Path → > >> >>>>>> Libraries → Add JARs... > >> >>>>>> > >> >>>>>> Hope this helps, > >> >>>>>> Christian > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > > >> >>>>>> > Maybe somebody already met this small issue before ? > >> >>>>>> > > >> >>>>>> > Thanks for your answer, > >> >>>>>> > > >> >>>>>> > cheers > >> >>>>> > >> >>>>> > >> >>>> > >> >>> > >> >> > >> > > > > > >

⚡Generated with XQuery