Connecting to BaseX running as a Tomcat servlet
Monday, 28 May 2012 · 2 messages
CG
Anupam,
sorry for the late response, and thanks for giving us some more concrete hints what you are trying to do. We'll be giving you some more feedback soon,
Christian
Quoted text · Anupam Bakshi · 38 lines
On Mon, May 28, 2012 at 8:00 AM, Anupam Bakshi <bakshia at yahoo.com> wrote: > Hello, > I'm using "net.xqj.basex.BaseXXQDataSource" to connect to a BaseX servlet > running in Tomcat but it doesn't connect. > > I can run the following command : > http://localhost:8080/BaseX721/rest?command=info > > Main Options DBPATH: C:\Apache Tomcat 6.0.20\webapps\BaseX721\\data DEBUG: > false EVENTPORT: 1985 HOST: localhost HTTPPATH: C:\Apache Tomcat > 6.0.20\webapps\BaseX721\ HTTPPORT: 8984 KEEPALIVE: 0 LANG: English LANGKEYS: > false NONPROXYHOSTS: PARALLEL: 8 PORT: 1984 PROXYHOST: PROXYPORT: 80 > REPOPATH: C:\Apache Tomcat 6.0.20\webapps\BaseX721\\repo SERVERHOST: > SERVERPORT: 1984 STOPPORT: 8985 TIMEOUT: 0 > > But when I run : > private static final String DRIVER = "net.xqj.basex.BaseXXQDataSource"; > XQDataSource xqds = (XQDataSource) Class.forName(DRIVER).newInstance(); > xqds.setProperty("serverName", "localhost"); > xqds.setProperty("port", "1985"); > > I get : > Exception in thread "main" javax.xml.xquery.XQException: > XQJNC001 - Connection refused: connect > Root Cause: > java.net.ConnectException: Connection refused: connect > > Is this even possible? > > Any pointers will be greatly appreciated. > Thanks, > Anupam > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
AB
Anupam Bakshi28 May 2012 22:48 #
Hello,
I'm using "net.xqj.basex.BaseXXQDataSource" to connect to a BaseX servlet running in Tomcat but it doesn't connect.
I can run the following command :
http://localhost:8080/BaseX721/rest?command=info
Main Options
DBPATH: C:\Apache Tomcat 6.0.20\webapps\BaseX721\\data DEBUG: false EVENTPORT: 1985 HOST: localhost HTTPPATH: C:\Apache Tomcat 6.0.20\webapps\BaseX721\ HTTPPORT: 8984 KEEPALIVE: 0 LANG: English LANGKEYS: false NONPROXYHOSTS: PARALLEL: 8 PORT: 1984 PROXYHOST: PROXYPORT: 80 REPOPATH: C:\Apache Tomcat 6.0.20\webapps\BaseX721\\repo SERVERHOST: SERVERPORT: 1984 STOPPORT: 8985 TIMEOUT: 0
But when I run :
private static final String DRIVER = "net.xqj.basex.BaseXXQDataSource"; XQDataSource xqds = (XQDataSource) Class.forName(DRIVER).newInstance();
xqds.setProperty("serverName", "localhost");
xqds.setProperty("port", "1985");I get :
Exception in thread "main" javax.xml.xquery.XQException:
XQJNC001 - Connection refused: connect
Root Cause:
java.net.ConnectException: Connection refused: connect
Is this even possible?
Any pointers will be greatly appreciated.
Thanks,
Anupam
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery