You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Timothy Pick <ti...@comrad.co.nz> on 2009/03/10 05:36:37 UTC

struts2 convention plugin not scanning classpath

Hi,

we're using struts2 2.1.6 convention plugin with annotations on the action classes. 
When running though eclipse everything works fine, but when deployed to a standalone tomcat 5 the convention plugin does not appear to scan our web app classpath. 
We normally package all our classes into a jar and include this by the following constants in struts.xml

	<constant name="struts.convention.action.disableScanning" value="false" />
	<constant name="struts.convention.result.path" value="/WEB-INF/content" />
	<constant name="struts.convention.default.parent.package" value="default" />
	<constant name="struts.convention.action.packages" value="comrad.web.morepork" />
	<constant name="struts.convention.action.includeJars" value=".*/morepork.*?jar(!/)?" />

No errors are generated on startup, it just doesn't configure any of our annotated or automagical convention actions. This problem seems intermittent. Sometimes if we wait a couple of hours or restart tomcat a dozen times, we might get luck and see the convention plugin configure everything correctly.

To reiterate, the configuration works perfectly from a development environment (ie eclipse deploying to tomcat).

Any help appreciated.

Cheers,
Tim.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: struts2 convention plugin not scanning classpath

Posted by Musachy Barroso <mu...@gmail.com>.
Set the debugging level to DEBUG, and post it here. BTW, that's an
awesome name for a jar file "morepork" :)

musachy

On Tue, Mar 10, 2009 at 12:36 AM, Timothy Pick <ti...@comrad.co.nz> wrote:
> Hi,
>
> we're using struts2 2.1.6 convention plugin with annotations on the action classes.
> When running though eclipse everything works fine, but when deployed to a standalone tomcat 5 the convention plugin does not appear to scan our web app classpath.
> We normally package all our classes into a jar and include this by the following constants in struts.xml
>
>        <constant name="struts.convention.action.disableScanning" value="false" />
>        <constant name="struts.convention.result.path" value="/WEB-INF/content" />
>        <constant name="struts.convention.default.parent.package" value="default" />
>        <constant name="struts.convention.action.packages" value="comrad.web.morepork" />
>        <constant name="struts.convention.action.includeJars" value=".*/morepork.*?jar(!/)?" />
>
> No errors are generated on startup, it just doesn't configure any of our annotated or automagical convention actions. This problem seems intermittent. Sometimes if we wait a couple of hours or restart tomcat a dozen times, we might get luck and see the convention plugin configure everything correctly.
>
> To reiterate, the configuration works perfectly from a development environment (ie eclipse deploying to tomcat).
>
> Any help appreciated.
>
> Cheers,
> Tim.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org