Skip to main content
Solved

Projection action with binary result larger than 64000 bytes

  • August 19, 2024
  • 1 reply
  • 51 views

Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • 12 replies

I recently created a simple action:

action GetResult Binary {
   initialcheck none;
   parameter ResultId Integer;
}

This action will simply return a BLOB with roughly 200 kilobytes.

When I try to call this, I get the following exception back:

2024-08-19T11:41:16.882975687+02:00 stdout F {"event.module":"liberty_message","host.name":"ifsapp-odata-5978755579-8f8d2","ibm_userDir":"\/opt\/ifs\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"2024-08-19 09:41:16.882 ERROR  6758 5aaf35b1-af2f-4941-9c87-14d835d39635 com.ifsworld.fnd.provider.processor.FndErrorProcessor.processError() : Error Stack : Attribute 'GetResult' with model type 'Binary' has length of '224689', which exceeds the upper bound '64000'.
com.ifsworld.fnd.common.exceptions.ODataProviderPayloadTooLargeException: Attribute 'GetResult' with model type 'Binary' has length of '224689', which exceeds the upper bound '64000'.
            at com.ifsworld.fnd.storage.mapper.MapperUtil.getByteArrayFromBlob(MapperUtil.java:864)
            at com.ifsworld.fnd.storage.mapper.MapperUtil.getObjectFromResultSet(MapperUtil.java:498)
            at com.ifsworld.fnd.storage.mapper.PrimitiveDataMapper.map(PrimitiveDataMapper.java:78)
            at com.ifsworld.fnd.storage.mapper.PrimitiveDataMapper.map(PrimitiveDataMapper.java:193)
            at com.ifsworld.fnd.storage.mapper.PrimitiveDataMapper.map(PrimitiveDataMapper.java:55)
            at com.ifsworld.fnd.storage.PlsqlStatementExecutor.execute(PlsqlStatementExecutor.java:113)
            at com.ifsworld.fnd.storage.PlsqlStatementExecutor.execute(PlsqlStatementExecutor.java:86)
            at com.ifsworld.fnd.storage.PlsqlStatementExecutor.execute(PlsqlStatementExecutor.java:63)
            at com.ifsworld.fnd.storage.invoker.PlsqlOperationInvoker.invoke(PlsqlOperationInvoker.java:56)
            at com.ifsworld.fnd.storage.invoker.BpaInvokerWrapper.invoke(BpaInvokerWrapper.java:168)
            at com.ifsworld.fnd.provider.processor.FndActionProcessor.processActionPrimitive(FndActionProcessor.java:471)
            at org.apache.olingo.server.core.ODataDispatcher.handleActionDispatching(ODataDispatcher.java:254)
            at org.apache.olingo.server.core.ODataDispatcher.handleResourceDispatching(ODataDispatcher.java:143)
            at org.apache.olingo.server.core.ODataDispatcher.dispatch(ODataDispatcher.java:119)
            at org.apache.olingo.server.core.ODataHandlerImpl.processInternal(ODataHandlerImpl.java:168)
            at org.apache.olingo.server.core.ODataHandlerImpl.process(ODataHandlerImpl.java:89)
            at com.ifsworld.fnd.provider.ODataHandlerWrapper.process(ODataHandlerWrapper.java:64)
            at com.ifsworld.fnd.provider.ODataHandlerWrapper.process(ODataHandlerWrapper.java:77)
            at com.ifsworld.fnd.web.api.FndODataServletBase.serviceODataRequest(FndODataServletBase.java:330)
            at com.ifsworld.fnd.web.api.FndODataServletBase.serviceProjectionRequest(FndODataServletBase.java:163)
            at com.ifsworld.fnd.web.api.FndODataServletBase.service(FndODataServletBase.java:112)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1258)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:746)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:193)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:98)
            at com.ifsworld.fnd.web.api.ResponseFilterBase.doFilter(ResponseFilterBase.java:60)
            at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
            at com.ifsworld.fnd.web.api.InitConfigurationFilterBase.doFilter(InitConfigurationFilterBase.java:202)
            at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
            at com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)
            at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
            at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1002)
            at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1140)
            at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5049)
            at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:316)
            at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1007)
            at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:281)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1184)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:453)
            at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)
            at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)
            at com.ibm.ws.http.channel.internal.inbound.HttpICLReadCallback.complete(HttpICLReadCallback.java:70)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:958)
            at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1047)
            at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:238)
            at java.base\/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.base\/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.base\/java.lang.Thread.run(Unknown Source)","ibm_threadId":"00001a66","_timestamp":"2024-08-19T09:41:16.882+0000","module":"SystemErr","log.level":"SystemErr","ibm_methodName":"","log.logger":"","event.sequence":"1724060476882_0000000002A37","ext_requestID":"AAAUgxApFcq_AAAAAAAAYSY","process.thread.name":"Default Executor-thread-1478"}

I understand that we shouldn’t return large objects from a single HTTP REST API, but 200k isn’t an extreme case. Why even implement binary as a return type if it’s restricted to 64000 bytes?

Or maybe I’m just missing something?

Best answer by Remo

As so often, I figured out an alternative. If I define the return type as “Stream”, it works. That way I won’t get a JSON back which makes it a bit harder to process using a proper OData client, but with some hacking, I managed to get files larger than 64000 bytes that way.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 12 replies
  • Answer
  • August 19, 2024

As so often, I figured out an alternative. If I define the return type as “Stream”, it works. That way I won’t get a JSON back which makes it a bit harder to process using a proper OData client, but with some hacking, I managed to get files larger than 64000 bytes that way.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings