今天就跟大家聊聊有关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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。