尝试使用wildfly10中的ehcache.xml实现ehcache
将ehcache.jar文件添加为模块并添加了依赖项,如下所述:
<resources>
<resource-root path="ehcache-1.2.2.jar"/>
</resources>
<dependencies>
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="javax.xml.parsers"/>
</dependencies>
</module>
当我尝试运行服务器war文件时,我收到以下错误。
从d:\ ehcache.xml配置时出错。最初的原因是从输入流配置错误。最初的原因是__redirected .__ SAXParserFactory无法强制转换为javax.xml.parsers.SAXParserFactory
任何领导都会有所帮助。
堆栈跟踪:
- net.sf.ehcache.CacheException:从配置时出错
d:\的Ehcache \ ehcache.xml中。最初的原因是从配置错误
输入流。最初的原因是__redirected .__ SAXParserFactory
无法转换为javax.xml.parsers.SAXParserFactory
net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:80)
net.sf.ehcache.CacheManager.parseConfiguration(CacheManager.java:752)
net.sf.ehcache.CacheManager.init(CacheManager.java:386)
net.sf.ehcache.CacheManager。(CacheManager.java:295)
MySqlTest.ehcache(MySqlTest.java:93)
MySqlTest.processRequest(MySqlTest.java:77)
MySqlTest.doGet(MySqlTest.java:224)
javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
io.undertow.servlet.handlers.ServletInitialHandler.access $ 000(ServletInitialHandler.java:81)
io.undertow.servlet.handlers.ServletInitialHandler $ 1.handleRequest(ServletInitialHandler.java:174)
io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
io.undertow.server.HttpServerExchange $ 1.run(HttpServerExchange.java:793)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)