Ah. Here you go. http://struts.apache.org/2.x/docs/convention-plugin.html JBoss When using this plugin with JBoss, you need to set the following constants:
<constant name="struts.convention.exclude.parentClassLoader" value="true" /> <constant name="struts.convention.action.fileProtocols" value="jar,vfsfile,vfszip" /> Actions in jar files By default the Convention plugin will not scan jar files for actions. For a jar to be scanned, its URL needs to match at least one of the regular expressions in struts.convention.action.includeJars. In this example myjar1.jar and myjar2.jar will be scanned: <constant name="struts.convention.action.includeJars" value=".*?/myjar1.*?jar(!/)?,.*?/myjar2*?jar(!/)?" Note that the regular expression will be evaluated against the URL of the jar, and not the file name, the jar URL can contain a path to the jar file and a trailing "!/". On Apr 10, 2010, at 9:53 AM, asif10 wrote: > > Yes, it is the Convention annotations, interesting thing is I have just > tested this on websphere and also glassfish and it works fine, seems to be > just an issue on jboss. So I think you're correct it seems not to be > scanning the classpath correctly. > > There didn't seem to be any errors in the stacktrace, the main deployment > part of my module > > 2010-04-08 20:23:52,377 INFO > [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, > ctxPath=/ > 2010-04-08 20:23:52,450 INFO > [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, > ctxPath=/jmx-console > 2010-04-08 20:23:52,518 INFO > [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, > ctxPath=/aztekportal > 2010-04-08 20:23:52,907 INFO > [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] (main) > Parsing configuration file [struts-default.xml] > 2010-04-08 20:23:53,118 INFO > [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] (main) > Parsing configuration file [struts-plugin.xml] > 2010-04-08 20:23:53,334 INFO > [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] (main) > Parsing configuration file [struts.xml] > 2010-04-08 20:23:53,357 INFO > [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (main) Overriding > property struts.i18n.reload - old value: false new value: true > 2010-04-08 20:24:01,427 INFO [org.apache.coyote.http11.Http11Protocol] > (main) Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080 > 2010-04-08 20:24:01,467 INFO [org.apache.coyote.ajp.AjpProtocol] (main) > Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009 > > Then the error > > 2010-04-08 20:24:48,194 ERROR [org.apache.struts2.dispatcher.Dispatcher] > (http-localhost%2F127.0.0.1-8080-2) Could not find action or result > There is no Action mapped for namespace /sales and action name displaySales. > - [unknown location] > at > com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178) > at > org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) > at > org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) > at > com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47) > at > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478) > at > org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) > at > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) > at > org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) > at > org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) > at > org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) > at java.lang.Thread.run(Thread.java:637) > > > > > dusty wrote: >> >> Which annotations? If it's the Convention annotations there have been >> classpath scanning issues on Websphere. Show the stack traces from >> the application start-up. The request stacktrace is probably not >> interesting "An action for /bla ... Can't be found", etc. But if it >> is interesting show that stacktrace as well. >> > > -- > View this message in context: > http://n4.nabble.com/Struts2-Annotations-in-ear-file-don-t-work-tp1819037p1835496.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net >