2012-05-04 109 views
2

我們在weblogic 10.3.0.0中運行了一堆CXF Web服務。java.io.UnsupportedEncodingException:Unsupported Encoding utf-8「; action =」

在零星的情況下,它看起來像網絡層不能讀取XML流和weblogic服務器扔 以下錯誤。我們的服務消費者說他們正在接收XML流或偶爾讀取超時異常。應用程序日誌顯示爲java.net.SocketException。 服務消費者也表示,如果他們再次提交相同的請求 ,他們會收到正確的迴應,沒有任何問題。

以下是問題的日誌。此日誌來自weblogic的託管服務器(不是應用程序日誌)。另外,我粘貼在標題詳細信息的下方以獲得成功的調用。

####<May 3, 2012 6:21:44 PM CDT> <Error> <HTTP> <xxxxxxxx.yyyyyyyy.com> <server2> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1336087304531> <BEA-101108> <[[email protected] - appName: 'webservice-aa-bb-1', name: 'webservice-aaa', context-path: '/webservice-aaa', spec-version: 'null'] Unsupported encoding: "utf-8";action="" specified. 
java.io.UnsupportedEncodingException: Unsupported Encoding utf-8";action=" 
     at weblogic.servlet.internal.ServletRequestImpl.setCharacterEncoding(ServletRequestImpl.java:428) 
     at weblogic.servlet.internal.ServletRequestImpl.initRequestEncoding(ServletRequestImpl.java:1115) 
     at weblogic.servlet.internal.ServletRequestImpl.getCharacterEncoding(ServletRequestImpl.java:451) 
     at org.apache.cxf.transport.http.HttpServletRequestSnapshot.<init>(HttpServletRequestSnapshot.java:69) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination$1.cacheInput(AbstractHTTPDestination.java:245) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination.cacheInput(AbstractHTTPDestination.java:441) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:453) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:446) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStream.onFirstWrite(AbstractHTTPDestination.java:589) 
     at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) 
     at org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:68) 
     at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96) 
     at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214) 
     at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194) 
     at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1685) 
     at com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585) 
     at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:282) 
     at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:270) 
     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) 
     at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:104) 
     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:323) 
     at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118) 
     at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208) 
     at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223) 
     at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205) 
     at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113) 
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) 
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163) 
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) 
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) 
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) 
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) 
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498) 
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 
     at weblogic.security.service.SecurityManager.runAs(Unknown Source) 
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180) 
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086) 
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) 
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) 
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) 

以下是我們調試日誌中的標頭詳細信息。這個標題反應成功。我無法捕捉不成功的服務請求頭。

[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.417: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: Accept : application/soap+xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 
[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.418: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: X-dynaTrace : FW0;-705664711;1266;3;964372818;3656;2 
[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.418: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: User-Agent : Jakarta Commons-HttpClient/3.1 
[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.418: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: Host : abcd.efg.hjk.com 
[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.418: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: Content-Length : 496 
[________,[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']:D: 03 18:01:41.419: ResponseTimeInInterceptor.handleMessage: HTTP Header :::::: Content-Type : application/soap+xml;charset="utf-8";action="" 

在此先感謝。

回答

-2

您是dynaTrace的客戶嗎? (我剛剛在請求標題中看到了dt標籤)。

您會在錯誤/例外視圖中看到這些未處理的異常,然後只需點擊一下即可輕鬆執行操作和受影響的用戶。