You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "j.ollier" <j....@nature.com> on 2009/09/23 17:52:23 UTC

META-INF directory stops Convention plugin working

Hi there

I'm trying to get started with Struts2 in particular the Convention plugin.

I've copied the code in the User guide and it works fine but only if I DON'T
have a META-INF directory in my War file, even if that directory is empty.
We are using Maven to build the War so the META-INF directory is always
there. 

I'm using Jetty 6.1.11, Struts2 2.1.6.

I have no struts.xml file. All I have in web.xml is:

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecut
eFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


The error I get on startup is

java.lang.Exception: Could not load WEB-INF/classes/john/action/Hello.class
    at 
com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.jav
a:745)
    at 
com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:148)
    at 
org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(Pa
ckageBasedActionConfigBuilder.java:295)

Anyone know what is going on here?

Thanks in advance

John


********************************************************************************   
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and 
attachments (if any). No contracts may be concluded on behalf of Macmillan 
Publishers Limited or its agents by means of e-mail communication. Macmillan 
Publishers Limited Registered in England and Wales with registered number 785998 
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS   
********************************************************************************


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


Re: META-INF directory stops Convention plugin working

Posted by Musachy Barroso <mu...@gmail.com>.
Hi John,

We have fixed several issues that might be related to this, can you
try with a version built from svn? Or download the files from here:
http://people.apache.org/builds/struts/2.1.8/. That is not a release
(yet), but it was built from trunk yesterday.

musachy

On Wed, Sep 23, 2009 at 8:52 AM, j.ollier <j....@nature.com> wrote:
> Hi there
>
> I'm trying to get started with Struts2 in particular the Convention plugin.
>
> I've copied the code in the User guide and it works fine but only if I DON'T
> have a META-INF directory in my War file, even if that directory is empty.
> We are using Maven to build the War so the META-INF directory is always
> there.
>
> I'm using Jetty 6.1.11, Struts2 2.1.6.
>
> I have no struts.xml file. All I have in web.xml is:
>
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecut
> eFilter</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
>
> The error I get on startup is
>
> java.lang.Exception: Could not load WEB-INF/classes/john/action/Hello.class
>    at
> com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.jav
> a:745)
>    at
> com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:148)
>    at
> org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(Pa
> ckageBasedActionConfigBuilder.java:295)
>
> Anyone know what is going on here?
>
> Thanks in advance
>
> John
>
>
> ********************************************************************************
> DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
> not the original intended recipient. If you have received this e-mail in error
> please inform the sender and delete it from your mailbox or any other storage
> mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
> liability for any statements made which are clearly the sender's own and not
> expressly made on behalf of Macmillan Publishers Limited or one of its agents.
> Please note that neither Macmillan Publishers Limited nor any of its agents
> accept any responsibility for viruses that may be contained in this e-mail or
> its attachments and it is your responsibility to scan the e-mail and
> attachments (if any). No contracts may be concluded on behalf of Macmillan
> Publishers Limited or its agents by means of e-mail communication. Macmillan
> Publishers Limited Registered in England and Wales with registered number 785998
> Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
> ********************************************************************************
>
>
> ---------------------------------------------------------------------
> 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