我們在WAS ND 8.5.5.5和SDK 7.0.8.10上運行MFP 7.0。有時用戶在執行各種操作時遇到「服務器錯誤,請聯繫服務器管理員」。重試「解決」這個問題。MobileFirst管理服務不時拋出java.lang.StringIndexOutOfBoundsException
從在這種情況下,失敗的動作的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分析器工具運行了應用服務器的詳細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."}]}
你能否提供PUT請求的內容? –