- This topic has 6 replies, 3 voices, and was last updated 16 years, 3 months ago by gina1987.
-
AuthorPosts
-
david-garciaMemberHallo,
I’ve added struts capabilities to my webproject and how it seems myeclispe can not configure to validator plugin so i decided to add to validator plugin manually. But no I got a error messages on starting the tomcat server:
INFO: Loading validation rules file from ‘/WEB-INF/validation.xml’
06.06.2005 12:54:03 org.apache.struts.validator.ValidatorPlugIn init
SCHWERWIEGEND: null
java.lang.NullPointerException
at org.apache.commons.validator.ValidatorResources.processForms(ValidatorResources.java:364)
at org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:327)
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
06.06.2005 12:54:03 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
06.06.2005 12:54:04 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
06.06.2005 12:54:04 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/78 config=D:\Programme\Apache Software Foundation\Tomcat 5.0\conf\jk2.properties
06.06.2005 12:54:04 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5312 msHow it seems tomcat can’t find ‘/WEB-INF/validation.xml’ but I have defined it and it’s exactly there where it has to be. In the case I make my Project without myeclipse everything works nice and tomcat has no problems to start up. I have been looking for any difference between the the manual installation of struts and the automatically but I could not find anything. I’m working with struts a long time but I never saw this error message so I’m little bit confused.
Here is my configuration of the validator plugin in struts-config.xml:
<plug-in className=”org.apache.struts.validator.ValidatorPlugIn”>
<set-property property=”pathnames” value=”/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml”/>
</plug-in>I’m using myeclipse3.8.4 with eclipse 3.0.2 on windows xp.
Thanks
David
Riyad KallaMemberWhen you make your project a web project, what are you setting the WebRoot folder to? Are you using the root of your project as the WebRoot directory?
I would like to see the outline of your project directories and note which directory is your source, webroot, and output dir. Also please wrap the dirs in code tags (using the code button below) so they maintain formatting and indentation.
david-garciaMemberI’m using the default WebRoot and Source Folder that is given for new webprojects in myeclipse and not the root of my project.
My outputdir is TOMCAT_HOME/vhost/the_hostname/webapps/the_webapp.
-project + src/ + JRE + J2ee + jstl.jar + standard.jar + commons-beanutils.jar + commons-collections.jar + commons-digister.jar + commons-fileupload.jar + commons-lang.jar + commons-logging.jar + commons-validator.jar + jakarta-oro.jar + struts-lagacy.jar + struts.jar - WebRoot + META-INF - WEB-INF --- validator-rules.xml --- validation.xml --- struts-config.xml
I think that was what you wanted to know if not please forgive my misunderstanding I’am german.
Thanks
David
Riyad KallaMemberDavid,
I have done some research and this problem is not with MyEclipse, everything you have configured is correct. Please see this thread:
http://forum.java.sun.com/thread.jspa?threadID=617068&tstart=75And these results for help:
http://www.google.com/search?hl=en&q=ValidatorPlugIn+init+&btnG=Google+Search
david-garciaMemberWell,
the validator doesn’t work caused by the dtd. If I change the DTD against an older it works fine. But that’s strange ’cause this version of the DTD is of Struts 1.0 and 1.1 but I’m using Struts 1.2 in my project. Well if you don’t know the solution for this problem on the first try I’m now satified with the older version. But strange it is, isn’t it?
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd"> <!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
Thanks
David
Riyad KallaMemberThank you for posting your solution for others… as far as it being strange, yes it is very strange. I have no idea why the parser would care…
gina1987MemberHey I got the same problem and it works too by changing the dtd to an older version. Thanks
-
AuthorPosts