Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    [bug] RESTHandler bug using inheritsFrom

    I've found a regression using RESTHandler in SmartClient Version: v9.0p_2013-08-20/EVAL Development Only
    and also with latest
    SmartClient Version: v9.0p_2013-08-24/EVAL Development Only

    instead SmartClient Version: v9.0p_2013-08-07/EVAL Development Only
    works right.

    RESTHandler receives this request:
    Code:
    2013-08-24 19:12:17,941 INFO  [ ] RequestContext URL: '/Legend/isomorphic/RESTHandler', User-Agent: 'Apache-HttpClient/4.2.5 (java 1.5)': Unsupported WITHOUT Accept-Encoding header 
    2013-08-24 19:12:17,941 WARN  [ ] LegendRestHandler entra in doPost 
    2013-08-24 19:12:17,941 WARN  [ ] LegendRestHandler entra in processRequest, metodo = POST 
    2013-08-24 19:12:17,941 DEBUG [ ] RestRequestParser Parsing json object: '{
     "transaction": {
      "operations": [
       {
        "dataSource": "JPC_CONTRATTI",
        "operationType": "fetch",
        "operationId": "getPdfOrdine",
        "data": {
         "CONTRATTO_NUM": 4753
        }
       }
      ]
     }
    }' 
    2013-08-24 19:12:17,942 DEBUG [ ] ProcessedFileCache STALE object for file '/usr/local/tomcat/apache-tomcat-7.0.40/webapps/Legend##0154/shared/ds/JPC_CONTRATTI.ds.xml', reloading (file timestamp 1377364318000, cache timestamp 1377360964000) 
    2013-08-24 19:12:17,944 DEBUG [ ] XML Parsed XML from /usr/local/tomcat/apache-tomcat-7.0.40/webapps/Legend##0154/shared/ds/JPC_CONTRATTI.ds.xml: 2ms 
    2013-08-24 19:12:17,944 DEBUG [ ] BasicDataSource Validating a 'DataSource' at path '' 
    2013-08-24 19:12:17,944 DEBUG [ ] BasicDataSource Validating 37 'OperationBinding's at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings' 
    2013-08-24 19:12:17,944 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/0' 
    2013-08-24 19:12:17,945 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/1' 
    2013-08-24 19:12:17,945 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/2' 
    2013-08-24 19:12:17,945 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/3' 
    2013-08-24 19:12:17,945 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/3/operationBinding/serverObject' 
    2013-08-24 19:12:17,945 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/3/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/4' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/4/operationBinding/serverObject' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/4/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/5' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/5/operationBinding/serverObject' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/5/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/6' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/6/operationBinding/serverObject' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/6/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/7' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/7/operationBinding/serverObject' 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/7/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,946 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/8' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/8/operationBinding/serverObject' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/8/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/9' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/9/operationBinding/serverObject' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/9/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/10' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/11' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/12' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/12/operationBinding/serverObject' 
    2013-08-24 19:12:17,947 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/12/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/13' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/13/operationBinding/serverObject' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/13/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/14' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/14/operationBinding/serverObject' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/14/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/15' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/15/operationBinding/serverObject' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/15/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/16' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/16/operationBinding/serverObject' 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/16/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,948 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/17' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/17/operationBinding/serverObject' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/17/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/18' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/18/operationBinding/serverObject' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/18/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/19' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/19/operationBinding/serverObject' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/19/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/20' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/20/operationBinding/serverObject' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/20/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/21' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/21/operationBinding/serverObject' 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/21/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,949 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/22' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/23' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/24' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/24/operationBinding/serverObject' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/24/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/25' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/25/operationBinding/serverObject' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/25/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/26' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/27' 
    2013-08-24 19:12:17,950 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/27/operationBinding/serverObject' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/27/operationBinding/serverObject': 1ms 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/28' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/28/operationBinding/serverObject' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/28/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/29' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/29/operationBinding/serverObject' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/29/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/30' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/30/operationBinding/serverObject' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/30/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/31' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/31/operationBinding/serverObject' 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/31/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,951 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/32' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/32/operationBinding/serverObject' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/32/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/33' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/34' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/35' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/35/operationBinding/serverObject' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/35/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'OperationBinding' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/36' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/36/operationBinding/serverObject' 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Done validating a 'ServerObject' at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings/36/operationBinding/serverObject': 0ms 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Done validating 37 'OperationBinding's at path '/DataSource[@ID=JPC_CONTRATTI]/operationBindings': 8ms (avg 0) 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Done validating a 'DataSource' at path '': 8ms 
    2013-08-24 19:12:17,952 DEBUG [ ] BasicDataSource Looking up superDS of DataSource JPC_CONTRATTI: 'JPC_CONTRATTI_BASE' 
    2013-08-24 19:12:17,953 ERROR [ ] LegendRestHandler RESTHandler - Top-level servlet error:  
    java.lang.NullPointerException
    	at com.isomorphic.sql.SQLDataSource.buildSQLTable(SQLDataSource.java:311)
    	at com.isomorphic.sql.SQLDataSource.init(SQLDataSource.java:272)
    	at com.isomorphic.datasource.DataSource.initialize(DataSource.java:452)
    	at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:166)
    	at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:437)
    	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:228)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:220)
    	at com.isomorphic.datasource.DataSource.forName(DataSource.java:209)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:130)
    	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:138)
    	at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)
    	at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:84)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:95)
    	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:86)
    	at com.isomorphic.datasource.DataSourceManager.get(DataSourceManager.java:118)
    	at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:378)
    	at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:308)
    	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:306)
    	at com.juve.legend.rest.LegendRestHandler.processRequest(LegendRestHandler.java:64)
    	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:258)
    	at com.juve.legend.rest.LegendRestHandler.doPost(LegendRestHandler.java:52)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    	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:205)
    	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:171)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    	at java.lang.Thread.run(Thread.java:662)
    strangely enough, the error isn't always raised...

    when works, the log is:
    Code:
    2013-08-24 19:12:26,377 INFO  [ ] RequestContext URL: '/Legend/isomorphic/RESTHandler', User-Agent: 'Apache-HttpClient/4.2.5 (java 1.5)': Unsupported WITHOUT Accept-Encoding header 
    2013-08-24 19:12:26,377 WARN  [ ] LegendRestHandler entra in doPost 
    2013-08-24 19:12:26,377 WARN  [ ] LegendRestHandler entra in processRequest, metodo = POST 
    2013-08-24 19:12:26,377 DEBUG [ ] RestRequestParser Parsing json object: '{
     "transaction": {
      "operations": [
       {
        "dataSource": "JPC_CONTRATTI",
        "operationType": "fetch",
        "operationId": "getPdfOrdine",
        "data": {
         "CONTRATTO_NUM": 4753
        }
       }
      ]
     }
    }' 
    2013-08-24 19:12:26,378 DEBUG [ ] BasicDataSource Looking up superDS of DataSource JPC_CONTRATTI: 'JPC_CONTRATTI_BASE' 
    2013-08-24 19:12:26,379 DEBUG [ ] BasicDataSource Looking up superDS of DataSource JPC_CONTRATTI: 'JPC_CONTRATTI_BASE' 
    2013-08-24 19:12:26,379 DEBUG [ ] DSRequest Caching instance 192 of DS JPC_CONTRATTI from DSRequest.getDataSource() 
    2013-08-24 19:12:26,380 INFO  [ ] LegendRestHandler Performing 1 operation(s) 
    2013-08-24 19:12:26,380 WARN  [ ] LegendRestHandler entra in handleDSRequest 
    2013-08-24 19:12:26,380 WARN  [ ] LegendRestHandler Richiesta REST, metodo = POST 
    2013-08-24 19:12:26,380 DEBUG [ ] LegendRestHandler NICKNAME: mezmart2 
    2013-08-24 19:12:26,380 DEBUG [ ] DeclarativeSecurity Processing security checks for DataSource null, field null 
    2013-08-24 19:12:26,380 DEBUG [ ] DeclarativeSecurity DataSource JPC_CONTRATTI is not in the pre-checked list, processing... 
    2013-08-24 19:12:26,380 DEBUG [ ] AppBase [builtinApplication.getPdfOrdine] No userTypes defined, allowing anyone access to all operations for this application 
    2013-08-24 19:12:26,380 DEBUG [ ] AppBase [builtinApplication.getPdfOrdine] No public zero-argument method named '_getPdfOrdine' found, performing generic datasource operation 
    2013-08-24 19:12:26,380 INFO  [ ] SQLDataSource [builtinApplication.getPdfOrdine] Performing fetch operation with
    	criteria: {CONTRATTO_NUM:4753}	values: {CONTRATTO_NUM:4753} 
    2013-08-24 19:12:26,396 INFO  [ ] SQLDataSource [builtinApplication.getPdfOrdine] derived query: SELECT JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                 FROM JPC_CONTRATTI WHERE $defaultWhereClause 
    2013-08-24 19:12:26,396 INFO  [ ] SQLDataSource [builtinApplication.getPdfOrdine] 192: Executing SQL query on 'dbJpcEP': SELECT JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                 FROM JPC_CONTRATTI WHERE (JPC_CONTRATTI.CONTRATTO_NUM=4753) 
    2013-08-24 19:12:26,396 DEBUG [ ] PoolableSQLConnectionFactory [builtinApplication.getPdfOrdine] Executing pingTest 'select 1 from dual' on connection 441883931 
    2013-08-24 19:12:26,397 DEBUG [ ] SQLConnectionManager [builtinApplication.getPdfOrdine] Borrowed connection '441883931' 
    2013-08-24 19:12:26,397 DEBUG [ ] SQLTransaction [builtinApplication.getPdfOrdine] Started new dbJpcEP transaction "441883931" 
    2013-08-24 19:12:26,397 DEBUG [ ] SQLDriver [builtinApplication.getPdfOrdine] About to execute SQL query in 'dbJpcEP' using connection '441883931' 
    2013-08-24 19:12:26,397 INFO  [ ] SQLDriver [builtinApplication.getPdfOrdine] Executing SQL query on 'dbJpcEP': SELECT JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                 FROM JPC_CONTRATTI WHERE (JPC_CONTRATTI.CONTRATTO_NUM=4753) 
    2013-08-24 19:12:26,464 INFO  [ ] DSResponse [builtinApplication.getPdfOrdine] DSResponse: List with 1 items 
    2013-08-24 19:12:26,464 DEBUG [ ] RPCManager Content type for RPC transaction: text/html; charset=UTF-8 
    2013-08-24 19:12:26,464 DEBUG [ ] SQLTransaction Committing dbJpcEP transaction "441883931" 
    2013-08-24 19:12:26,587 DEBUG [ ] RPCManager non-DMI response, dropExtraFields: false 
    2013-08-24 19:12:26,635 DEBUG [ ] SQLTransaction Returning transactional connection for dbJpcEP with hashcode "441883931" 
    2013-08-24 19:12:26,635 DEBUG [ ] SQLTransaction Ending dbJpcEP transaction "441883931" 
    2013-08-24 19:12:26,636 DEBUG [ ] SQLConnectionManager About to close PoolableConnection with hashcode "441883931" 
    2013-08-24 19:12:26,636 DEBUG [ ] PoolableSQLConnectionFactory Executing pingTest 'select 1 from dual' on connection 441883931
    this is the dataSource JPC_CONTRATTI, with custom fields used in the operation binding:
    Code:
    <!--
     <%@page pageEncoding="UTF-8" contentType="text/xml; charset=UTF-8"%>
     <%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
     <fmt:setBundle basename="i18nMessages_${locale}" var="i18n"/>
     -->
    <DataSource xmlns="http://www.smartclient.com/schema"
                ID="JPC_CONTRATTI"
                tableName="JPC_CONTRATTI"
                schema="DBSALES"
                dbName="dbJpcEP"
                serverType="sql"
                dropExtraFields="false"
                requiresAuthentication="false"
                inheritsFrom="JPC_CONTRATTI_BASE"
            >
        <operationBindings>
            <operationBinding operationType="fetch" operationId="getPdfOrdine"
                              customFields="FILE_TEMP, FILE_TEMP_filename, FILE_TEMP_filesize, FILE_TEMP_date_created">
                <selectClause>JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                </selectClause>
                <tableClause>JPC_CONTRATTI</tableClause>
                <whereClause>$defaultWhereClause</whereClause>
            </operationBinding>
        </operationBindings>
    </DataSource>
    which inherits all fields from JPC_CONTRATTI_BASE. Used fields are:

    Code:
            <field sqlType="decimal" primaryKey="true" name="ID_REC" type="sequence" hidden="true">
             <sequenceName>SEQUENCE_ID_REC</sequenceName>
            </field>
            <field sqlType="decimal" sqlLength="0" name="CONTRATTO_NUM" type="integer">
                <title>
                    <fmt:message key="nContratto" bundle="${i18n}"/>
                </title>
            </field>
            <field sqlType="blob" name="FILE_TEMP" type="binary" customSQL="true" encodeInResponse="true">
                <title>
                    <fmt:message key="contratto" bundle="${i18n}"/>
                </title>
            </field>
            <field sqlType="varchar" name="FILE_TEMP_FILENAME" type="text" hidden="true" customSQL="true"></field>
            <field sqlType="decimal" name="FILE_TEMP_FILESIZE" type="integer" hidden="true" customSQL="true"></field>
            <field sqlType="timestamp" name="FILE_TEMP_DATE_CREATED" type="datetime" hidden="true" customSQL="true"></field>
    with a blob column encoded in response

    EDIT: actually if I use a simpler dataSource, with only the required fields, not marked as customSql, and without inheritance, the problem disappear. So maybe it's only related to the inheritance and not to the RESTHandler at all?
    Last edited by claudiobosticco; 25 Aug 2013, 10:03.

    #2
    builds
    v9.0p_2013-08-04/EVAL Development Only
    v9.0p_2013-08-07/EVAL Development Only
    v9.0p_2013-08-10/EVAL Development Only
    v9.0p_2013-08-13/EVAL Development Only

    are working,

    builds
    v9.0p_2013-08-14/EVAL Development Only
    v9.0p_2013-08-15/EVAL Development Only
    v9.0p_2013-08-20/EVAL Development Only
    v9.0p_2013-08-24/EVAL Development Only
    are not.
    Last edited by claudiobosticco; 25 Aug 2013, 04:59.

    Comment


      #3
      We have attempted to reproduce this with the current 9.0 code, but so far have not been able to, even using your dataSource definitions. There was a fairly big change made to the REST parser on August 13th, and although that is the obvious place to start looking for blame, it isn't clear how that change could be leading to this particular error.

      Please post the whole of the JPC_CONTRATTI_BASE dataSource - it may be that some setting in there that we don't know about is preventing us from reproducing the problem.

      Also - you say this doesn't always happen? Is it possible that it only happens for the first request to JPC_CONTRATTI after a server restart, and that the second and subsequent requests are OK?

      Comment


        #4
        Originally posted by Isomorphic View Post
        Also - you say this doesn't always happen? Is it possible that it only happens for the first request to JPC_CONTRATTI after a server restart, and that the second and subsequent requests are OK?
        almost...the request arrives from another server, which receives a request from a web page. It happens only on the first request from the web page.
        So if I refresh the web page, on the first request, it gives an error. Second and subsequent requests stream the blob in BASE64 encoding correctly.

        But from the RESTHandler perspective it seems the same identical request!?
        Last edited by claudiobosticco; 26 Aug 2013, 08:05.

        Comment


          #5
          Originally posted by Isomorphic View Post
          Please post the whole of the JPC_CONTRATTI_BASE dataSource - it may be that some setting in there that we don't know about is preventing us from reproducing the problem.
          Code:
          <!--
           <%@page pageEncoding="UTF-8" contentType="text/xml; charset=UTF-8"%>
           <%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
           <fmt:setBundle basename="i18nMessages_${locale}" var="i18n"/>
           -->
          <DataSource xmlns:fmt="urn:jsptld:/WEB-INF/fmt.tld" xmlns="http://www.smartclient.com/schema"
                      ID="JPC_CONTRATTI_BASE"
                      tableName="JPC_CONTRATTI"
                      schema="DBSALES"
                      dbName="dbJpcEP"
                      serverType="sql"
                      dropExtraFields="false"
                      requiresAuthentication="false"
                  >
              <fields>
                  <field sqlType="decimal" primaryKey="true" name="ID_REC" type="sequence" hidden="true">
                      <sequenceName>SEQUENCE_ID_REC</sequenceName>
                  </field>
                  <field foreignKey="JPC_STAGIONI.ID_REC" sqlType="decimal" sqlLength="0" name="ID_STAGIONI_FK" type="integer"
                         optionDataSource="JPC_STAGIONI" valueField="ID_REC" displayField="DESCRIZIONE">
                      <title>
                          <fmt:message key="stagione" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="STAGIONE" type="text" tableName="JPC_STAGIONI" nativeName="DESCRIZIONE"/>
                  <field sqlType="decimal" sqlLength="0" name="CONTRATTO_NUM" type="integer">
                      <title>
                          <fmt:message key="nContratto" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field foreignKey="JPC_ANAGRAFICA_CLIENTI.ID_REC" sqlType="decimal" sqlLength="0" type="integer"
                         name="ID_ANAGRAFICA_CLIENTI_FK" displayField="SOGGETTO_DESC">
                      <title>
                          <fmt:message key="cliente" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="TIPO_SOGGETTO" type="text" tableName="JPC_TIPI_SOGGETTO" nativeName="DESCRIZIONE">
                      <title>
                          <fmt:message key="tipoSoggetto" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="SOGGETTO_DESC" type="text"
                         customSelectExpression="decode(JPC_TIPI_SOGGETTO.CODICE, 'AZ', JPC_ANAGRAFICA_CLIENTI.SOGGETTO_DESC, JPC_ANAGRAFICA_CLIENTI.COGNOME || ' ' || JPC_ANAGRAFICA_CLIENTI.NOME)">
                      <title><fmt:message key="cliente" bundle="${i18n}"/></title>
                  </field>
                  <field sqlType="timestamp" name="DATE_MOD" type="modifierTimestamp">
                      <title><fmt:message key="dataModifica" bundle="${i18n}"/></title>
                  </field>
                  <field sqlType="timestamp" name="DATE_CREATOR" type="creatorTimestamp">
                      <title><fmt:message key="dataCreazione" bundle="${i18n}"/></title>
                  </field>
                  <field sqlType="varchar" sqlLength="60" name="ACCOUNT_MOD" length="60" type="modifier"/>
                  <field sqlType="varchar" sqlLength="60" name="CREATOR" length="60" type="creator"/>
                  <field sqlType="varchar" sqlLength="60" name="ACCOUNT" length="60"
                         type="text">
                  </field>
                  <field sqlType="decimal" sqlLength="0" name="VALORE_CONTRATTO"
                         type="float"> 
                      <customSelectExpression>
                          decode(VALORE_CONTRATTO, null, sum(decode(JPC_CONTRATTI_RIGHE.IS_ANNULLATO, 'F', 1,
                          decode(JPC_CONTRATTI_RIGHE.UPGRADE_WIP, 'T', 1, 0)) *
                          nvl(JPC_VOCI_DI_LISTINO.PREZZO_LORDO, 0)), VALORE_CONTRATTO)
                      </customSelectExpression>
                      <title>
                          <fmt:message key="valoreContratto" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field sqlType="decimal" sqlLength="0" name="VALORE_CONTRATTO_SCONTATO"
                         type="float"> 
                      <customSelectExpression>
                          decode(VALORE_CONTRATTO_SCONTATO, null,
                          (sum(
                          decode(JPC_CONTRATTI_RIGHE.IS_ANNULLATO, 'F', 1, decode(JPC_CONTRATTI_RIGHE.UPGRADE_WIP, 'T', 1, 0)) *
                          nvl(JPC_VOCI_DI_LISTINO.PREZZO_LORDO, 0)
                          * (1 - nvl(JPC_CONTRATTI_RIGHE.SCONTO_PERC, 0) / 100))
                          - nvl(SCONTO_INCONDIZIONATO_VALORE, 0)),
                          VALORE_CONTRATTO_SCONTATO)
                      </customSelectExpression>
                      <title>
                          <fmt:message key="valoreContrattoScontato" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field sqlType="decimal" sqlLength="0" name="SUM_SCONTO_RIGHE"
                         type="float"> 
                      <customSelectExpression>
                          decode(SUM_SCONTO_RIGHE, null,
                          sum(decode(JPC_CONTRATTI_RIGHE.IS_ANNULLATO, 'F', 1, decode(JPC_CONTRATTI_RIGHE.UPGRADE_WIP, 'T', 1, 0))
                          * nvl(JPC_VOCI_DI_LISTINO.PREZZO_LORDO, 0) *
                          (nvl(JPC_CONTRATTI_RIGHE.SCONTO_PERC, 0) / 100))
                          , SUM_SCONTO_RIGHE)
                      </customSelectExpression>
                      <title>
                          <fmt:message key="sommaScontiRighe" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field sqlType="decimal" sqlLength="0" name="SCONTO_INCONDIZIONATO_VALORE"
                         type="float"> <!--sul lordo (con iva)-->
                      <title>
                          <fmt:message key="scontoIncondizionato" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field sqlType="timestamp" sqlLength="7" name="DATA_FIRMA" type="date"></field>
                  <field sqlType="varchar" sqlLength="4000" name="NOTE" length="4000" type="text"></field>
                  <field foreignKey="JPC_STATI_CONTRATTO.ID_REC" sqlType="decimal" sqlLength="0" type="integer"
                         name="ID_STATO_CONTRATTO_FK" displayField="CODICE">
                      <title>
                          <fmt:message key="stato" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field foreignKey="JPC_CONTRATTI.ID_REC" sqlType="decimal" sqlLength="0" type="integer"
                         name="ID_CONTRATTO_SPLIT_FK"></field>
                  <field name="CONTRATTO_NUM_SPLIT" type="integer"
                         customSelectExpression="(select a.CONTRATTO_NUM from JPC_CONTRATTI a where JPC_CONTRATTI.ID_CONTRATTO_SPLIT_FK = a.ID_REC)"></field>
                  <field foreignKey="JPC_CONTRATTI.ID_REC" sqlType="decimal" sqlLength="0" type="integer"
                         name="ID_CONTRATTO_PRECEDENTE_FK"></field>
                  <field name="CONTRATTO_NUM_PRECEDENTE" type="integer"
                         customSelectExpression="(select a.CONTRATTO_NUM from JPC_CONTRATTI a where JPC_CONTRATTI.ID_CONTRATTO_PRECEDENTE_FK = a.ID_REC)">
                      <title>
                          <fmt:message key="contrattoPrec" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="STATO_CONTRATTO" type="text" tableName="JPC_STATI_CONTRATTO" nativeName="CODICE"/>
                  <field name="STATO_CONTRATTO_DESC" type="text" tableName="JPC_STATI_CONTRATTO" nativeName="DESCRIZIONE"/>
                  <field sqlType="decimal" name="ID_NOTE_INTERNE_FK" type="integer" foreignKey="JPC_NOTE.ID_REC">
                      <title>
                          <fmt:message key="noteInserite" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="TOTALE_RIGHE_SCONTATO" type="float">
                      <customSelectExpression>
                          sum(decode(JPC_CONTRATTI_RIGHE.IS_ANNULLATO, 'F', 1, decode(JPC_CONTRATTI_RIGHE.UPGRADE_WIP, 'T', 1, 0))
                          * nvl(JPC_VOCI_DI_LISTINO.PREZZO_LORDO, 0) * (1
                          - (nvl(JPC_CONTRATTI_RIGHE.SCONTO_PERC, 0) / 100)))
                      </customSelectExpression>
                  </field>
                  <field name="FL_REQUISITI_FIRMA" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleChar"
                         sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_ACC_COND_GEN_CONTR" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleChar"
                         sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_PRESA_VIS_CLAUS_VESS" type="boolean" sqlType="char" sqlLength="1"
                         sqlStorageStrategy="singleChar" sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_CONS_TRATT_DATI_PERS" type="boolean" sqlType="char" sqlLength="1"
                         sqlStorageStrategy="singleChar" sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_CONS_COM_DATI_TERZI" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleChar"
                         sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_CONS_TRAT_DATI_PROFILO" type="boolean" sqlType="char" sqlLength="1"
                         sqlStorageStrategy="singleChar" sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_CONS_TRAT_DATI_ALT_SOC" type="boolean" sqlType="char" sqlLength="1"
                         sqlStorageStrategy="singleChar" sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="FL_NOTIFICA_A_CLIENTE" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleChar"
                         sqlTrueValue="S" sqlFalseValue="N"/>
                  <field name="DATA_SOTTOSC_CLIENTE" type="date" sqlType="date">
                      <title>
                          <fmt:message key="confCliente" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="DATA_ACCETTAZIONE" type="date" sqlType="date">
                      <customSelectExpression>
                          (select max(JPC_PASSAGGI_STATO_CONTRATTI.DATA_PASSAGGIO_STATO)
                          from JPC_PASSAGGI_STATO_CONTRATTI, JPC_STATI_CONTRATTO
                          where JPC_PASSAGGI_STATO_CONTRATTI.ID_CONTRATTO_FK = JPC_CONTRATTI.ID_REC
                          and JPC_PASSAGGI_STATO_CONTRATTI.ID_STATO_CONTRATTO_FK = JPC_STATI_CONTRATTO.ID_REC
                          and JPC_STATI_CONTRATTO.CODICE = 'ACC')
                      </customSelectExpression>
                      <title>
                          <fmt:message key="accettazione" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="DATA_INCASSO" type="date" sqlType="date">
                      <customSelectExpression>
                          (select max(JPC_FATTURE.DATA_INCASSO)
                          from JPC_FATTURE
                          where JPC_FATTURE.ID_CONTRATTI_FK = JPC_CONTRATTI.ID_REC)
                      </customSelectExpression>
                  </field>
                  <field name="IS_FATTURATO" type="boolean" sqlStorageStrategy="singleCharTF">
                      <customSelectExpression>
                          decode ((select count(JPC_FATTURE.DATA_FATTURA) from JPC_FATTURE where JPC_FATTURE.ID_CONTRATTI_FK =
                          JPC_CONTRATTI.ID_REC), 0, 'F', 'T')
                      </customSelectExpression>
                  </field>
                  <field name="IS_INCASSATO" type="boolean" sqlStorageStrategy="singleCharTF">
                      <customSelectExpression>
                          decode ((select count(JPC_FATTURE.DATA_INCASSO) from JPC_FATTURE where JPC_FATTURE.ID_CONTRATTI_FK =
                          JPC_CONTRATTI.ID_REC), 0, 'F', 'T')
                      </customSelectExpression>
                  </field>
                  <field name="IS_ANNULLATO" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleCharTF"/>
                  <field name="ARCHIVIATO_PER_STATS" type="boolean" sqlType="char" sqlLength="1"
                         sqlStorageStrategy="singleCharTF"/>
                  <field name="UPGRADE_WIP" type="boolean" sqlType="char" sqlLength="1" sqlStorageStrategy="singleCharTF"/>
                  <field name="NUM_RIGHE_NON_CONFERMATE" type="integer">
                      <customSelectExpression>
                          (SELECT count(*) FROM JPC_CONTRATTI_RIGHE
                          WHERE JPC_CONTRATTI.ID_REC = JPC_CONTRATTI_RIGHE.ID_CONTRATTI_FK
                          and JPC_CONTRATTI_RIGHE.FL_CONFERMATO = 'N'
                          and (JPC_CONTRATTI_RIGHE.IS_ANNULLATO = 'F' or JPC_CONTRATTI_RIGHE.IS_ANNULLATO is null))
                      </customSelectExpression>
                  </field>
                  <field name="TRIBUNE" type="text">
                      <customSelectExpression>
                          (SELECT wm_concat(DISTINCT(JPC_SETTORI.CODICE))
                          FROM JPC_CONTRATTI_RIGHE, JPC_SETTORI, JPC_FILE_SETTORI, JPC_POSTI_FILE_SETTORI
                          WHERE JPC_CONTRATTI.ID_REC = JPC_CONTRATTI_RIGHE.ID_CONTRATTI_FK
                          and JPC_CONTRATTI_RIGHE.ID_POSTI_FK is not null
                          and (JPC_CONTRATTI_RIGHE.IS_ANNULLATO = 'F' or JPC_CONTRATTI_RIGHE.IS_ANNULLATO is null or
                          JPC_CONTRATTI_RIGHE.UPGRADE_WIP = 'T')
                          and JPC_POSTI_FILE_SETTORI.ID_FILE_SETTORI_FK = JPC_FILE_SETTORI.ID_REC
                          and JPC_FILE_SETTORI.ID_SETTORI_FK = JPC_SETTORI.ID_REC
                          and JPC_CONTRATTI_RIGHE.ID_POSTI_FK = JPC_POSTI_FILE_SETTORI.ID_REC
                          )
                      </customSelectExpression>
                  </field>
                  <field sqlType="varchar" sqlLength="4000" name="NOTE_CLIENTE" length="4000" type="text"></field>
          
                  <field sqlType="blob" name="FILE_TEMP" type="binary" customSQL="true" encodeInResponse="true">
                      <title>
                          <fmt:message key="contratto" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field sqlType="varchar" name="FILE_TEMP_FILENAME" type="text" hidden="true" customSQL="true"></field>
                  <field sqlType="decimal" name="FILE_TEMP_FILESIZE" type="integer" hidden="true" customSQL="true"></field>
                  <field sqlType="timestamp" name="FILE_TEMP_DATE_CREATED" type="datetime" hidden="true" customSQL="true"></field>
                  <field name="DATA_APP" type="date" sqlType="date" customSQL="true">
                      <customSelectExpression>
                          (select max(JPC_PASSAGGI_STATO_CONTRATTI.DATA_PASSAGGIO_STATO)
                          from JPC_PASSAGGI_STATO_CONTRATTI, JPC_STATI_CONTRATTO
                          where JPC_PASSAGGI_STATO_CONTRATTI.ID_CONTRATTO_FK = JPC_CONTRATTI.ID_REC
                          and JPC_PASSAGGI_STATO_CONTRATTI.ID_STATO_CONTRATTO_FK = JPC_STATI_CONTRATTO.ID_REC
                          and JPC_STATI_CONTRATTO.CODICE = 'APP')
                      </customSelectExpression>
                      <title>
                          <fmt:message key="approvazione" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="RAPPRESENTANTE_LEGALE" type="text"
                         customSelectExpression="decode(JPC_TIPI_SOGGETTO.CODICE, 'PF', null, JPC_ANAGRAFICA_CLIENTI.COGNOME || ' ' || JPC_ANAGRAFICA_CLIENTI.NOME)">
                      <title>
                          <fmt:message key="rappresentanteLegale" bundle="${i18n}"/>
                      </title>
                  </field>
                  <field name="EMAIL" type="text" tableName="JPC_ANAGRAFICA_CLIENTI"/>
                  <field name="EMAIL_RAPPR_LEGALE" type="text" tableName="JPC_ANAGRAFICA_CLIENTI"/>
                  <field name="EMAIL_REF_COMM" type="text" tableName="JPC_ANAGRAFICA_CLIENTI"/>
                  <field name="TELEFONO" type="text" tableName="JPC_ANAGRAFICA_CLIENTI"/>
                  <field name="CELLULARE" type="text" tableName="JPC_ANAGRAFICA_CLIENTI"/>
                  <field foreignKey="JPC_CONTRATTI.ID_REC" sqlType="decimal" sqlLength="0" type="integer"
                         name="ID_CONTRATTO_UPGRADATO" nativeName="ID_REC_ORIG"></field>
                  <field name="CONTRATTO_NUM_UPGRADATO" type="integer"
                         customSelectExpression="(select a.CONTRATTO_NUM from JPC_CONTRATTI a where JPC_CONTRATTI.ID_REC_ORIG = a.ID_REC)"></field>
                  <field name="CONTRATTO_NUM_UPGRADE" type="integer"
                         customSelectExpression="(select a.CONTRATTO_NUM from JPC_CONTRATTI a where JPC_CONTRATTI.ID_REC = a.ID_REC_ORIG)"></field>
                  <field name="IS_NUOVA_VENDITA" type="boolean" sqlStorageStrategy="singleCharTF"
                         customSelectExpression="decode(ID_REC_ORIG, null, decode(ID_CONTRATTO_PRECEDENTE_FK, null, 'T', 'F'), 'F')"/>
                  <field name="TIPO" type="text" sqlType="varchar" sqlLength="3" length="3"/>
              </fields>
              <operationBindings>
                  <operationBinding operationType="fetch" operationId="getPdfOrdine"
                                    customFields="FILE_TEMP, FILE_TEMP_filename, FILE_TEMP_filesize, FILE_TEMP_date_created">
                      <selectClause>JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                      </selectClause>
                      <tableClause>JPC_CONTRATTI</tableClause>
                      <whereClause>$defaultWhereClause</whereClause>
                  </operationBinding>
              </operationBindings>
          </DataSource>

          Comment


            #6
            We still can't reproduce this, but that is perhaps because we can't use your JPC_CONTRATTI_BASE .ds.xml file without simplifying it, because we're missing lots of context - the dataSources with foreignKey references, for example, and the tables referenced in numerous customSelectExpression clauses.

            Could you try creating a simplified version that still uses inheritance but doesn't rely on that context (ie, declares no foreign keys and doesn't have custom expressions that depend on other tables), and let us know if it gives you the same problem?

            Also, are you in a position to submit a request to this DataSource from a normal SmartClient application? We are interested to know if this problem only happens with REST clients.

            Comment


              #7
              Originally posted by Isomorphic View Post
              Also, are you in a position to submit a request to this DataSource from a normal SmartClient application? We are interested to know if this problem only happens with REST clients.
              it only happens with REST client, no problem if I invoke:
              Code:
              JPC_CONTRATTI.fetchData({CONTRATTO_NUM:4753},null,{operationId:"getPdfOrdine"})

              Comment


                #8
                Originally posted by Isomorphic View Post
                Could you try creating a simplified version that still uses inheritance but doesn't rely on that context (ie, declares no foreign keys and doesn't have custom expressions that depend on other tables), and let us know if it gives you the same problem?
                I've got the same problem with a simplified version, JPC_CONTRATTI_BASE:
                Code:
                <!--
                 <%@page pageEncoding="UTF-8" contentType="text/xml; charset=UTF-8"%>
                 <%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
                 <fmt:setBundle basename="i18nMessages_${locale}" var="i18n"/>
                 -->
                <DataSource xmlns:fmt="urn:jsptld:/WEB-INF/fmt.tld" xmlns="http://www.smartclient.com/schema"
                            ID="JPC_CONTRATTI_BASE"
                            tableName="JPC_CONTRATTI"
                            schema="DBSALES"
                            dbName="dbJpcEP"
                            serverType="sql"
                            dropExtraFields="false"
                            requiresAuthentication="false"
                        >
                    <fields>
                        <field sqlType="decimal" primaryKey="true" name="ID_REC" type="sequence" hidden="true">
                            <sequenceName>SEQUENCE_ID_REC</sequenceName>
                        </field>
                        <field sqlType="decimal" sqlLength="0" name="CONTRATTO_NUM" type="integer">
                            <title>
                                <fmt:message key="nContratto" bundle="${i18n}"/>
                            </title>
                        </field>
                
                        <field sqlType="blob" name="FILE_TEMP" type="binary" customSQL="true" encodeInResponse="true">
                            <title>
                                <fmt:message key="contratto" bundle="${i18n}"/>
                            </title>
                        </field>
                        <field sqlType="varchar" name="FILE_TEMP_FILENAME" type="text" hidden="true" customSQL="true"></field>
                        <field sqlType="decimal" name="FILE_TEMP_FILESIZE" type="integer" hidden="true" customSQL="true"></field>
                        <field sqlType="timestamp" name="FILE_TEMP_DATE_CREATED" type="datetime" hidden="true" customSQL="true"></field>
                          </fields>
                </DataSource>
                and JPC_CONTRATTI:
                Code:
                <!--
                 <%@page pageEncoding="UTF-8" contentType="text/xml; charset=UTF-8"%>
                 <%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
                 <fmt:setBundle basename="i18nMessages_${locale}" var="i18n"/>
                 -->
                <DataSource xmlns="http://www.smartclient.com/schema"
                            ID="JPC_CONTRATTI"
                            tableName="JPC_CONTRATTI"
                            schema="DBSALES"
                            dbName="dbJpcEP"
                            serverType="sql"
                            dropExtraFields="false"
                            requiresAuthentication="false"
                            inheritsFrom="JPC_CONTRATTI_BASE"
                        >
                    <operationBindings>
                        <!--todo eliminare-->
                        <operationBinding operationType="fetch" operationId="getPdfOrdine"
                                          customFields="FILE_TEMP, FILE_TEMP_filename, FILE_TEMP_filesize, FILE_TEMP_date_created">
                            <selectClause>JPC_CONTRATTI.ID_REC, JPC_CONTRATTI.CONTRATTO_NUM, JPC_CONTRATTI.FILE_TEMP, JPC_CONTRATTI.FILE_TEMP_filename, JPC_CONTRATTI.FILE_TEMP_filesize, JPC_CONTRATTI.FILE_TEMP_date_created
                            </selectClause>
                            <tableClause>JPC_CONTRATTI</tableClause>
                            <whereClause>$defaultWhereClause</whereClause>
                        </operationBinding>
                    </operationBindings>
                </DataSource>

                Comment


                  #9
                  OK, thanks - leave it with us

                  Comment


                    #10
                    Hi, any updates on this issue?

                    we're having another strange error with the RESTHandler, this time with v9.0p_2013-08-13, when a request contains accented characters:

                    Code:
                    2013-09-03 10:53:58,806 WARN  [ ] LegendRestHandler entra in doPost 
                    2013-09-03 10:53:58,806 WARN  [ ] LegendRestHandler entra in processRequest, metodo = POST 
                    2013-09-03 10:53:58,806 ERROR [ ] LegendRestHandler RESTHandler - Top-level servlet error:  
                    java.nio.charset.MalformedInputException: Input length = 1
                    	at java.nio.charset.CoderResult.throwException(CoderResult.java:260)
                    	at org.apache.tomcat.util.buf.B2CConverter.convert(B2CConverter.java:189)
                    	at org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:374)
                    	at org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:439)
                    	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:416)
                    	at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:101)
                    	at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:199)
                    	at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:308)
                    	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:306)
                    	at com.juve.legend.rest.LegendRestHandler.processRequest(LegendRestHandler.java:65)
                    	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:259)
                    	at com.juve.legend.rest.LegendRestHandler.doPost(LegendRestHandler.java:53)
                    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
                    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                    	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:66)
                    	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:165)
                    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:238)
                    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:168)
                    	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:77)
                    	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:89)
                    	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:205)
                    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:124)
                    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:473)
                    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
                    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:101)
                    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:954)
                    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:120)
                    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
                    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
                    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
                    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
                    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
                    	at java.lang.Thread.run(Thread.java:662)
                    but only when issued by the third-party application, while it's working with our unit tests.

                    Comment


                      #11
                      This new one shows Tomcat throwing an exception when we call inputStream.read(). Either the request really is malformed (perhaps one charset is declared in the HTTP headers, but a different charset is actually used in encoding) or you've found a bug in Tomcat - either way we can't correct it from our code.

                      Still looking into the other issue.

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        This new one shows Tomcat throwing an exception when we call inputStream.read(). Either the request really is malformed
                        yes, that was the problem.

                        Comment

                        Working...
                        X