您好,登錄后才能下訂單哦!
今天就跟大家聊聊有關CXF項目tomcat發布成功后weblogic出現Cannot create a secure XMLInputFactory異常怎么處理,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結了以下內容,希望大家根據這篇文章可以有所收獲。
問題:weblogic 部署項目出現 Cannot create a secure XMLInputFactory
七月 30, 2019 3:48:36 下午 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging 警告: Interceptor for {mdm.csg.cn}CheckDataService has thrown exception, unwinding now java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:338) at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:278) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1723) at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:127) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) 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:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) [15:48:36:600] [INFO] - cn.csg.drm.mdm.check.handler.CxfHandler.getHeaders(CxfHandler.java:23) - set qName [15:48:36:647] [ERROR] - cn.csg.drm.mdm.check.handler.CxfHandler.handleFault(CxfHandler.java:35) - handler Fault [15:48:36:648] [INFO] - cn.csg.drm.mdm.check.handler.CxfHandler.close(CxfHandler.java:41) - close <2019-7-30 下午03時48分41秒 CST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 0:0:0:0:0:0:0:1:55,360 during the configured idle timeout of 5 secs>
解決方案:在web-inf 目錄下添加:weblogic.xml
<?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd"> <container-descriptor> <index-directory-enabled>true</index-directory-enabled> <prefer-web-inf-classes>true</prefer-web-inf-classes> </container-descriptor> </weblogic-web-app>
總結:weblogic 與自定義jar 沖突,添加weblogic.xml 優先加載 lib下jar包。
看完上述內容,你們對CXF項目tomcat發布成功后weblogic出現Cannot create a secure XMLInputFactory異常怎么處理有進一步的了解嗎?如果還想了解更多知識或者相關內容,請關注億速云行業資訊頻道,感謝大家的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。