我使用的服务器: Websphere
我正在尝试上传一个电子表格。java代码逻辑使用org.apache.poi.ss.usermodel,其中我从excel获得一个工作表,并遍历行。
Sheet sheet = wb.getSheetAt(0);
Iterator rows = sheet.rowIterator();
每个细胞都有验证逻辑。然后调用数据库来存储所有的值。
当电子表格的大小很小时,这很好用。但是,当它很大(超过1000 s的记录)时,我会得到以下错误:
Server Error
Access Manager WebSEAL could not complete your request due to an unexpected error.
Diagnostic Information
Method: POST
URL: /acx/myApp/xlImport
Error Code: 0x38cf04d3
Error Text: DPWWA1235E Could not read the response status line sent by a third-party server. Possible causes: non-spec HTTP headers, connection timeout, no data returned. This is not a problem with the WebSEAL server.
Solution
Provide your System Administrator with the above information to assist in troubleshooting the problem.
发布于 2018-04-04 22:05:04
我怀疑响应时间比WebSEAL的http-timeout
(或https-timeout
)要长。默认的版本9似乎是120秒:
如果你能得到这个值增加,即使只是你的特定连接,这可能是你的一个选择。
但是,如果处理时间越来越长,对于较大的文件,您可能需要考虑更改编程模型。快速地接受文件,异步地进行验证,然后有一个“结果”页面/URL,您可以在那里稍后看到完成状态。
这就是我们在一个非常类似的场景中所做的,上传电子表格并对其进行验证。在我们的例子中,我们使用了MDB,因为这是几年前的Java标准方法。今天,我们可能会使用ExecutorService
代替。
如果该选项是不可接受的或有吸引力的,那么您可能能够在执行过程中定期将一些数据写入响应流。但我不知道这是否会阻止WebSEAL连接超时。
https://stackoverflow.com/questions/49655282
复制相似问题