我们在WAS ND 8.5.5.5和SDK 7.0.8.10上运行MFP 7.0。有时用户在执行各种操作时会遇到“服务器错误。请联系服务器管理员”。重试“解决”问题。
来自SystemOut的一些片段记录了失败的操作,在这种情况下“保存通知”:
[11/4/15 15:58:25:812 CET] 000000fe BaseTransacti I myapp: myappserver/mymfpserver/mymfpserver / mymfpip: 2015-11-04T14:58:25.808Z: Application enviroment 'myappApp-android-1.0.9' was updated
[11/4/15 15:58:25:812 CET] 000000fe BaseTransacti I myapp: myappserver/mymfpserver/mymfpserver / mymfpip: 2015-11-04T14:58:25.808Z: Push environment updated
[11/4/15 15:58:51:498 CET] 00000149 RequestProces E org.apache.wink.server.internal.RequestProcessor handleRequest An unhandled exception occurred which will be propagated to the container.
[11/4/15 15:58:51:499 CET] 00000149 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: An exception was thrown by one of the service methods of the servlet [ManagementServlet] in application [worklightadmin_war]. Exception created : [java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1240)
at org.apache.wink.common.internal.providers.multipart.MultiPartParser.parseHeaders(MultiPartParser.java:270)
at org.apache.wink.common.internal.providers.multipart.MultiPartParser.nextPart(MultiPartParser.java:115)
at org.apache.wink.common.model.multipart.InMultiPart.hasNext(InMultiPart.java:83)
at org.apache.wink.common.model.multipart.InMultiPart.next(InMultiPart.java:95)
[11/4/15 15:58:51:500 CET] 00000149 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[11/4/15 15:58:51:501 CET] 00000149 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ManagementServlet]: java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1240) at org.apache.wink.common.internal.providers.multipart.MultiPartParser.parseHeaders(MultiPartParser.java:270) at org.apache.wink.common.internal.providers.multipart.MultiPartParser.nextPart(MultiPartParser.java:115) at org.apache.wink.common.model.multipart.InMultiPart.hasNext(InMultiPart.java:83) at org.apache.wink.common.model.multipart.InMultiPart.next(InMultiPart.java:95)
[11/4/15 15:58:51:504 CET] 0000014a ServiceProxy E Received status 500 for PUT http://mymfpserver:myport/worklightadmin/management-apis/1.0/runtimes/myapp/applications/myappApp/iphone/1.0.9/accessRule?asynch=true
java.io.IOException: Server returned HTTP response code: 500 for URL: http://mymfpserver:myport/worklightadmin/management-apis/1.0/runtimes/myapp/applications/myappApp/iphone/1.0.9/accessRule?asynch=true
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:86)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:58)
at java.lang.reflect.Constructor.newInstance(Constructor.java:542)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1688)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686)
at java.security.AccessController.doPrivileged(AccessController.java:341)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://mymfpserver:myport/worklightadmin/management-apis/1.0/runtimes/myapp/applications/myappApp/iphone/1.0.9/accessRule?asynch=true
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1639)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at com.ibm.worklight.management.ui.servlet.ServiceProxy.service(ServiceProxy.java:161)
... 30 more
由于重试没有改变任何“解决”问题我怀疑是环境而不是配置问题。我检查的第一件事是OOM,我还没有看到。然后我通过GC分析工具运行了appserver的详细GC日志,但这也没有给我任何线索。
这是POST数据的内容:
{"action":"DELETE","message":"","downloadLink":"","multiLanguageMessage":[]}
很抱歉,在捕获POST数据时,从用户的角度看错误看起来是一样的,但检查websphere日志时显示“服务器拒绝操作”错误:
[11/9/15 12:40:36:553 CET] 00000113 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause servicesServlet: java.net.ProtocolException: Server rejected operation
at sun.net.www.protocol.http.HttpURLConnection.expect100Continue(HttpURLConnection.java:1059)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1118)
在ffdc中显示达到堆栈跟踪的深度限制。我尝试使用`引号粘贴这些,但是当我保存它时,它会一直警告我它似乎包含代码。
不确定“服务器拒绝操作”错误是否与java.lang.StringIndexOutOfBoundsException有关系。导致java.lang.StringIndexOutOfBoundsException的失败请求的POST数据内容是:
{"action":"NOTIFY","message":"Test Dennis 6","downloadLink":"","multiLanguageMessage":[{"locale":"en","language":"English","message":"English message."},{"locale":"nl","language":"Dutch","message":"Dutch message."}]}
答案 0 :(得分:0)
对于不包含冒号的HTTP请求标头,可能会发生异常。 HTTP 1.1标准请求标头始终具有冒号。它可能是由于网络拓扑中的防火墙,负载均衡器,代理以某种方式对标头进行了加扰。
另一种可能性:例外是在Wink库中。 worklightadmin war文件包含自己的Wink版本。可能会发生Wink的内部版本与Web服务器中存在的其他Wink版本冲突,即使在其他Web应用程序中也是如此。因此,使用“parent-last”类加载器策略很重要。
在Websphere控制台中:点击服务器>服务器类型> WebSphere Application Server ,并选择用于IBM MobileFirst Platform Foundation的服务器。
接下来,按以下方式选择“父母最后”政策:
请在更改后重新启动网络服务器。