Hi Isomorphic,
I just ran into a problem I believe to be an error:
I have following addtional serverside (com.isomorphic....) code in a class in order to send two DML statements to the DB. The additional one (besides the normal client-side-started one) fails:
I get following warning in the Client on the "execute()":
"[ERROR] [corpsadressen] - 17:12:00.318:XRP5:WARN:RPCManager:Criteria received from the client for update operation is missing the following required unique and/or primary fields: [ID]. Either provide all primary key fields or set allowMultiUpdate on the OperationBinding, response: {operationId: "custom",
clientContext: undef,
context: Obj,
transactionNum: 74,
httpResponseCode: 200,
httpResponseText: "//isc_RPCResponseStart-->[{data:"Criteri..."[331],
xmlHttpRequest: [object XMLHttpRequest],
transport: "xmlHttpRequest",
status: -9,
clientOnly: undef,
httpHeaders: Obj,
isStructured: true,
callbackArgs: null,
results: Obj,
data: "Criteria received from the client for up..."[210],
invalidateCache: false,
isDSResponse: true,
queueStatus: -1}"
I also get the following exception in the console:
It seems that the setAllowMultiUpdate setting is not watched, although I have seen it is set to true in the debugger. I'm on v8.2p_2012-04-14/EVAL.
Thanks,
Blama
I just ran into a problem I believe to be an error:
I have following addtional serverside (com.isomorphic....) code in a class in order to send two DML statements to the DB. The additional one (besides the normal client-side-started one) fails:
Code:
DSRequest updateGastRequest = new DSRequest("T_GAST", "update"); updateGastRequest = updateGastRequest.setCriteria("KI_ID", dsRequest.getFieldValue("KI_ID")); // Not PK, but UNIQUE in DB updateGastRequest = updateGastRequest.setAllowMultiUpdate(true); Map<String, String> m = new HashMap<String, String>(); m.put("SP_ID", newSpID.toString()); updateGastRequest = updateGastRequest.setValues(m); updateGastRequest = updateGastRequest.setRPCManager(dsRequest.getRPCManager()); DSResponse gastResponse = updateGastRequest.execute();
"[ERROR] [corpsadressen] - 17:12:00.318:XRP5:WARN:RPCManager:Criteria received from the client for update operation is missing the following required unique and/or primary fields: [ID]. Either provide all primary key fields or set allowMultiUpdate on the OperationBinding, response: {operationId: "custom",
clientContext: undef,
context: Obj,
transactionNum: 74,
httpResponseCode: 200,
httpResponseText: "//isc_RPCResponseStart-->[{data:"Criteri..."[331],
xmlHttpRequest: [object XMLHttpRequest],
transport: "xmlHttpRequest",
status: -9,
clientOnly: undef,
httpHeaders: Obj,
isStructured: true,
callbackArgs: null,
results: Obj,
data: "Criteria received from the client for up..."[210],
invalidateCache: false,
isDSResponse: true,
queueStatus: -1}"
I also get the following exception in the console:
Code:
=== 2012-04-16 17:12:00,234 [l0-8] DEBUG DataSourceDMI - Invocation threw exception com.isomorphic.base.UpdateWithoutPKException: Criteria received from the client for update operation is missing the following required unique and/or primary fields: [ID]. Either provide all primary key fields or set allowMultiUpdate on the OperationBinding at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:703) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1948) at com.acme.server.worker.AddSpef.addSpef(AddSpef.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:950) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:386) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1945) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) === 2012-04-16 17:12:00,235 [l0-8] WARN RequestContext - dsRequest.execute() failed: com.isomorphic.base.UpdateWithoutPKException: Criteria received from the client for update operation is missing the following required unique and/or primary fields: [ID]. Either provide all primary key fields or set allowMultiUpdate on the OperationBinding at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:703) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1948) at com.acme.server.worker.AddSpef.addSpef(AddSpef.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:950) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:386) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1945) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Thanks,
Blama
Comment