来自cxf-ehcache.xml

时间:2019-01-30 14:21:26

标签: cxf ehcache wss4j

当我在PC中使用我的应用程序时,它可以正常工作,但是当wss4j决定在EHCacheManagerHolder.java中创建chache管理器时,当它部署在服务器中时,它将返回NullPointerException。 详细地,cxf-ehcache.xml文件使用了maxEntriesLocalHeap,而ehcache不接受maxEntriesLocalHeap。
问题在哪里?

  

net.sf.ehcache.CacheException:从jar:文件配置错误:/opt/tomcat/webapps/ESB/WEB-INF/lib/cxf-rt-ws-security-3.2.7.jar!/ cxf- ehcache.xml。最初的原因是从输入流配置时出错。在里面   根本原因为空:4:元素不允许属性“ maxEntriesLocalHeap”。           在net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:103)           在org.apache.wss4j.common.cache.EHCacheManagerHolder.findDefaultCacheManager(EHCacheManagerHolder.java:147)           在org.apache.wss4j.common.cache.EHCacheManagerHolder.getCacheManager(EHCacheManagerHolder.java:107)           在org.apache.cxf.ws.security.cache.EHCacheUtils.getCacheManager(EHCacheUtils.java:48)           在org.apache.cxf.ws.security.tokenstore.EHCacheTokenStore。(EHCacheTokenStore.java:58)           在org.apache.cxf.ws.security.tokenstore.EHCacheTokenStoreFactory.newTokenStore(EHCacheTokenStoreFactory.java:37)           在org.apache.cxf.ws.security.tokenstore.TokenStoreUtils.getTokenStore(TokenStoreUtils.java:57)           在org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:629)           在org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:599)           在org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:229)           在org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:176)           在org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:87)           在org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)           在org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)           在org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)           在org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)           在org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)           在org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)           在org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)           在org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)           在org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220)           在javax.servlet.http.HttpServlet.service(HttpServlet.java:648)           在org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)           在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)           在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)           在org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)           在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)           在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)           在net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:157)           在net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:131)           在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)           在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)           在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)           在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)           在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)           在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)           在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)           在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)           在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)           在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)           在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)           在org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:668)           在org.apache.coyote.http11.Http11NioProtocol $ Http11ConnectionHandler.process(Http11NioProtocol.java:223)           在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1517)           在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1474)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)           在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)           在org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)           在java.lang.Thread.run(Thread.java:748)   引起原因:net.sf.ehcache.CacheException:从输入流配置时出错。初始原因为空:4:元素不允许属性“ maxEntriesLocalHeap”。           在net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:157)           在net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:101)           ...另外48个   原因:org.xml.sax.SAXException:null:4:元素不允许属性“ maxEntriesLocalHeap”。           在net.sf.ehcache.config.BeanHandler.setAttribute(BeanHandler.java:282)           在net.sf.ehcache.config.BeanHandler.startElement(BeanHandler.java:113)           在com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)           在com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)           在com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)           在com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl $ FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)           在com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)           在com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)           在com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)           在com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)           在com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)           在com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)           在com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl $ JAXPSAXParser.parse(SAXParserImpl.java:643)           在com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)           在javax.xml.parsers.SAXParser.parse(SAXParser.java:195)           在net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:155)           ...还有49个

0 个答案:

没有答案