[
http://www.stripesframework.org/jira/browse/STS-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11855#action_11855
]
Bob Schellink commented on STS-723:
-----------------------------------
Hi Ben,
Thanks for the fix. I'll have a look later today at work. One issue with the
fix might be the file.exists() check:
425 jarUrl.replace(0, jarUrl.length(), testUrl.getFile());
426 File file = new File(jarUrl.toString());
427 if (file.exists()) {
I think if jarUrl has spaces the file.exists() check might return false.
For example if WebLogic is installed under c:\Program Files the resulting
jarUrl could have spaces encoded e.g: c:\Program%20Files
Decoding the url with URLDecoder should do the trick:
String path = URLDecoder(jarUrl.toString(), "UTF-8");
File file = new File(path);
if (file.exists()) {
kind regards
bob
> Actions not found on WebLogic 10.0
> ----------------------------------
>
> Key: STS-723
> URL: http://www.stripesframework.org/jira/browse/STS-723
> Project: Stripes
> Issue Type: Bug
> Affects Versions: Release 1.5.2
> Reporter: Bob Schellink
> Fix For: Release 1.5.3, Release 1.6
>
>
> Hi,
> Deploying stripes 1.5.2 examples on WebLogic fails as Actions are not
> discovered at runtime.
> Seems the problem is in ResolverUtil.findJarForResource method:
> 368 protected URL findJarForResource(URL url, String path) throws
> MalformedURLException {
> ...
> 373 for (;;) {
> 374 url = new URL(url.getFile());
> 375 log.trace("Inner URL: ", url);
> 376 }
> The incoming url might look like this on Tomcat:
> jar:file:/C:/apps/tomcat/tmp/WEB-INF/lib/myjar.jar!/com.mycorp.actions
> After line 374 is executed the url becomes:
> file:/C:/apps/tomcat/tmp/WEB-INF/lib/myjar.jar!/com.mycorp.actions
> For WebLogic the incoming url is:
> zip:C:/apps/mywar/WEB-INF/lib/mylib.jar!/com.mycorp.actions
> Line 374 fails on the first attempt and the url is unchanged.
> Later on in the method a check is made whether the url is a jar and on
> WebLogic the check fails with a FileNotFoundException.
> One possible fix is to check for the "zip:" prefix and strip it, creating a
> new URL:
> String urlStr = jarUrl.toString();
> if (urlStr.startsWith("zip:")) {
> urlStr = urlStr.substring(4);
> url = new File(urlStr).toURL();
> if (isJar(testUrl)) {
> return testUrl;
> }
> }
> kind regards
> bob
--
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
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development