struts validator

struts validator - Java - Programmation

Marsh Posté le 26-10-2005 à 11:47:49    

slt,
 
j'ai un pb:
 
lorsque j'ajoute a mon struts-config.xml le plug-invalidator:  
 

Citation :

<!-- ========== Plug Ins Configuration ================================= -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
     <set-property property="pathnames"
               value="/WEB-INF/validator-rules.xml,
                      /WEB-INF/validation.xml"/>
</plug-in>


 
j'ai le message suivant lors du deploiement:
 

Citation :

ValidatorPlugIn.initResources : Loading validation rules file from '/WEB-INF/validator-rules.xml'
2005-10-26 11:12:40,365 : ValidatorPlugIn.initResources : Loading validation rules file from '/WEB-INF/validation.xml'
2005-10-26 11:12:40,865 : Digester.fatalError : Parse Fatal Error at line 1 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
 at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
 at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.commons.digester.Digester.parse(Digester.java:1591)
 at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:159)
 at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
 at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3427)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3628)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162)
 at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doRegisterWar(CatalinaJWebContainerServiceImpl.java:441)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebContainerServiceImpl.java:761)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(AbsJWebContainerServiceImpl.java:344)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doStart(CatalinaJWebContainerServiceImpl.java:245)
 at org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:67)
 at org.objectweb.jonas.service.ServiceManager.startServices(ServiceManager.java:308)
 at org.objectweb.jonas.server.Server.start(Server.java:198)
 at org.objectweb.jonas.server.Server.main(Server.java:311)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:398)
2005-10-26 11:12:40,880 : ValidatorPlugIn.initResources : Skipping all validation
org.xml.sax.SAXParseException: Premature end of file.
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.commons.digester.Digester.parse(Digester.java:1591)
 at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:159)
 at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
 at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3427)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3628)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162)
 at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doRegisterWar(CatalinaJWebContainerServiceImpl.java:441)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebContainerServiceImpl.java:761)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(AbsJWebContainerServiceImpl.java:344)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doStart(CatalinaJWebContainerServiceImpl.java:245)
 at org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:67)
 at org.objectweb.jonas.service.ServiceManager.startServices(ServiceManager.java:308)
 at org.objectweb.jonas.server.Server.start(Server.java:198)
 at org.objectweb.jonas.server.Server.main(Server.java:311)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:398)
2005-10-26 11:12:40,912 : ValidatorPlugIn.init : Premature end of file.
javax.servlet.ServletException: Premature end of file.
 at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:240)
 at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3427)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3628)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162)
 at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doRegisterWar(CatalinaJWebContainerServiceImpl.java:441)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebContainerServiceImpl.java:761)
 at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(AbsJWebContainerServiceImpl.java:344)
 at org.objectweb.jonas.web.catalina41.CatalinaJWebContainerServiceImpl.doStart(CatalinaJWebContainerServiceImpl.java:245)
 at org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:67)
 at org.objectweb.jonas.service.ServiceManager.startServices(ServiceManager.java:308)
 at org.objectweb.jonas.server.Server.start(Server.java:198)
 at org.objectweb.jonas.server.Server.main(Server.java:311)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:398)


 
si quelqu'un peut m'aider please,
 
merci d'avance :)

Reply

Marsh Posté le 26-10-2005 à 11:47:49   

Reply

Marsh Posté le 26-10-2005 à 11:56:47    

Citation :

Loading validation rules file from '/WEB-INF/validation.xml'
2005-10-26 11:12:40,865 : Digester.fatalError : Parse Fatal Error at line 1 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.


 
bah voila, de rien [:itm]
 
tu nous montres ton fichier validation.xml ? [:petrus75]

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed