[MarkLogic Dev General] xcc to marklogic
Isha Chadha
i.chadha at mpstechnologies.com
Thu Jul 10 01:53:51 PDT 2008
Request xccrequest = session.newAdhocQuery("marklogic");
Am not able to figure out what you trying to achieve with above argument
"marklogic".
You can use:
Request xccrequest = session.newAdhocQuery("doc('marklogic')");
Instead
It's the query definition which is incorrect.database connection has been
successfully done.
_____
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of venkatesh
madepalli
Sent: Thursday, July 10, 2008 2:12 PM
To: General at developer.marklogic.com
Subject: [MarkLogic Dev General] xcc to marklogic
Hi,
I have created a database in marklogic server and i am trying to connect to
that with XCC application from tomcat server.
I am unable to connect to that database and it is throwing some exception.
Please find the xcc application program and exception.
XCC program
URI uri =
new URI("xcc://marklogic:marklogic@localhost:7236/VenkyDatabase"); //
7236 is XDBC server port number
ContentSource contentSource = ContentSourceFactory.newContentSource(uri);
session = contentSource.newSession();
Request xccrequest = session.newAdhocQuery("marklogic");
ResultSequence rs = session.submitRequest(xccrequest); // In this line I
am getting exception
com.marklogic.xcc.exceptions.XQueryException: XDMP-CONTEXT: Expression
depends o
n the context where none is defined
in /eval, on line 1
at
com.marklogic.xcc.impl.handlers.ServerExceptionHandler.handleResponse
(ServerExceptionHandler.java:31)
at
com.marklogic.xcc.impl.handlers.EvalRequestController.serverDialog(Ev
alRequestController.java:68)
at
com.marklogic.xcc.impl.handlers.AbstractRequestController.runRequest(
AbstractRequestController.java:72)
at
com.marklogic.xcc.impl.SessionImpl.submitRequest(SessionImpl.java:280
)
at util.HelloServlet.processRequest(HelloServlet.java:77)
at util.HelloServlet.doGet(HelloServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
Please help me in this regard.
Thanks,
Venkatesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20080710/c4318fcf/attachment-0001.html
More information about the General
mailing list