Trying to get started with IntelliJ and BaseX
Tuesday, 17 February 2015 · 6 messages · last reply 25 Feb 2015
BD
Bridger Dyson-Smith17 Feb 2015 18:14 #
Hi all,
I'm unsure of how many IntelliJ users there are here, but I'm hitting some embarrassingly simple problems and I hope someone can provide some guidance.
I'm trying to use BaseX 8.0 as a data source for a simple query [1]. However I'm unable to apply the query against a database.
I've added BaseX as an XQuery data source:
*File* > *Settings* > *Other Settings* > *XQuery Data Sources* > "*+*" (*add a data source*) >
Name: BaseX80-tei
Host: localhost
Port: 1984
Database name: tei-dump
Username: admin
Password: admin
I've added a *Run* *Configuration*:
Run > Edit Configurations > "+" (add a configuration) > XQuery Main Module
Quoted text · 1 line
>
Name: name-query
Configuration:
Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq Data source: BaseX80-tei (from above)
Java Configuration:
VM options: blank
Program arguments: blank
Working directory: /usr/home/bridger/src/basex/80/basex
Use classpath of module: basex
When I try to run the configuration, I get a Java exception [2].
I'm fairly sure that this is user/operator error, but I'm not quite sure what I've done wrong. Thank you for reading.
Cheers,
Bridger
[1] names.xq
<results>
{ for $n in //*:name
return $n }
</results>[2] Java exception:
/usr/local/openjdk7/bin/java -Didea.launcher.port=7532
-Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin
-Dfile.encoding=UTF-8 -classpath
/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain
org.intellij.xquery.runner.rt.XQueryRunnerApp
/usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml Exception in thread "main" javax.xml.xquery.XQException:
XQJNC001 - Connection refused
Root Cause:
java.net.ConnectException: Connection refused
at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) at
org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) at
org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) at
org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) at
org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579)
at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) at
org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) at
org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) at
org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) at
org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
MG
Maximilian Gärber17 Feb 2015 19:27 #
Just to be sure: did you start the Server before running the query?
Quoted text · Bridger Dyson-Smith · 100 lines
Am 17.02.2015 17:14 schrieb "Bridger Dyson-Smith" <bdysonsmith at gmail.com>: > Hi all, > > I'm unsure of how many IntelliJ users there are here, but I'm hitting some > embarrassingly simple problems and I hope someone can provide some guidance. > > I'm trying to use BaseX 8.0 as a data source for a simple query [1]. > However I'm unable to apply the query against a database. > > I've added BaseX as an XQuery data source: > *File* > *Settings* > *Other Settings* > *XQuery Data Sources* > "*+*" (*add > a data source*) > > Name: BaseX80-tei > Host: localhost > Port: 1984 > Database name: tei-dump > Username: admin > Password: admin > > I've added a *Run* *Configuration*: > Run > Edit Configurations > "+" (add a configuration) > XQuery Main Module > > > Name: name-query > Configuration: > Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq > Data source: BaseX80-tei (from above) > Java Configuration: > VM options: blank > Program arguments: blank > Working directory: /usr/home/bridger/src/basex/80/basex > Use classpath of module: basex > > When I try to run the configuration, I get a Java exception [2]. > > I'm fairly sure that this is user/operator error, but I'm not quite sure > what I've done wrong. Thank you for reading. > > Cheers, > Bridger > > [1] names.xq > <results> > { for $n in //*:name > return $n } > </results> > > [2] Java exception: > /usr/local/openjdk7/bin/java -Didea.launcher.port=7532 > -Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin > -Dfile.encoding=UTF-8 -classpath > /usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar > com.intellij.rt.execution.application.AppMain > org.intellij.xquery.runner.rt.XQueryRunnerApp > /usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml > Exception in thread "main" javax.xml.xquery.XQException: > XQJNC001 - Connection refused > Root Cause: > java.net.ConnectException: Connection refused > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > at > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > at > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > at > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > at > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > at java.net.PlainSocketImpl.socketConnect(Native Method) > at > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > at > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > at > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > at java.net.Socket.connect(Socket.java:579) > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > at > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > at > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > at > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > at > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) >
DK
Dirk Kirsten17 Feb 2015 19:37 #
Hi Bridger,
I am not sure if this is going to work, at least for the moment. So I guess you use the plugin by Grzegorz Ligas' plugin, don't you? This currently uses the BaseX XQJ 1.3 bindings, which I think does not work with BaseX 8. We did change our wire protocol slightly for a more secure authentication, and I think for this to work you will need the XQJ driver version 1.4.
Although I didn't check any of this information, so I might be wrong.
Cheers,
Dirk
Quoted text · Maximilian Gärber · 104 lines
On 02/17/2015 07:27 PM, Maximilian Gärber wrote: > Just to be sure: did you start the Server before running the query? > Am 17.02.2015 17:14 schrieb "Bridger Dyson-Smith" <bdysonsmith at gmail.com>: > > > Hi all, > > > > I'm unsure of how many IntelliJ users there are here, but I'm hitting some > > embarrassingly simple problems and I hope someone can provide some guidance. > > > > I'm trying to use BaseX 8.0 as a data source for a simple query [1]. > > However I'm unable to apply the query against a database. > > > > I've added BaseX as an XQuery data source: > > *File* > *Settings* > *Other Settings* > *XQuery Data Sources* > "*+*" (*add > > a data source*) > > > Name: BaseX80-tei > > Host: localhost > > Port: 1984 > > Database name: tei-dump > > Username: admin > > Password: admin > > > > I've added a *Run* *Configuration*: > > Run > Edit Configurations > "+" (add a configuration) > XQuery Main Module > >> > > Name: name-query > > Configuration: > > Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq > > Data source: BaseX80-tei (from above) > > Java Configuration: > > VM options: blank > > Program arguments: blank > > Working directory: /usr/home/bridger/src/basex/80/basex > > Use classpath of module: basex > > > > When I try to run the configuration, I get a Java exception [2]. > > > > I'm fairly sure that this is user/operator error, but I'm not quite sure > > what I've done wrong. Thank you for reading. > > > > Cheers, > > Bridger > > > > [1] names.xq > > <results> > > { for $n in //*:name > > return $n } > > </results> > > > > [2] Java exception: > > /usr/local/openjdk7/bin/java -Didea.launcher.port=7532 > > -Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin > > -Dfile.encoding=UTF-8 -classpath > > /usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar > > com.intellij.rt.execution.application.AppMain > > org.intellij.xquery.runner.rt.XQueryRunnerApp > > /usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml > > Exception in thread "main" javax.xml.xquery.XQException: > > XQJNC001 - Connection refused > > Root Cause: > > java.net.ConnectException: Connection refused > > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > > at > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > > at > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > > at > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > > at > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > > at > > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > > at > > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > > at java.net.Socket.connect(Socket.java:579) > > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > > at > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > > at > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > > at > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > > at > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > > >
--
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
| Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
CG
Christian Grün17 Feb 2015 21:13 #
Hi Bridger,
Dirk's comment sounds pretty reasonable to me. I have just added an issue about that in the IntelliJ-XQuery GitHub repository [1].
Regards,
Christian
[1] https://github.com/ligasgr/intellij-xquery/issues/120
Quoted text · Dirk Kirsten · 122 lines
On Tue, Feb 17, 2015 at 7:37 PM, Dirk Kirsten <dk at basex.org> wrote: > Hi Bridger, > > I am not sure if this is going to work, at least for the moment. So I guess you use the plugin by Grzegorz Ligas' plugin, don't you? This currently uses the BaseX XQJ 1.3 bindings, which I think does not work with BaseX 8. We did change our wire protocol slightly for a more secure authentication, and I think for this to work you will need the XQJ driver version 1.4. > > Although I didn't check any of this information, so I might be wrong. > > Cheers, > Dirk > > On 02/17/2015 07:27 PM, Maximilian Gärber wrote: >> Just to be sure: did you start the Server before running the query? >> Am 17.02.2015 17:14 schrieb "Bridger Dyson-Smith" <bdysonsmith at gmail.com>: >> >> > Hi all, >> > >> > I'm unsure of how many IntelliJ users there are here, but I'm hitting some >> > embarrassingly simple problems and I hope someone can provide some guidance. >> > >> > I'm trying to use BaseX 8.0 as a data source for a simple query [1]. >> > However I'm unable to apply the query against a database. >> > >> > I've added BaseX as an XQuery data source: >> > *File* > *Settings* > *Other Settings* > *XQuery Data Sources* > "*+*" (*add >> > a data source*) > >> > Name: BaseX80-tei >> > Host: localhost >> > Port: 1984 >> > Database name: tei-dump >> > Username: admin >> > Password: admin >> > >> > I've added a *Run* *Configuration*: >> > Run > Edit Configurations > "+" (add a configuration) > XQuery Main Module >> >> >> > Name: name-query >> > Configuration: >> > Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq >> > Data source: BaseX80-tei (from above) >> > Java Configuration: >> > VM options: blank >> > Program arguments: blank >> > Working directory: /usr/home/bridger/src/basex/80/basex >> > Use classpath of module: basex >> > >> > When I try to run the configuration, I get a Java exception [2]. >> > >> > I'm fairly sure that this is user/operator error, but I'm not quite sure >> > what I've done wrong. Thank you for reading. >> > >> > Cheers, >> > Bridger >> > >> > [1] names.xq >> > <results> >> > { for $n in //*:name >> > return $n } >> > </results> >> > >> > [2] Java exception: >> > /usr/local/openjdk7/bin/java -Didea.launcher.port=7532 >> > -Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin >> > -Dfile.encoding=UTF-8 -classpath >> > /usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar >> > com.intellij.rt.execution.application.AppMain >> > org.intellij.xquery.runner.rt.XQueryRunnerApp >> > /usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml >> > Exception in thread "main" javax.xml.xquery.XQException: >> > XQJNC001 - Connection refused >> > Root Cause: >> > java.net.ConnectException: Connection refused >> > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) >> > at >> > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) >> > at >> > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) >> > at >> > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) >> > at >> > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> > at >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> > at >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> > at java.lang.reflect.Method.invoke(Method.java:606) >> > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) >> > at java.net.PlainSocketImpl.socketConnect(Native Method) >> > at >> > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) >> > at >> > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) >> > at >> > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) >> > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) >> > at java.net.Socket.connect(Socket.java:579) >> > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) >> > at >> > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) >> > at >> > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) >> > at >> > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) >> > at >> > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> > at >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> > at >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> > at java.lang.reflect.Method.invoke(Method.java:606) >> > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) >> > >> > > -- > Dirk Kirsten, BaseX GmbH, http://basexgmbh.de > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 >
BD
Hi Maximilian and Dirk,
Thank you both for your time!
@Maxmilian - I've tried starting the server externally; e.g. cd path/to/basex/ && ./bin/basexserver but I'm still getting an error: "Root cause: java.io.IOException: Access Denied" that goes on and on.
@Dirk - I should have mentioned that in my initial post that I am using Grzegorz
Ligas' plugin. I've actually looked at his github repository earlier today and may try to rebuild it with BaseX 8.0. I'm even less familiar with Gradle than I am with Maven/Ant, so it will be an adventure.
I'll post back if I'm able to make any progress.
Cheers,
Bridger
Quoted text · Dirk Kirsten · 153 lines
On Tue, Feb 17, 2015 at 1:37 PM, Dirk Kirsten <dk at basex.org> wrote: > Hi Bridger, > > I am not sure if this is going to work, at least for the moment. So I > guess you use the plugin by Grzegorz Ligas' plugin, don't you? This > currently uses the BaseX XQJ 1.3 bindings, which I think does not work with > BaseX 8. We did change our wire protocol slightly for a more secure > authentication, and I think for this to work you will need the XQJ driver > version 1.4. > > Although I didn't check any of this information, so I might be wrong. > > Cheers, > Dirk > > On 02/17/2015 07:27 PM, Maximilian Gärber wrote: > > Just to be sure: did you start the Server before running the query? > > Am 17.02.2015 17:14 schrieb "Bridger Dyson-Smith" < > bdysonsmith at gmail.com>: > > > > > Hi all, > > > > > > I'm unsure of how many IntelliJ users there are here, but I'm hitting > some > > > embarrassingly simple problems and I hope someone can provide some > guidance. > > > > > > I'm trying to use BaseX 8.0 as a data source for a simple query [1]. > > > However I'm unable to apply the query against a database. > > > > > > I've added BaseX as an XQuery data source: > > > *File* > *Settings* > *Other Settings* > *XQuery Data Sources* > "*+*" > (*add > > > a data source*) > > > > Name: BaseX80-tei > > > Host: localhost > > > Port: 1984 > > > Database name: tei-dump > > > Username: admin > > > Password: admin > > > > > > I've added a *Run* *Configuration*: > > > Run > Edit Configurations > "+" (add a configuration) > XQuery Main > Module > > >> > > > Name: name-query > > > Configuration: > > > Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq > > > Data source: BaseX80-tei (from above) > > > Java Configuration: > > > VM options: blank > > > Program arguments: blank > > > Working directory: /usr/home/bridger/src/basex/80/basex > > > Use classpath of module: basex > > > > > > When I try to run the configuration, I get a Java exception [2]. > > > > > > I'm fairly sure that this is user/operator error, but I'm not quite > sure > > > what I've done wrong. Thank you for reading. > > > > > > Cheers, > > > Bridger > > > > > > [1] names.xq > > > <results> > > > { for $n in //*:name > > > return $n } > > > </results> > > > > > > [2] Java exception: > > > /usr/local/openjdk7/bin/java -Didea.launcher.port=7532 > > > -Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin > > > -Dfile.encoding=UTF-8 -classpath > > > > /usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar > > > com.intellij.rt.execution.application.AppMain > > > org.intellij.xquery.runner.rt.XQueryRunnerApp > > > > /usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml > > > Exception in thread "main" javax.xml.xquery.XQException: > > > XQJNC001 - Connection refused > > > Root Cause: > > > java.net.ConnectException: Connection refused > > > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > > > at > > > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > > > at > > > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > > > at > > > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > > > at > > > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > at > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > > at > > > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > > > at > > > > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > > > at > > > > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > > > at java.net.Socket.connect(Socket.java:579) > > > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > > > at > > > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > > > at > > > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > > > at > > > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > > > at > > > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > at > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > > > > > > > -- > Dirk Kirsten, BaseX GmbH, http://basexgmbh.de > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > >
BD
Hi all,
I wanted to post back with an attempt at fixing this, but I'm afraid I don't have anything successful to report. I forked ligasgr's repository [1] and tried to make what seemed to be the necessary changes to update things but I run into problems when I try to run some of the gradle commands.
Running intellij-xquery: [allTests] and intellij-xquery: [build] both fail with missing symbol errors [2].
I'll post to ligasgr's issues page and see if he's able to help sort through my mess. @Christian, thank you for starting the issue - it's been interesting trying to sort through these issues to see if I could get things working.
Best,
Bridger
[1] https://github.com/CanOfBees/intellij-xquery
[2] I won't paste the entire error in here, but things seem to fly off the rails with:
/usr/home/bridger/src/intellij-xquery/src/main/java/org/intellij/xquery/usage/XQueryFindUsageProvider.java:59: cannot find symbol
symbol : variable FIND_OTHER_USAGES
location: interface com.intellij.find.impl.HelpID
return HelpID.FIND_OTHER_USAGES;
^
I'm not proficient enough to take on this part of the problem, but maybe Grzegorz can provide feedback.
Quoted text · Christian Grün · 166 lines
On Tue, Feb 17, 2015 at 3:13 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Bridger, > > Dirk's comment sounds pretty reasonable to me. I have just added an > issue about that in the IntelliJ-XQuery GitHub repository [1]. > > Regards, > Christian > > [1] https://github.com/ligasgr/intellij-xquery/issues/120 > > > On Tue, Feb 17, 2015 at 7:37 PM, Dirk Kirsten <dk at basex.org> wrote: > > Hi Bridger, > > > > I am not sure if this is going to work, at least for the moment. So I > guess you use the plugin by Grzegorz Ligas' plugin, don't you? This > currently uses the BaseX XQJ 1.3 bindings, which I think does not work with > BaseX 8. We did change our wire protocol slightly for a more secure > authentication, and I think for this to work you will need the XQJ driver > version 1.4. > > > > Although I didn't check any of this information, so I might be wrong. > > > > Cheers, > > Dirk > > > > On 02/17/2015 07:27 PM, Maximilian Gärber wrote: > >> Just to be sure: did you start the Server before running the query? > >> Am 17.02.2015 17:14 schrieb "Bridger Dyson-Smith" < > bdysonsmith at gmail.com>: > >> > >> > Hi all, > >> > > >> > I'm unsure of how many IntelliJ users there are here, but I'm hitting > some > >> > embarrassingly simple problems and I hope someone can provide some > guidance. > >> > > >> > I'm trying to use BaseX 8.0 as a data source for a simple query [1]. > >> > However I'm unable to apply the query against a database. > >> > > >> > I've added BaseX as an XQuery data source: > >> > *File* > *Settings* > *Other Settings* > *XQuery Data Sources* > > "*+*" (*add > >> > a data source*) > > >> > Name: BaseX80-tei > >> > Host: localhost > >> > Port: 1984 > >> > Database name: tei-dump > >> > Username: admin > >> > Password: admin > >> > > >> > I've added a *Run* *Configuration*: > >> > Run > Edit Configurations > "+" (add a configuration) > XQuery Main > Module > >> >> > >> > Name: name-query > >> > Configuration: > >> > Main file: /usr/home/bridger/src/basex/80/basex/repo/name.xq > >> > Data source: BaseX80-tei (from above) > >> > Java Configuration: > >> > VM options: blank > >> > Program arguments: blank > >> > Working directory: /usr/home/bridger/src/basex/80/basex > >> > Use classpath of module: basex > >> > > >> > When I try to run the configuration, I get a Java exception [2]. > >> > > >> > I'm fairly sure that this is user/operator error, but I'm not quite > sure > >> > what I've done wrong. Thank you for reading. > >> > > >> > Cheers, > >> > Bridger > >> > > >> > [1] names.xq > >> > <results> > >> > { for $n in //*:name > >> > return $n } > >> > </results> > >> > > >> > [2] Java exception: > >> > /usr/local/openjdk7/bin/java -Didea.launcher.port=7532 > >> > -Didea.launcher.bin.path=/usr/home/bridger/bin/idea/bin > >> > -Dfile.encoding=UTF-8 -classpath > >> > > /usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/intellij-xquery-rt.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj-api-1.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/xqj2-0.2.0.jar:/usr/home/bridger/.IntelliJIdea14/config/plugins/intellij-xquery/lib/basex-xqj-1.3.0.jar:/usr/local/openjdk7/jre/lib/compilefontconfig.jar:/usr/local/openjdk7/jre/lib/management-agent.jar:/usr/local/openjdk7/jre/lib/javazic.jar:/usr/local/openjdk7/jre/lib/resources.jar:/usr/local/openjdk7/jre/lib/jce.jar:/usr/local/openjdk7/jre/lib/charsets.jar:/usr/local/openjdk7/jre/lib/jsse.jar:/usr/local/openjdk7/jre/lib/rt.jar:/usr/local/openjdk7/jre/lib/ext/zipfs.jar:/usr/local/openjdk7/jre/lib/ext/localedata.jar:/usr/local/openjdk7/jre/lib/ext/dnsns.jar:/usr/local/openjdk7/jre/lib/ext/sunpkcs11.jar:/usr/local/openjdk7/jre/lib/ext/sunjce_provider.jar:/usr/local/openjdk7/jre/lib/ext/sunec.jar:/usr/home/bridger/bin/idea/lib/idea_rt.jar > >> > com.intellij.rt.execution.application.AppMain > >> > org.intellij.xquery.runner.rt.XQueryRunnerApp > >> > > /usr/home/bridger/.IntelliJIdea14/system/tmp/xquery-run8080433949304952694.xml > >> > Exception in thread "main" javax.xml.xquery.XQException: > >> > XQJNC001 - Connection refused > >> > Root Cause: > >> > java.net.ConnectException: Connection refused > >> > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > >> > at > >> > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > >> > at > >> > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > >> > at > >> > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > >> > at > >> > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> > at > >> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > >> > at > >> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > >> > at java.lang.reflect.Method.invoke(Method.java:606) > >> > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > >> > at java.net.PlainSocketImpl.socketConnect(Native Method) > >> > at > >> > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > >> > at > >> > > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > >> > at > >> > > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > >> > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > >> > at java.net.Socket.connect(Socket.java:579) > >> > at net.xqj.basex.BaseXXQDataSource.getConnection(Unknown Source) > >> > at > >> > > org.intellij.xquery.runner.rt.xqj.ConnectionFactory.getConnection(ConnectionFactory.java:36) > >> > at > >> > > org.intellij.xquery.runner.rt.xqj.XQJRunnerApp.run(XQJRunnerApp.java:57) > >> > at > >> > > org.intellij.xquery.runner.rt.XQueryRunnerApp.runConfigForOutputStream(XQueryRunnerApp.java:35) > >> > at > >> > > org.intellij.xquery.runner.rt.XQueryRunnerApp.main(XQueryRunnerApp.java:30) > >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> > at > >> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > >> > at > >> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > >> > at java.lang.reflect.Method.invoke(Method.java:606) > >> > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > >> > > >> > > > > -- > > Dirk Kirsten, BaseX GmbH, http://basexgmbh.de > > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > > >
Written for BaseX 8.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery