I found the problem. I had exported the jar from Eclipse but hadn't 
checked the "Add directory entries" checkbox. The way ResolverUtil works 
now is to translate the package to a directory then ask the ClassLoader 
for the directory. If a separate directory entry doesn't exist in the 
jar the ClassLoader will return an empty Enumeration. :(

It looks like it could be a bug in ClassLoader.getResources(). :(

This behavior probably needs to be documented somewhere so others don't 
get bitten by it.

Aaron

Aaron Porter wrote:
> Sorry about posting on the user list.
> 
> I messed with it for at least an hour trying to get it to work. I only 
> tried it on one server that I haven't touched in quite a while. I'll try 
> it on some other servers and try to isolate the problem. It could just 
> be that the server I was trying it on has some old config files that 
> were from Tomcat 5.5.7 or something. I think it was the first server I 
> installed Tomcat 5.5 on so who knows what I screwed up.
> 
> I'll let you know if I can't get it working right. The strange thing is 
> that Stripernate is finding the classes in the jar just fine. :(
> 
> Thanks for checking.
> 
> Aaron
> 
> Tim Fennell wrote:
>> Ok, you had me worried for a few minutes there.  The examples app  
>> uses all classes in /WEB-INF/classes, so this isn't well tested!  But  
>> I just modified it to look for classes in the package  
>> net.sourceforge.stripes and it scanned all the classes in the  
>> stripes.jar that is held in /WEB-INF/lib.
>>
>> I tested with both Tomcat 5.5.17 and 5.5.20....both worked...
>>
>> -t
>>
>> ps. replying on dev list since this isn't really suitable for the  
>> user list
>>
>>
>> On Oct 18, 2006, at 8:34 PM, Aaron Porter wrote:
>>
>>> The latest version of ResolverUtil won't check inside of jar files in
>>> /WEB-INF/lib/ on Tomcat 5.5.17. Is that the correct behavior?
>>>
>>> Took me a while to figure out what was going on. Setting
>>> ActionResolver.Packages to the package name wasn't working.  
>>> Changing it
>>> to an empty string revealed that loader.getResources() isn't returning
>>> any jar files, just directories. to After extracting the classes to
>>> /WEB-INF/classes/ everything was fine.
>>>
>>> Aaron
>>>
>>>
>>> ---------------------------------------------------------------------- 
>>> ---
>>> Using Tomcat but need to do more? Need to support web services,  
>>> security?
>>> Get stuff done quickly with pre-integrated technology to make your  
>>> job easier
>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
>>> Geronimo
>>> http://sel.as-us.falkag.net/sel? 
>>> cmd=lnk&kid=120709&bid=263057&dat=121642
>>> _______________________________________________
>>> Stripes-users mailing list
>>> [EMAIL PROTECTED]
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to