tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Issues with Tomcat 7.0.57 not loading ActionServlets
Date Thu, 07 May 2015 11:56:14 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Raj,

On 5/6/15 8:55 PM, Raj wrote:
> I upgraded my application from tomcat 5.5.15, JDK 1.5, Struts 1.1
> on Debian 2.6.32 to tomcat 7.0.57, JDK 1.6, struts 1.1 on
> ubuntu14.04 and Action Servlets are not loading. I am thinking of
> this is something to do with version conflict. Please let me know
> what I am missing.

I assure you that Struts 1.1 works on Tomcat 7.0.57 and Java 1.6. What
you describe is my production environment, which works quite well.

> Below is the error
> 
> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.ApplicationContext
> log
> 
> INFO: org.apache.webapp.balancer.BalancerFilter: init():
> ruleChain: [org.apache.webapp.balancer.RuleChain:
> RoundRobinRule@643fd34a]
> 
> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.ApplicationContext
> log
> 
> INFO: Marking servlet action as unavailable
> 
> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.StandardContext 
> loadOnStartup
> 
> SEVERE: Servlet  threw load() exception
> 
> javax.servlet.UnavailableException: Cannot load a validator
> resource from '/WEB-INF/validator-rules.xml'

Evidently, you are missing validator-rules.xml from your /WEB-INF/
directory. The Struts validator plug-in uses struts-config.xml to
locate the validator-rules.xml file. Look at your web.xml to find out
what file Struts is using to load its configuration.

You are looking for the "config" init-param for the
"org.apache.struts.action.ActionServlet" servlet. There may be more
than one file listed under "config"; you'll have to check them all.

Look in each of those "config" files. Look for the string
"org.apache.struts.validator.ValidatorPlugIn", which will define a
plug-in. The "pathnames" property for the plug-in will list the files
that the validator plug-in is going to try to load.

All of those files need to be available on the classpath or
filesystem. You probably have something like this:

  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"

value="/org/apache/struts/validator/validator-rules.xml,
/WEB-INF/validator-rules.xml" />
    <set-property property="stopOnFirstError" value="false" />
  </plug-in>

Check to see that all of those paths point to actual resources that
can be loaded from your web application. Note that the first value
(/org/apache/struts/validator/validator-rules.xml) is loaded from one
of the Struts JAR files.

BTW Struts 1-based applications also work just fine on Tomcat 8 and
Java 8. Since you are upgrading, you should probably go all the way up.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVS1LdAAoJEBzwKT+lPKRY0nkP/RL8V6S3QJ7U+ovgLio1igE2
ABq69Mz+fYrhyO7LcAgkQ3WDaYbfPNxPMhIQW+rffLiuEUKj1i5z+b9ow7Ywg21/
BwVeY7BhUHMmeLi3+9YyR4Z8MUL66fsra4r9Ux5QD2z6tMpWLBOOeG+7pn15p5SM
0ad2KlMQwiBFhNmmkf6rrC3Y4zM/XHFveLftJevpK2opeykmLY9bgBxRbZ2vTTAj
YAYdaFCiXg+zNVfqbxUGVUmMU6W8W3Lh87cuDiZLsBv39vUWisGIFmF/5ZivIT/J
MYTPmD8QP8hSMgILvHGtcDQMVL8XrXXwaP/H4sfMjb0HHlAt29EFBNHE8RPC7S/C
EKWZhOlU6YaXagqhImPy/6ZnFHVlIP7TSHPenjziu9aaGHNTJrzxynZcv+F3napG
u1MzkTZM3gkgiYfO90ogykOQm7mDjywAV+P4K3n53mf5pvAoZVJ/jpB+mQd+Z9e+
zthzYrREIwD7tEHcKIU3T950t7pDqv1Qu4999QKtcw0Tgr/tnLsm1eub5o+8Nfa/
YHOOe7yP4A9u0Olpd0i90aLi0+dfu0Qx5M6cAigwVvwvMwa9sleyuEm+f+RkUC7H
sLP4R3i6V1Ch2zyJQKtfpuicfjuw4kXMGEVY1nrrWxpKiFxpKr0okfDybkb/uonD
yuzDyjsDnJg3B+Ad6ZZe
=5Jwr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message