xwork-validator-1.0.2.dtd问题

简介: xwork-validator-1.0.2.dtd问题

问题现象


image.png

Connection timed out: connect - [unknown location]

at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:117)

at com.opensymphony.xwork2.validator.DefaultValidatorFileParser.parseActionValidatorConfigs(DefaultValidatorFileParser.java:82)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:372)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:261)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:353)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:89)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:128)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:120)

at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:115)

at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:224)

at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:259)

at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:73)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:192)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:115)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:248)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:139)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:155)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:120)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:195)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)

at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)

at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)

at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)

at org.apache.coyote.AbstractProtocol A b s t r a c t C o n n e c t i o n H a n d l e r . p r o c e s s ( A b s t r a c t P r o t o c o l . j a v a : 673 ) a t o r g . a p a c h e . t o m c a t . u t i l . n e t . N i o E n d p o i n t AbstractConnectionHandler.process(AbstractProtocol.java:673) at org.apache.tomcat.util.net.NioEndpoint AbstractConnectionHandler.process(AbstractProtocol.java:673)atorg.apache.tomcat.util.net.NioEndpointSocketProcessor.doRun(NioEndpoint.java:1500)

at org.apache.tomcat.util.net.NioEndpoint S o c k e t P r o c e s s o r . r u n ( N i o E n d p o i n t . j a v a : 1456 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1142 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor SocketProcessor.run(NioEndpoint.java:1456)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:617)

at org.apache.tomcat.util.threads.TaskThread W r a p p i n g R u n n a b l e . r u n ( T a s k T h r e a d . j a v a : 61 ) a t j a v a . l a n g . T h r e a d . r u n ( T h r e a d . j a v a : 748 ) C a u s e d b y : j a v a . n e t . C o n n e c t E x c e p t i o n : C o n n e c t i o n t i m e d o u t : c o n n e c t a t j a v a . n e t . D u a l S t a c k P l a i n S o c k e t I m p l . c o n n e c t 0 ( N a t i v e M e t h o d ) a t j a v a . n e t . D u a l S t a c k P l a i n S o c k e t I m p l . s o c k e t C o n n e c t ( D u a l S t a c k P l a i n S o c k e t I m p l . j a v a : 79 ) a t j a v a . n e t . A b s t r a c t P l a i n S o c k e t I m p l . d o C o n n e c t ( A b s t r a c t P l a i n S o c k e t I m p l . j a v a : 350 ) a t j a v a . n e t . A b s t r a c t P l a i n S o c k e t I m p l . c o n n e c t T o A d d r e s s ( A b s t r a c t P l a i n S o c k e t I m p l . j a v a : 206 ) a t j a v a . n e t . A b s t r a c t P l a i n S o c k e t I m p l . c o n n e c t ( A b s t r a c t P l a i n S o c k e t I m p l . j a v a : 188 ) a t j a v a . n e t . P l a i n S o c k e t I m p l . c o n n e c t ( P l a i n S o c k e t I m p l . j a v a : 172 ) a t j a v a . n e t . S o c k s S o c k e t I m p l . c o n n e c t ( S o c k s S o c k e t I m p l . j a v a : 392 ) a t j a v a . n e t . S o c k e t . c o n n e c t ( S o c k e t . j a v a : 589 ) a t j a v a . n e t . S o c k e t . c o n n e c t ( S o c k e t . j a v a : 538 ) a t s u n . n e t . N e t w o r k C l i e n t . d o C o n n e c t ( N e t w o r k C l i e n t . j a v a : 180 ) a t s u n . n e t . w w w . h t t p . H t t p C l i e n t . o p e n S e r v e r ( H t t p C l i e n t . j a v a : 463 ) a t s u n . n e t . w w w . h t t p . H t t p C l i e n t . o p e n S e r v e r ( H t t p C l i e n t . j a v a : 558 ) a t s u n . n e t . w w w . h t t p . H t t p C l i e n t . < i n i t > ( H t t p C l i e n t . j a v a : 242 ) a t s u n . n e t . w w w . h t t p . H t t p C l i e n t . N e w ( H t t p C l i e n t . j a v a : 339 ) a t s u n . n e t . w w w . h t t p . H t t p C l i e n t . N e w ( H t t p C l i e n t . j a v a : 357 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . g e t N e w H t t p C l i e n t ( H t t p U R L C o n n e c t i o n . j a v a : 1202 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . p l a i n C o n n e c t 0 ( H t t p U R L C o n n e c t i o n . j a v a : 1138 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . p l a i n C o n n e c t ( H t t p U R L C o n n e c t i o n . j a v a : 1032 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . c o n n e c t ( H t t p U R L C o n n e c t i o n . j a v a : 966 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . g e t I n p u t S t r e a m 0 ( H t t p U R L C o n n e c t i o n . j a v a : 1546 ) a t s u n . n e t . w w w . p r o t o c o l . h t t p . H t t p U R L C o n n e c t i o n . g e t I n p u t S t r e a m ( H t t p U R L C o n n e c t i o n . j a v a : 1474 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L E n t i t y M a n a g e r . s e t u p C u r r e n t E n t i t y ( X M L E n t i t y M a n a g e r . j a v a : 647 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L E n t i t y M a n a g e r . s t a r t E n t i t y ( X M L E n t i t y M a n a g e r . j a v a : 1304 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L E n t i t y M a n a g e r . s t a r t D T D E n t i t y ( X M L E n t i t y M a n a g e r . j a v a : 1270 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L D T D S c a n n e r I m p l . s e t I n p u t S o u r c e ( X M L D T D S c a n n e r I m p l . j a v a : 264 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L D o c u m e n t S c a n n e r I m p l WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) at sun.net.www.http.HttpClient.New(HttpClient.java:339) at sun.net.www.http.HttpClient.New(HttpClient.java:357) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1304) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1270) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:264) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl WrappingRunnable.run(TaskThread.java:61)atjava.lang.Thread.run(Thread.java:748)Causedby:java.net.ConnectException:Connectiontimedout:connectatjava.net.DualStackPlainSocketImpl.connect0(NativeMethod)atjava.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)atjava.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)atjava.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)atjava.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)atjava.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)atjava.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)atjava.net.Socket.connect(Socket.java:589)atjava.net.Socket.connect(Socket.java:538)atsun.net.NetworkClient.doConnect(NetworkClient.java:180)atsun.net.www.http.HttpClient.openServer(HttpClient.java:463)atsun.net.www.http.HttpClient.openServer(HttpClient.java:558)atsun.net.www.http.HttpClient.(HttpClient.java:242)atsun.net.www.http.HttpClient.New(HttpClient.java:339)atsun.net.www.http.HttpClient.New(HttpClient.java:357)atsun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)atsun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)atsun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)atsun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)atsun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)atsun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)atcom.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)atcom.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1304)atcom.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1270)atcom.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:264)atcom.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImplDTDDriver.dispatch(XMLDocumentScannerImpl.java:1161)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl D T D D r i v e r . n e x t ( X M L D o c u m e n t S c a n n e r I m p l . j a v a : 1045 ) a t c o m . s u n . o r g . a p a c h e . x e r c e s . i n t e r n a l . i m p l . X M L D o c u m e n t S c a n n e r I m p l DTDDriver.next(XMLDocumentScannerImpl.java:1045) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl DTDDriver.next(XMLDocumentScannerImpl.java:1045)atcom.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImplPrologDriver.next(XMLDocumentScannerImpl.java:959)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)

at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)

… 71 more


解决方案


经查struts2-core-2.5.jar中,

****

已经不存在,改为

****


image.pngimage.png


注意


新老版本要多多留意细节,比如dtd位置、个别类目变化等的。


目录
相关文章
|
前端开发 Java 数据库连接
19dwr - DWR 与 Hibernate整合
19dwr - DWR 与 Hibernate整合
32 0
|
5月前
|
XML 搜索推荐 Java
JAXB的常用注解讲解
JAXB的常用注解讲解
|
6月前
|
Java
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
SpringBoot注入出现@org.springframework.beans.factory.annotation.Autowired(required=true)
82 0
|
Java PHP
17dwr - DWR 与 Struts整合
17dwr - DWR 与 Struts整合
35 0
|
6月前
|
Web App开发 JSON 前端开发
SpringMVC HttpMessageConverter
SpringMVC HttpMessageConverter
38 0
|
6月前
|
Web App开发 JSON 前端开发
SpringMVC之HttpMessageConverter
【1月更文挑战第19天】 HttpMessageConverter,报文信息转换器,将请求报文转换为Java对象,或将Java对象转换为响应报文 HttpMessageConverter提供了两个注解和两个类型:@RequestBody,@ResponseBody,RequestEntity, ResponseEntity
56 0
|
6月前
|
Web App开发 JSON 前端开发
springMVC之HttpMessageConverter
springMVC之HttpMessageConverter
|
JSON 前端开发 Java
详解 SpringMVC 的 HttpMessageConverter
HttpMessageConverter是Spring Framework中的一个接口,用于处理HTTP请求和响应的消息转换。 在Spring MVC中,HttpMessageConverter主要用于将HTTP请求的输入内容转换为指定的Java对象,以及将Java对象转换为HTTP响应的输出内容。它负责处理请求和响应的数据格式转换,例如将请求的JSON或XML数据转换为Java对象,并将Java对象转换为JSON或XML格式的响应数据。 Spring MVC提供了多个默认的HttpMessageConverter实现,包括处理JSON、XML、文本等格式的Converter。另外,我们也
|
前端开发 Java 数据库连接
Hibernate Validator -- 伟大的校验器
validator Engine 是支持Javax.validator 的接口的实现, 并且可以通过一些简单的标注的形式(annotation形式)实现一个校验的形式, 它其实也是一个约定大于执行的过程
156 0
|
开发框架 缓存 安全
Hibernate Validator的应用实践
Hibernate Validation目前最新的稳定版本是:5.1.3。 下载地址 官网地址 官方英文使用手册 官方中文使用手册地址 (中文版目前最新的是4.3版本) 具体用法可以参考官方文档。
238 0