Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Using the jdbc Rest Service with a sql parameter fails #74

Open
howardtlcc opened this issue Jun 3, 2016 · 0 comments
Open

Using the jdbc Rest Service with a sql parameter fails #74

howardtlcc opened this issue Jun 3, 2016 · 0 comments

Comments

@howardtlcc
Copy link

Using a sql parameter with the jdbcRestService fails. The error stack trace is:

{
"code":500,
"text":"Internal Error",
"message":"Error while reading the relational data",
"type":"text",
"data":"com.ibm.xsp.FacesExceptionEx: Error while reading the relational data\r\n\tat com.ibm.xsp.extlib.relational.jdbc.services.content.JsonJdbcQueryContent.writeJdbcQuery(JsonJdbcQueryContent.java:271)\r\n\tat com.ibm.xsp.extlib.relational.jdbc.rest.query.RestJdbcQueryJsonService.renderServiceJSONGet(RestJdbcQueryJsonService.java:230)\r\n\tat com.ibm.xsp.extlib.relational.jdbc.rest.query.RestJdbcQueryJsonService.renderService(RestJdbcQueryJsonService.java:68)\r\n\tat com.ibm.domino.services.HttpServiceEngine.processRequest(HttpServiceEngine.java:170)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService._processAjaxRequest(UIBaseRestService.java:259)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService.processAjaxRequest(UIBaseRestService.java:236)\r\n\tat com.ibm.xsp.util.AjaxUtilEx.renderAjaxPartialLifecycle(AjaxUtilEx.java:206)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.renderAjaxPartial(FacesServletEx.java:249)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialView(FacesServletEx.java:200)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialViewSync(FacesServletEx.java:169)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:155)\r\n\tat com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)\r\n\tat com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)\r\n\tat com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)\r\nCaused by: com.ibm.domino.services.ServiceException: \r\n\tat com.ibm.xsp.extlib.relational.jdbc.services.content.JsonJdbcQueryContent.writeJdbcQuery(JsonJdbcQueryContent.java:263)\r\n\t... 24 more\r\nCaused by: java.sql.SQLException: At least one parameter to the current statement is uninitialized.\r\n\tat org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)\r\n\tat com.ibm.xsp.extlib.relational.jdbc.datasource.xpages.JdbcPoolConnection$PoolPreparedStatement.executeQuery(JdbcPoolConnection.java:858)\r\n\tat com.ibm.xsp.extlib.relational.jdbc.services.content.JsonJdbcQueryContent.writeJdbcQuery(JsonJdbcQueryContent.java:176)\r\n\t... 24 more\r\nCaused by: java.sql.SQLException: At least one parameter to the current statement is uninitialized.\r\n\tat org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)\r\n\tat org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)\r\n\t... 35 more\r\nCaused by: ERROR 07000: At least one parameter to the current statement is uninitialized.\r\n\tat org.apache.derby.iapi.error.StandardException.newException(Unknown Source)\r\n\tat org.apache.derby.impl.sql.execute.BaseActivation.throwIfMissingParms(Unknown Source)\r\n\tat org.apache.derby.exe.acf81e0010x0155x07e3x6a88x0000003dd9c00.execute(Unknown Source)\r\n\tat org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)\r\n\tat org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)\r\n\tat org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)\r\n\t... 29 more\r\n"
}

The code is:
<xe:restService
id="restService1"
pathInfo="pathInfo">
xe:this.service
<xe:jdbcQueryJsonService
connectionName="derby1"
contentType="application/json"
sqlQuery="SELECT * FROM CUSTOMERS WHERE CITY LIKE ?">
xe:this.sqlParameters
<xe:sqlParameter value="Athens">/xe:sqlParameter
/xe:this.sqlParameters
/xe:jdbcQueryJsonService
/xe:this.service
/xe:restService

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant