Thanks Chris for the quick response, for class loader it is <Loader> but as 
your saying not make that change so will not. Validator-rules. Xml file is 
under Catalina_Home/webapps/<app-name>/WEB-INF/ and the app is in exploded 
format. This is working fine on tomcat 5.x and we just copied the files from 
their to tomcat 7.x. 
Yes, this looks normal as other functionalities are working except when we call 
struts it doesn't work.

Thanks
Raj


Sent from my iPhone

> On May 15, 2015, at 6:52 AM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Raj,
> 
>> On 5/13/15 10:29 PM, Raj wrote:
>> Hi Chris, Thanks for your response. Sorry for the late response as
>> I was out of town.
>> 
>> I verified struts-config.xml the files and have 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" />
>> 
>> </plug-in>
>> 
>> There is some changes in Tomcat 5.x and Tomcat 7.x as to how the
>> classes are loaded, I have a feeling that is what is the issue. I
>> changed the context.xml for my app so that <loader
>> delegate="true"/> so the class loader should behave the same way
>> but the issue is still present. Can you give some more pointers?
> 
> Sure. First, don't change the load order of your class loader. If you
> really typed the above, then you haven't changed anything because
> <loader> is not valid. It would need to be <Loader> (case matters).
> 
> First, I would double-check to see if you have any newline characters
> in your "value" above. It probably won't matter, but I don't have any
> in mine, and mine works just fine under Tomcat versions 4 through 9.
> 
> Where is your file "validator-rules.xml"? In a WAR? If so, where is
> the WAR file? On the disk? If so, where on the disk. What is your
> CATALINA_HOME? CATALINA_BASE? What is the appBase for your <Host>?
> 
> Nothing has changed in Tomcat's resource-loading that should cause a
> problem unless you have some kind of very fragile setup. What you have
> presented so far looks perfectly normal, and Tomcat should not
> interfere with loading that file, just as it's always been able to do.
> 
> Thanks,
> - -chris
> 
>> On Thu, May 7, 2015 at 6:56 AM, Christopher Schultz < 
>> ch...@christopherschultz.net> wrote:
>> 
>> 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
>>> 
>>> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBCAAGBQJVVd3vAAoJEBzwKT+lPKRYdSsP+QHQBtwAO3MTPxivSCezLaal
> ephor9Qlp0rUzxrhnpm42c1Ip9TU8xjN3qmVFRNsO0TeEHheseNIrLjxQi/u+7b6
> K831TR8FVaS9RcbEFTG6EhTH0tyUpcNiJYFfdtVuBQXjrrHu1PEBAa3DbZ1fWsG6
> BPDKYhpPvzqvzd12AywRVysX0wmDds1EXCiURIqh4fW6/a81OBYmt0rGdVlOAG86
> uJIi7wdXa374oYXoroblIQc4QhG6ir4EIdldP2bfFV8Kx3wNYvMim7ZPtG/+3fEL
> QZO+mjHBCiPynWSgEVn9VhrOZOABdTj7yl3Ymq4y3hH+99FdDyyHLEUnsne458PN
> Y6RNICibBmzi/3uOTRa+7MjlDy07S71pBoz6Mi/mz/VGRUdwKzJjozCx5H0dLqyI
> di/x86NDJFdR9Mlq0ky7Tv2+mtGIa2u4FzkCjRGFk91e9JPTn1/bzJ9WIfKHtZoq
> ksXnnyWgFktlzWEQi8Hm9nMtpvZglDsA5mfYlWQs3+10VM5ijCvSAZXIvmCP/OB7
> 7pw3qPn7iq0J6Y+xv2ZRfK5dYyVNK1H6k4QRd5GBa47gLTRAwBiRgo1kLA6M4nH0
> U+tRIdQsPep0qoNg+ePqxMi1zJAhU92ZCObSlDLYRKWfNNPuyOQ/uN5QI23XshJW
> AGh9g/9bQmG/dDVMEk2y
> =gkMk
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

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

Reply via email to