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@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