SmartClient Version: v8.3p_2013-06-22/PowerEdition Deployment (built 2013-06-22)
If I submit this transaction request to the RESTHandler
and in the 2nd add, which is handled by a DMI method, there's an Exception, the first add is not rolled back.
The rollback occurs if the add fails for a required field, for instance.
Server side log:
If I submit this transaction request to the RESTHandler
Code:
{ "transaction": { "operations": [ { "dataSource": "JPC_LISTINI", "operationType": "add", "data": { "DESCRIZIONE": "xx giornata di campionato", "DATA_INIZIO": "2013-09-22T11:07:13", "DATA_FINE": "2013-09-22T13:07:13" } }, { "dataSource": "JPC_LISTINI", "operationType": "add", "data": { "DESCRIZIONE": "Preliminari Champions" } } ] } }
The rollback occurs if the add fails for a required field, for instance.
Server side log:
Code:
2013-07-01 17:40:50,723 INFO RequestContext URL: '/Legend/isomorphic/RESTHandler', User-Agent: 'Jakarta Commons-HttpClient/3.1': Unsupported WITHOUT Accept-Encoding header 2013-07-01 17:40:50,723 DEBUG FilterChainProxy Converted URL to lowercase, from: '/isomorphic/resthandler'; to: '/isomorphic/resthandler' 2013-07-01 17:40:50,723 DEBUG FilterChainProxy Candidate is: '/isomorphic/resthandler'; pattern is /images/*; matched=false 2013-07-01 17:40:50,723 DEBUG FilterChainProxy Converted URL to lowercase, from: '/isomorphic/resthandler'; to: '/isomorphic/resthandler' 2013-07-01 17:40:50,723 DEBUG FilterChainProxy Candidate is: '/isomorphic/resthandler'; pattern is /isomorphic/resthandler*; matched=true 2013-07-01 17:40:50,723 DEBUG FilterChainProxy /isomorphic/RESTHandler has an empty filter list 2013-07-01 17:40:50,724 DEBUG RestRequestParser Parsing json object: '{ "transaction": { "operations": [ { "dataSource": "JPC_LISTINI", "operationType": "add", "data": { "DESCRIZIONE": "xx giornata di campionato", "DATA_INIZIO": "2013-09-22T11:07:13", "DATA_FINE": "2013-09-22T13:07:13" } }, { "dataSource": "JPC_LISTINI", "operationType": "add", "data": { "DESCRIZIONE": "Preliminari Champions" } } ] }}' 2013-07-01 17:40:50,740 DEBUG HttpSessionEventPublisher Publishing event: org.springframework.security.web.session.HttpSessionCreatedEvent[source=org.apache.catalina.session.StandardSessionFacade@2a74edc4] 2013-07-01 17:40:50,740 INFO LegendRestHandler Performing 2 operation(s) 2013-07-01 17:40:50,745 INFO SQLDriver [builtinApplication.null] Executing SQL query on 'dbJpcEP': SELECT JPC_STAGIONI.DATA_FINE, JPC_STAGIONI.DATA_INIZIO, JPC_STAGIONI.DESCRIZIONE, JPC_STAGIONI.ID_REC FROM DBSALES.JPC_STAGIONI WHERE ((JPC_STAGIONI.DATA_INIZIO <= TO_DATE('2013-09-22 00:00:00','YYYY-MM-DD HH24:MI:SS') OR JPC_STAGIONI.DATA_INIZIO IS NULL) AND (JPC_STAGIONI.DATA_FINE >= TO_DATE('2013-09-22 00:00:00','YYYY-MM-DD HH24:MI:SS') AND JPC_STAGIONI.DATA_FINE IS NOT NULL)) ORDER BY DATA_FINE DESC 2013-07-01 17:40:50,749 INFO DSResponse [builtinApplication.null] DSResponse: List with 1 items 2013-07-01 17:40:50,750 INFO SQLDriver [builtinApplication.JPC_LISTINI_add] Executing SQL update on 'dbJpcEP': INSERT INTO DBSALES.JPC_LISTINI (DATA_FINE, DATA_INIZIO, DESCRIZIONE, ID_STAGIONI_FK, TIPO_LISTINO, ID_REC) VALUES (TO_DATE('2013-09-22 15:07:13','YYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-09-22 13:07:13','YYYY-MM-DD HH24:MI:SS'), 'xx giornata di campionato', 182001, 'LEG', DBSALES.SEQUENCE_ID_REC.NextVal) 2013-07-01 17:40:50,752 INFO SQLDriver [builtinApplication.JPC_LISTINI_add] Executing SQL query on 'dbJpcEP': SELECT DBSALES.SEQUENCE_ID_REC.CurrVal FROM DUAL 2013-07-01 17:40:50,756 INFO SQLDriver [builtinApplication.JPC_LISTINI_add, builtinApplication.null] Executing SQL query on 'dbJpcEP': SELECT JPC_LISTINI.DATA_FINE, JPC_LISTINI.DATA_INIZIO, JPC_LISTINI.DESCRIZIONE, JPC_LISTINI.ID_REC, JPC_LISTINI.ID_STAGIONI_FK, JPC_LISTINI.LISTINO_CODE, JPC_LISTINI.LISTINO_TYPE, JPC_LISTINI.NOME, JPC_LISTINI.TIPO_LISTINO, JPC_STAGIONI.DATA_INIZIO AS DATA_INIZIO_STAGIONE, JPC_STAGIONI.DATA_FINE AS DATA_FINE_STAGIONE, JPC_STAGIONI.DESCRIZIONE AS DESCRIZIONE_STAGIONE FROM DBSALES.JPC_LISTINI, DBSALES.JPC_STAGIONI WHERE (JPC_LISTINI.ID_REC=475242 AND JPC_LISTINI.TIPO_LISTINO='LEG') AND JPC_LISTINI.ID_STAGIONI_FK = JPC_STAGIONI.ID_REC ORDER BY DATA_FINE_STAGIONE DESC, DATA_FINE DESC 2013-07-01 17:40:50,762 INFO DSResponse [builtinApplication.JPC_LISTINI_add, builtinApplication.null] DSResponse: List with 1 items 2013-07-01 17:40:50,762 INFO DSResponse [builtinApplication.JPC_LISTINI_add] DSResponse: List with 1 items 2013-07-01 17:40:50,763 WARN RequestContext dsRequest.execute() failed: java.lang.NullPointerException at com.juve.legend.eventi.ListinoAddDMI.add(ListinoAddDMI.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:972) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2030) at com.isomorphic.servlet.RESTHandler.handleDSRequest(RESTHandler.java:341) at com.juve.legend.LegendRestHandler.handleDSRequest(LegendRestHandler.java:57) at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:319) at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:259) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.juve.utils.Log4jSessionFilter.doFilter(Log4jSessionFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:163) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:246) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(JSSyntaxScannerFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) 2013-07-01 17:40:50,766 DEBUG RPCManager Content type for RPC transaction: text/html; charset=UTF-8 2013-07-01 17:40:50,771 DEBUG RPCManager DMI response, dropExtraFields: true 2013-07-01 17:40:50,773 DEBUG RPCManager non-DMI response, dropExtraFields: false
Comment