SmartClient Version: SNAPSHOT_v11.1d_2016-12-04/Enterprise Deployment (built 2016-12-04)
Hello, I've got an error while doing an update operation. Actually it's the same ds of that post http://forums.smartclient.com/forum/...689#post241689
but it's an update (instead of add) and I've removed the validator on the field which gives the error. That dataSource has got another validator type=required with an applyWhen, and the framework is doing a fetch to retrieve the dependent field value. This fetch has got a velocity expression ($sessionAttributes.ID_TITOLARE_IMPERSONATO_FK) and it's raising an error:
it seems that the request for this 'automatic' fetch (done for the applyWhen) doesn't have the velocity context initialized.
Hello, I've got an error while doing an update operation. Actually it's the same ds of that post http://forums.smartclient.com/forum/...689#post241689
but it's an update (instead of add) and I've removed the validator on the field which gives the error. That dataSource has got another validator type=required with an applyWhen, and the framework is doing a fetch to retrieve the dependent field value. This fetch has got a velocity expression ($sessionAttributes.ID_TITOLARE_IMPERSONATO_FK) and it's raising an error:
Code:
2016-12-05 15:25:25,494 INFO SQLDataSource [builtinApplication.null] Performing fetch operation with criteria: {ID_REC:1} values: {ID_REC:1} 2016-12-05 15:25:25,495 INFO SQLDataSource [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause, JTK_RUBRICA_TITOLARI WHERE $defaultWhereClause and JTK_NOMI_TICKET.ID_REC = JTK_RUBRICA_TITOLARI.ID_NOME_RUBRICA_FK (+) and ($sessionAttributes.ID_TITOLARE_IMPERSONATO_FK = JTK_RUBRICA_TITOLARI.ID_TITOLARE_FK or JTK_RUBRICA_TITOLARI.ID_TITOLARE_FK is null) AND $defaultJoinWhereClause 2016-12-05 15:25:25,495 WARN HttpAttributeHandler [builtinApplication.null] In HttpAttributeHandler.get() both request and session were null 2016-12-05 15:25:25,497 DEBUG DSRequest About to free up resources for request of type fetch on DataSource JTK_NOMI_TICKET 2016-12-05 15:25:25,497 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1493 2016-12-05 15:25:25,497 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1494 2016-12-05 15:25:25,497 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1495 2016-12-05 15:25:25,497 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1495 2016-12-05 15:25:25,497 DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 1495 of type 'JPC_NAZIONI_BASE' 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1494 2016-12-05 15:25:25,498 DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 1494 of type 'JPC_NAZIONI' 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1496 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1497 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1497 2016-12-05 15:25:25,498 DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 1497 of type 'JPC_COMUNI_BASE' 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1496 2016-12-05 15:25:25,498 DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 1496 of type 'JPC_COMUNI' 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1493 2016-12-05 15:25:25,498 DEBUG SQLDataSource About to clear SQLDriver state for DS instance 1493 2016-12-05 15:25:25,498 DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 1493 of type 'JTK_NOMI_TICKET' 2016-12-05 15:25:25,498 ERROR StoredRecordHandler Failed to fetch stored record with primary key {ID_REC=1} from data base. Treating as no reocrd. org.apache.velocity.exception.MethodInvocationException: Invocation of method 'get' in class com.isomorphic.velocity.HttpAttributeHandler threw exception java.lang.Exception: Both request and session were null at fetch[line 5, column 41] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1378) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1314) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1265) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:199) at com.isomorphic.velocity.Velocity.evaluate(Velocity.java:352) at com.isomorphic.velocity.Velocity.evaluateAsString(Velocity.java:287) at com.isomorphic.velocity.Velocity.evaluateAsString(Velocity.java:261) at com.isomorphic.sql.SQLDataSource.generateSQLStatement(SQLDataSource.java:1456) at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1693) at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:436) at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:381) at com.isomorphic.datasource.DataSource.execute(DataSource.java:2226) at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:735) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:652) at com.isomorphic.application.AppBase.execute(AppBase.java:493) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2785) at com.isomorphic.datasource.DataSource.fetchById(DataSource.java:6721) at com.isomorphic.velocity.StoredRecordHandler.fetchStoredRecord(StoredRecordHandler.java:188) at com.isomorphic.velocity.StoredRecordHandler.size(StoredRecordHandler.java:232) at java.util.HashMap.<init>(HashMap.java:294) at com.isomorphic.util.DefaultValidators.validateField(DefaultValidators.java:231) at com.isomorphic.datasource.SimpleType.validateValue(SimpleType.java:101) at com.isomorphic.datasource.SimpleType.create(SimpleType.java:75) at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:2229) at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:2144) at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:1480) at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:1417) at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:1378) at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:3754) at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:3699) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:171) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2781) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:152) at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:167) 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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:200) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 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$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) 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.js.JSSyntaxScannerFilter._doFilter(JSSyntaxScannerFilter.java:262) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:93) 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:260) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:93) 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:312) 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:745) Caused by: java.lang.Exception: Both request and session were null at com.isomorphic.velocity.HttpAttributeHandler.get(HttpAttributeHandler.java:62) 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:606) at org.apache.velocity.runtime.parser.node.GetExecutor.execute(GetExecutor.java:117) at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:539) at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198) ... 109 more
Comment