[ 
http://www.stripesframework.org/jira/browse/STS-666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11695#action_11695
 ] 

Jan Novotný commented on STS-666:
---------------------------------

I am using WAS 6.1.0.0 and have run into specified problems. By debuggint I 
have discovered the source of this problem and it has simple workaround - in 
ResolverUtil class the code for finding the JAR is as follows:

packageName = packageName.replace('.', '/');
ClassLoader loader = getClassLoader();
urls = loader.getResources(packageName);
while (urls.hasMoreElements()) {
   ...
}

This means that if I put into web.xml following init-param:

        <init-param>
            <param-name>ActionResolver.Packages</param-name>
            <param-value>com.fg</param-value>
        </init-param>

Line executes as: urls = loader.getResources("com/fg");
But on this version of WAS returned Enumeration has no items!

Playing with it a bit I found out that if I use it like that (notice the 
backslash at the end): urls = loader.getResources("com/fg/");
Enumeration founds items in it and thus JAR container could be found and 
ActionBeans are then resolved as expected. 

So the workaround for me was quite simple - just specify this (notice the dot 
at the end of package specification):

        <init-param>
            <param-name>ActionResolver.Packages</param-name>
            <param-value>com.fg.</param-value>
        </init-param>

This works.

Fortunately this setting works even on Apache Tomcat (5.5.23) that is my secont 
target deployment environment.

I wonder if it's not a standard that when trying to access "directory" resource 
via classloader, backslash should be at the end?! If so, I think Stripes should 
adapt to this.

> ActionBeans, Converters etc. in jars not scanned in WebSphere Application 
> Server
> --------------------------------------------------------------------------------
>
>                 Key: STS-666
>                 URL: http://www.stripesframework.org/jira/browse/STS-666
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5, Release 1.5.1
>         Environment: WebSphere express 6.1
>            Reporter: Tony Dalbrekt
>            Priority: Blocker
>         Attachments: stripes-branch-1.5.x.patch
>
>
> ActionBeans, Converters etc. bundled in jars and located in WEB-INF/lib are 
> not found by the resolvers. For some reason ResolverUtil does not seem to be 
> able to find any classes located in jars in the WebSphere environment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to