Stripes

Example .war does not work on JBoss 5

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: Release 1.5
  • Fix Version/s: Release 1.5.2, Release 1.6
  • Component/s: None
  • Labels:
    None
  • Environment:
    MS Window XP, JDK 1.6, Jboss 5.0.0GA

Description

-Dropping the stripes-example.war (from stripes-1.5.zip) into JBoss 5.0.0GA (EG: jboss-5.0.0.GA\server\default\deploy)
-Start up server and open stripes-examples (http://localhost:8080/stripes-examples)
-Click the quick start link to the simple calculator
-Enter two numbers and press the Add button

Got the following stacktrace:
net.sourceforge.stripes.exception.ActionBeanNotFoundException: Could not locate an ActionBean that is bound to the URL [/examples/quickstart/Calculator.action]. Commons reasons for this include mis-matched URLs and forgetting to implement ActionBean in your class. Registered ActionBeans are: {/controller/DefaultView.action=class net.sourceforge.stripes.controller.DefaultViewActionBean}
net.sourceforge.stripes.controller.AnnotatedClassActionResolver.getActionBean(AnnotatedClassActionResolver.java:325)
net.sourceforge.stripes.controller.NameBasedActionResolver.getActionBean(NameBasedActionResolver.java:264)
net.sourceforge.stripes.controller.AnnotatedClassActionResolver.getActionBean(AnnotatedClassActionResolver.java:279)
net.sourceforge.stripes.controller.DispatcherHelper$1.intercept(DispatcherHelper.java:106)
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
net.sourceforge.stripes.controller.DispatcherHelper.resolveActionBean(DispatcherHelper.java:102)
net.sourceforge.stripes.controller.DispatcherServlet.resolveActionBean(DispatcherServlet.java:245)
net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:148)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

Activity

Hide
Richard Tsang added a comment - 01/Mar/09 11:34 PM

jboss server log

Show
Richard Tsang added a comment - 01/Mar/09 11:34 PM jboss server log
Hide
Ben Gunter added a comment - 06/Mar/09 7:21 AM

Richard, I just overhauled the example app for release 1.6. Would you mind checking out the trunk, building the example and seeing if it works in your environment now?

Show
Ben Gunter added a comment - 06/Mar/09 7:21 AM Richard, I just overhauled the example app for release 1.6. Would you mind checking out the trunk, building the example and seeing if it works in your environment now?
Hide
Richard Tsang added a comment - 08/Mar/09 4:51 PM

Hi Ben, I have checked out trunk, ant build and deploy the stripes-examples-war to both jboss GA5 and 5.0.1... still no luck:
I have attached the server log.

2009-03-09 10:22:49,379 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812042120)] Started in 1m:32s:798ms
2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG StripesFilter:218 - LocalePicker selected locale: en_NZ
2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG StripesFilter:227 - LocalePicker did not pick a character encoding, using default: null
2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG UrlBindingFactory:135 - No URL binding matches /quickstart/index.jsp
2009-03-09 10:22:59,268 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] (http-127.0.0.1-8080-1) Scanning for tlds in: vfsfile:/C:/download/dev/server/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jsf-libs/jsf-impl.jar
2009-03-09 10:22:59,784 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] (http-127.0.0.1-8080-1) Scanning for tlds in: vfsfile:/C:/download/dev/server/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jstl.jar
2009-03-09 10:23:02,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 ERROR FormTag:384 - Could not locate an ActionBean that was bound to the URL [/examples/quickstart/Calculator.action]. Without an ActionBean class Stripes cannot determine whether the ActionBean is a wizard or not. As a result wizard behaviour will be disabled.
2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action
2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 ERROR FormTag:384 - Could not locate an ActionBean that was bound to the URL [/examples/quickstart/Calculator.action]. Without an ActionBean class Stripes cannot determine whether the ActionBean is a wizard or not. As a result wizard behaviour will be disabled.

Show
Richard Tsang added a comment - 08/Mar/09 4:51 PM Hi Ben, I have checked out trunk, ant build and deploy the stripes-examples-war to both jboss GA5 and 5.0.1... still no luck: I have attached the server log. 2009-03-09 10:22:49,379 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812042120)] Started in 1m:32s:798ms 2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG StripesFilter:218 - LocalePicker selected locale: en_NZ 2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG StripesFilter:227 - LocalePicker did not pick a character encoding, using default: null 2009-03-09 10:22:58,721 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:22:58,721 DEBUG UrlBindingFactory:135 - No URL binding matches /quickstart/index.jsp 2009-03-09 10:22:59,268 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] (http-127.0.0.1-8080-1) Scanning for tlds in: vfsfile:/C:/download/dev/server/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jsf-libs/jsf-impl.jar 2009-03-09 10:22:59,784 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] (http-127.0.0.1-8080-1) Scanning for tlds in: vfsfile:/C:/download/dev/server/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jstl.jar 2009-03-09 10:23:02,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,940 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,940 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,955 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,955 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:02,971 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:02,971 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,893 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,893 ERROR FormTag:384 - Could not locate an ActionBean that was bound to the URL [/examples/quickstart/Calculator.action]. Without an ActionBean class Stripes cannot determine whether the ActionBean is a wizard or not. As a result wizard behaviour will be disabled. 2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 DEBUG UrlBindingFactory:135 - No URL binding matches /examples/quickstart/Calculator.action 2009-03-09 10:23:03,908 INFO [STDOUT] (http-127.0.0.1-8080-1) 10:23:03,908 ERROR FormTag:384 - Could not locate an ActionBean that was bound to the URL [/examples/quickstart/Calculator.action]. Without an ActionBean class Stripes cannot determine whether the ActionBean is a wizard or not. As a result wizard behaviour will be disabled.
Hide
Allen Petersen added a comment - 29/Jun/09 10:51 AM

This (STS-655-jboss5x.patch) is what I'm using right now to run Stripes with JBoss 5.x. The main change is updating the ResolverUtil to handle vfszip files by reading it from the URL stream.

I also had to change the example build code to put the classes into a jar file in WEB-INF/lib instead of directly in WEB-INF/classes. This is because this fix only works with vfszip: jar files; it doesn't handle vfs files directly on the filesystem. I didn't see a way to support that without using the JBoss VFS API directly; even Hibernate(!!)'s similar code loading EJB3 persistence.xml classes (which is fairly nice, by the way, if perhaps a bit over-engineered) doesn't work with the WEB-INF/classes directory on JBoss 5.x. Still, that should be a restriction that people can live with.

Show
Allen Petersen added a comment - 29/Jun/09 10:51 AM This (STS-655-jboss5x.patch) is what I'm using right now to run Stripes with JBoss 5.x. The main change is updating the ResolverUtil to handle vfszip files by reading it from the URL stream. I also had to change the example build code to put the classes into a jar file in WEB-INF/lib instead of directly in WEB-INF/classes. This is because this fix only works with vfszip: jar files; it doesn't handle vfs files directly on the filesystem. I didn't see a way to support that without using the JBoss VFS API directly; even Hibernate(!!)'s similar code loading EJB3 persistence.xml classes (which is fairly nice, by the way, if perhaps a bit over-engineered) doesn't work with the WEB-INF/classes directory on JBoss 5.x. Still, that should be a restriction that people can live with.
Hide
Richard Tsang added a comment - 29/Jun/09 5:03 PM

Tested patch together with Trunk on JBoss 5.0.1GA. All good. Stripes Examples work as expected.

Thanks guys

Show
Richard Tsang added a comment - 29/Jun/09 5:03 PM Tested patch together with Trunk on JBoss 5.0.1GA. All good. Stripes Examples work as expected. Thanks guys
Hide
Marcus Kraßmann added a comment - 01/Jul/09 7:36 AM

The patch does not work for me. I fetched Stripes 1.5.1 from corresponding svn-tag and used the patch file attached to this ticket. The resulting stripes.jar did neither work on JBoss 5.0.1.GA nor on 5.1.0.GA (server plattform: Windows XP, JDK 1.6.13).

I get no error messages on server startup, but also there are no action beans bound to Stripes.

If I deploy the exploded war, everything works fine.

Show
Marcus Kraßmann added a comment - 01/Jul/09 7:36 AM The patch does not work for me. I fetched Stripes 1.5.1 from corresponding svn-tag and used the patch file attached to this ticket. The resulting stripes.jar did neither work on JBoss 5.0.1.GA nor on 5.1.0.GA (server plattform: Windows XP, JDK 1.6.13). I get no error messages on server startup, but also there are no action beans bound to Stripes. If I deploy the exploded war, everything works fine.
Hide
Allen Petersen added a comment - 01/Jul/09 1:48 PM

Are your classes in WEB-INF/classes, or in a jar file in WEB-INF/lib?

Show
Allen Petersen added a comment - 01/Jul/09 1:48 PM Are your classes in WEB-INF/classes, or in a jar file in WEB-INF/lib?
Hide
Marcus Kraßmann added a comment - 09/Jul/09 1:46 AM

Ah, I did not see your comment regarding this until your post at the stripes mailing list. For now we went back to JBoss 4.x, but I'll give it a try.

Show
Marcus Kraßmann added a comment - 09/Jul/09 1:46 AM Ah, I did not see your comment regarding this until your post at the stripes mailing list. For now we went back to JBoss 4.x, but I'll give it a try.
Hide
Nate Riffe added a comment - 23/Sep/09 4:03 PM

I've created a patch for this issue as well which is perhaps a bit more acceptable to the project developers. ResolverUtil assumes that the classloader wil give it file: and jar: urls to work with, but does not state this assumption anywhere. Rather than assuming a particular few url schemes and dealing with them in prescribed ways, the patch makes ResolverUtil go through the URL's openStream() method to get access to the jar in all cases except for the specific case of a file: url that points to a directory. This makes it possible for stripes to correctly scan classes that are exposed using unanticipated url schemes by deferring jar streaming logic to whatever protocol handler the container has registered for it.

There are still a couple of special cases to be concerned about. One is the aforementioned file: url pointing to a directory, which is handled the same as before. The other case is handled in loadImplementationsInJar, where parent is stripped from the end of the stringified url under two conditions: 1) parent is the tail of the stringified url, with nothing following it except optionally a slash and 2) it is preceeded by ".jar" and an optional delimiting exclamation point . This processing used to occur in find, and appears to have been designed to deal specifically with jar: urls, though the original implementation was applied to all urls. The new munging is more precise about what it will strip from the url, so that the jar: case is still correctly handled. The exclamation point is optional in the regex replace because JBoss VFS, in its infinite wisdom, decided to forego delimiting the boundary between jar and jar contents in vfszip: urls.

Show
Nate Riffe added a comment - 23/Sep/09 4:03 PM I've created a patch for this issue as well which is perhaps a bit more acceptable to the project developers. ResolverUtil assumes that the classloader wil give it file: and jar: urls to work with, but does not state this assumption anywhere. Rather than assuming a particular few url schemes and dealing with them in prescribed ways, the patch makes ResolverUtil go through the URL's openStream() method to get access to the jar in all cases except for the specific case of a file: url that points to a directory. This makes it possible for stripes to correctly scan classes that are exposed using unanticipated url schemes by deferring jar streaming logic to whatever protocol handler the container has registered for it. There are still a couple of special cases to be concerned about. One is the aforementioned file: url pointing to a directory, which is handled the same as before. The other case is handled in loadImplementationsInJar, where parent is stripped from the end of the stringified url under two conditions: 1) parent is the tail of the stringified url, with nothing following it except optionally a slash and 2) it is preceeded by ".jar" and an optional delimiting exclamation point . This processing used to occur in find, and appears to have been designed to deal specifically with jar: urls, though the original implementation was applied to all urls. The new munging is more precise about what it will strip from the url, so that the jar: case is still correctly handled. The exclamation point is optional in the regex replace because JBoss VFS, in its infinite wisdom, decided to forego delimiting the boundary between jar and jar contents in vfszip: urls.
Hide
Nate Riffe added a comment - 23/Sep/09 4:07 PM

One JBoss-specific caveat is that calling openStream() on a vfszip: url that points to the WEB-INF/classes directory in a war will get you nothing. This is a problem JBoss VFS bug, not Stripes. The workaround is to put your Stripes classes in a jar and add the jar to the war's WEB-INF/lib directory.

Show
Nate Riffe added a comment - 23/Sep/09 4:07 PM One JBoss-specific caveat is that calling openStream() on a vfszip: url that points to the WEB-INF/classes directory in a war will get you nothing. This is a problem JBoss VFS bug, not Stripes. The workaround is to put your Stripes classes in a jar and add the jar to the war's WEB-INF/lib directory.
Hide
Nate Riffe added a comment - 23/Sep/09 4:15 PM

Also, the any-url-scanning patch is against 1.5.x at revision 1136.

Show
Nate Riffe added a comment - 23/Sep/09 4:15 PM Also, the any-url-scanning patch is against 1.5.x at revision 1136.
Hide
Nate Riffe added a comment - 23/Sep/09 4:59 PM

Something broke between making that patch and downloading and reapplying it to my checkout. I'm working on it.

Show
Nate Riffe added a comment - 23/Sep/09 4:59 PM Something broke between making that patch and downloading and reapplying it to my checkout. I'm working on it.
Hide
Nate Riffe added a comment - 07/Oct/09 5:01 PM

Attaching new patch. All unit tests pass. I brought this change up in JBoss 4.2.2 and in JBoss 5.1.0 successfully, with the caveat that classes in the WEB-INF/classes directory in a war file are not found in JBoss 5.1.0, although packaging those classes in a jar in WEB-INF/lib in the class does work.

This patch works using the same conceptual change as my first attempt, using URL.openStream to process jars rather than assuming that the URL is either file: or jar: and looking directly in the filesystem for it. This allows Stripes to use JBoss's VFS magic to figure out where the data is supposed to come from.

Show
Nate Riffe added a comment - 07/Oct/09 5:01 PM Attaching new patch. All unit tests pass. I brought this change up in JBoss 4.2.2 and in JBoss 5.1.0 successfully, with the caveat that classes in the WEB-INF/classes directory in a war file are not found in JBoss 5.1.0, although packaging those classes in a jar in WEB-INF/lib in the class does work. This patch works using the same conceptual change as my first attempt, using URL.openStream to process jars rather than assuming that the URL is either file: or jar: and looking directly in the filesystem for it. This allows Stripes to use JBoss's VFS magic to figure out where the data is supposed to come from.
Hide
David Wade added a comment - 09/Oct/09 3:39 AM

Its good to see some progress on this rather crucial issue. I wonder however whether this issue should be combined with STS-666 which is basically the same problem except on WebSphere 6.1.

To actually have an MVC framework totally not work out of the box on two of the leading application servers is basically going to be terminal for this framework which is really sad because you know it rocks!

I can't help but think there is something fundamentally wrong with the code and that the incomplete patches are nothing more than sticking plaster. I think a combined and complete solution for this and STS-666 is a must before all other work.

I work for the same organization as the original raiser of this issue. We use JBoss in development but deploy to WebSphere 6.1 for production so for us it is double trouble. Our work around is to define our own ActionResolver that allows us to programatically declare our action beans.

Show
David Wade added a comment - 09/Oct/09 3:39 AM Its good to see some progress on this rather crucial issue. I wonder however whether this issue should be combined with STS-666 which is basically the same problem except on WebSphere 6.1. To actually have an MVC framework totally not work out of the box on two of the leading application servers is basically going to be terminal for this framework which is really sad because you know it rocks! I can't help but think there is something fundamentally wrong with the code and that the incomplete patches are nothing more than sticking plaster. I think a combined and complete solution for this and STS-666 is a must before all other work. I work for the same organization as the original raiser of this issue. We use JBoss in development but deploy to WebSphere 6.1 for production so for us it is double trouble. Our work around is to define our own ActionResolver that allows us to programatically declare our action beans.
Hide
Ben Gunter added a comment - 26/Oct/09 8:51 PM

Fixed for 1.5.2. Verified to work on JBoss 4.2, 5.0 and 5.1.

Show
Ben Gunter added a comment - 26/Oct/09 8:51 PM Fixed for 1.5.2. Verified to work on JBoss 4.2, 5.0 and 5.1.

People

Vote (1)
Watch (0)

Dates

  • Created:
    01/Mar/09 11:32 PM
    Updated:
    04/Jan/11 1:04 PM
    Resolved:
    26/Oct/09 8:51 PM