Hi mohanraj, What is dbType? Is this name of database u r using to get the xcc/xdbc session?
Can u please send the stack trace? On 20 Jun 2013 23:29, <[email protected]> wrote: > Send General mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > > 1. Re: ML Request Exception (Mohanraj Chozhan) > 2. Re: ML Request Exception (David Lee) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 20 Jun 2013 17:56:43 +0000 > From: Mohanraj Chozhan <[email protected]> > Subject: Re: [MarkLogic Dev General] ML Request Exception > To: "[email protected]" > <[email protected]> > Message-ID: <1A7B0A15768D2745AA6914E53739773E17F5DF2E@chnshlmbx11> > Content-Type: text/plain; charset="us-ascii" > > Hi, > > We are having a scenario where two internal applications are invoking the > Mark Logic server through a common implementation. > In which one application is able to retrieve the records from Mark logic > server and the other one is not able to. > We are getting Request Exception in this case. > > Following is the code snippet we have used. > > public String getResponse(String query, DBTYPE dbType) > throws CustomException { > String response = null; > Session dbSession = null; > try { > dbSession = getDBSession(dbType); > Request request; > request = dbSession.newAdhocQuery(query); > ResultSequence rs = dbSession.submitRequest(request); > response = rs.asString(); > } catch (XccConfigException e) { > > e.printStackTrace(); > throw new CustomException( > "could not establish session with ML > DB", e); > } catch (URISyntaxException e) { > > e.printStackTrace(); > throw new CustomException( > "could not establish session with ML > DB", e); > } catch (RequestException e) { > > e.printStackTrace(); > throw new CustomException( > "could not submit request to the session > with ML DB", e); > } finally { > dbSession.close(); > } > > Can anyone help on this scenario. > > Regards, > Mohanraj > > > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended > solely > for the use of the addressee(s). If you are not the intended recipient, > please > notify the sender by e-mail and delete the original message. Further, you > are not > to copy, disclose, or distribute this e-mail or its contents to any other > person and > any such actions are unlawful. This e-mail may contain viruses. Infosys > has taken > every reasonable precaution to minimize this risk, but is not liable for > any damage > you may sustain as a result of any virus in this e-mail. You should carry > out your > own virus checks before opening the e-mail or attachment. Infosys reserves > the > right to monitor and review the content of all messages sent to or from > this e-mail > address. Messages sent to or from this e-mail address may be stored on the > Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20130620/cabd0cc3/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Thu, 20 Jun 2013 17:59:13 +0000 > From: David Lee <[email protected]> > Subject: Re: [MarkLogic Dev General] ML Request Exception > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: > <6ad72d76c2d6f04d8be471b70d4b991e12e...@exchg10-be02.marklogic.com > > > Content-Type: text/plain; charset="utf-8" > > Could you send the text of the exception (e) ? > > > > ----------------------------------------------------------------------------- > David Lee > Lead Engineer > MarkLogic Corporation > [email protected] > Phone: +1 812-482-5224 > Cell: +1 812-630-7622 > www.marklogic.com<http://www.marklogic.com/> > > > From: [email protected] [mailto: > [email protected]] On Behalf Of Mohanraj Chozhan > Sent: Thursday, June 20, 2013 1:57 PM > To: [email protected] > Subject: Re: [MarkLogic Dev General] ML Request Exception > > Hi, > > We are having a scenario where two internal applications are invoking the > Mark Logic server through a common implementation. > In which one application is able to retrieve the records from Mark logic > server and the other one is not able to. > We are getting Request Exception in this case. > > Following is the code snippet we have used. > > public String getResponse(String query, DBTYPE dbType) > throws CustomException { > String response = null; > Session dbSession = null; > try { > dbSession = getDBSession(dbType); > Request request; > request = dbSession.newAdhocQuery(query); > ResultSequence rs = dbSession.submitRequest(request); > response = rs.asString(); > } catch (XccConfigException e) { > > e.printStackTrace(); > throw new CustomException( > "could not establish session with ML > DB", e); > } catch (URISyntaxException e) { > > e.printStackTrace(); > throw new CustomException( > "could not establish session with ML > DB", e); > } catch (RequestException e) { > > e.printStackTrace(); > throw new CustomException( > "could not submit request to the session > with ML DB", e); > } finally { > dbSession.close(); > } > > Can anyone help on this scenario. > > Regards, > Mohanraj > > > **************** CAUTION - Disclaimer ***************** > > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended > solely > > for the use of the addressee(s). If you are not the intended recipient, > please > > notify the sender by e-mail and delete the original message. Further, you > are not > > to copy, disclose, or distribute this e-mail or its contents to any other > person and > > any such actions are unlawful. This e-mail may contain viruses. Infosys > has taken > > every reasonable precaution to minimize this risk, but is not liable for > any damage > > you may sustain as a result of any virus in this e-mail. You should carry > out your > > own virus checks before opening the e-mail or attachment. Infosys reserves > the > > right to monitor and review the content of all messages sent to or from > this e-mail > > address. Messages sent to or from this e-mail address may be stored on the > > Infosys e-mail system. > > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://developer.marklogic.com/pipermail/general/attachments/20130620/1885c228/attachment.html > > ------------------------------ > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 108, Issue 40 > **************************************** >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
