Announcement

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

    HttpProxyServlet has problems with complicated criteria from RestDatasourceRequest

    Hi Isomorphic,

    using v10.1p_2016-11-25 I hit this exception when sending a request from a SelectItem via RestDataSource:

    Request from Developer Console Watch tab:
    Code:
    {
        dataSource:"T_LEADTEMPERATURE",
        operationType:"fetch",
        componentId:"isc_PickListMenu_2",
        data:{
            operator:"and",
            criteria:[
                {
                    fieldName:"STARTDATE",
                    operator:"lessOrEqual",
                    value:"2016-12-01T11:06:25.737"
                },
                {
                    operator:"or",
                    criteria:[
                        {
                            fieldName:"ENDDATE",
                            operator:"greaterOrEqual",
                            value:"2016-12-01T11:06:25.737"
                        },
                        {
                            fieldName:"ENDDATE",
                            operator:"isNull"
                        }
                    ]
                }
            ],
            isc_metaDataPrefix:"_",
            isc_dataFormat:"xml"
        },
        startRow:0,
        endRow:75,
        sortBy:[
            "NAME"
        ],
        textMatchStyle:"startsWith",
        resultSet:[ResultSet ID:isc_ResultSet_17 (dataSource: T_LEADTEMPERATURE, created by: isc_PickListMenu_2)],
        callback:{
            caller:[ResultSet ID:isc_ResultSet_17 (dataSource: T_LEADTEMPERATURE, created by: isc_PickListMenu_2)],
            methodName:"fetchRemoteDataReply"
        },
        willHandleError:true,
        showPrompt:false,
        prompt:"Suche Datensätze die den Kriterien entsprechen...",
        requestId:"T_LEADTEMPERATURE$62727",
        internalClientContext:{
            requestIndex:1
        },
        fallbackToEval:false,
        lastClientEventThreadCode:"MUP7",
        bypassCache:true,
        dataProtocol:"getParams",
        isRestRequest:true,
        dataFormat:"xml"
    }
    Server log:
    Code:
    === 2016-12-01 12:12:06,167 [c-10] DEBUG HttpProxyServlet - HttpProxy - ProxyData is: {
    xsi:"http://www.w3.org/2000/10/XMLSchema-instance",
    url:"http://lms.localhost:8080/lms/lms/sc/RESTHandler",
    httpMethod:"GET",
    params:{
    operator:"and",
    criteria:[
    {
    fieldName:"STARTDATE",
    operator:"lessOrEqual",
    value:new Date(1480590385737)
    },
    {
    operator:"or",
    criteria:[
    {
    fieldName:"ENDDATE",
    operator:"greaterOrEqual",
    value:new Date(1480590385737)
    },
    {
    fieldName:"ENDDATE",
    operator:"isNull"
    }
    ]
    }
    ],
    _constructor:"AdvancedCriteria",
    _operationType:"fetch",
    _startRow:0,
    _endRow:75,
    _sortBy:[
    "NAME"
    ],
    _textMatchStyle:"startsWith",
    _componentId:"isc_PickListMenu_2",
    _dataSource:"T_LEADTEMPERATURE",
    isc_metaDataPrefix:"_",
    isc_dataFormat:"xml"
    },
    contentType:null,
    requestBody:null,
    username:null,
    password:null,
    httpHeaders:null,
    uploadFileName:null,
    callbackParam:null
    }
    === 2016-12-01 12:12:06,504 [ec-8] INFO RequestContext - URL: '/connector/connector/sc/system/reference/skin/images/opener_opened.png', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36': Safari with Accept-Encoding header
    === 2016-12-01 12:12:06,505 [ec-8] INFO Download - File C:/Program Files/Apache Software Foundation/apache-tomcat-8.0.30/connector/connector/connector/sc/system/reference/skin/images/opener_opened.png not found, sending 404
    === 2016-12-01 12:12:06,508 [ec-3] INFO RequestContext - URL: '/connector/connector/sc/system/reference/skin/images/server_network_closed.png', User-Agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36': Safari with Accept-Encoding header
    === 2016-12-01 12:12:06,508 [ec-3] INFO Download - File C:/Program Files/Apache Software Foundation/apache-tomcat-8.0.30/connector/connector/connector/sc/system/reference/skin/images/server_network_closed.png not found, sending 404
    === 2016-12-01 12:13:04,023 [c-10] ERROR HttpProxyServlet - HttpProxy - com.isomorphic.servlet.HttpProxyServlet top-level exception
    java.lang.ClassCastException: org.apache.commons.collections.map.LinkedMap cannot be cast to java.lang.String
    at com.isomorphic.servlet.HttpProxyServlet.doPost(HttpProxyServlet.java:616)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:162)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260)
    at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
    Debugging shows that before the exception value in line 613 is:
    Code:
    [{fieldName=STARTDATE, operator=lessOrEqual, value=Thu Dec 01 12:06:25 CET 2016}, {operator=or, criteria=[{fieldName=ENDDATE, operator=greaterOrEqual, value=Thu Dec 01 12:06:25 CET 2016}, {fieldName=ENDDATE, operator=isNull}]}]
    Best regards
    Blama

    #2
    You confirmed using another approach, so we did not rush the fix. FYI, this is fixed now across all latest versions.

    Comment


      #3
      Hi Isomorphic,

      thank you. No, it was not important for me. Not using the RESTHandler so far.

      Best regards
      Blama

      Comment

      Working...
      X