You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Nesbitt <sc...@yahoo.com> on 2009/06/03 15:42:05 UTC

Migration trouble


I am migrating from Struts 2.0.11.1 to 2.1.6 and have read the
migration guide but am running into trouble.  I changed my web.xml to

    <filter>
      <filter-name>struts2</filter-name>
      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>

    <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>*.action</url-pattern>
    </filter-mapping>

    <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>/struts/*</url-pattern>
    </filter-mapping>


but get the following error:

<Jun
3, 2009 8:11:47 AM EDT> <Error> <HTTP>
<BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
Unable
to load configuration. -
file:/dun/d67loc3/nesbitjs/NNC/enames2/dev/applications/eNames2/enames/WEB-INF/classes/struts.xml:13:19
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)

In my WEB-INF/lib I have struts2-core-2.1.6.jar so it should find the class fine.  

One thing I am not sure about is my struts.xml.  I am using Dojo so I added the following.

      <dependency>
         <groupId>org.apache.struts</groupId>
         <artifactId>struts2-dojo-plugin</artifactId>
         <version>2.1.6</version>
      </dependency>

However, I am not quite sure where to put it.  Inside the package, or just after the <struts> tag?  The migration page was not very clear on this.

Any suggestions or tips would be greatly appreciated.

Thank you,

Scott 


      

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


Re: Migration trouble

Posted by Wes Wannemacher <we...@wantii.com>.
On Wed, Jun 3, 2009 at 9:42 AM, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I am migrating from Struts 2.0.11.1 to 2.1.6 and have read the
> migration guide but am running into trouble.  I changed my web.xml to
>
>    <filter>
>      <filter-name>struts2</filter-name>
>      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
>    </filter>
>
>    <filter-mapping>
>      <filter-name>struts2</filter-name>
>      <url-pattern>*.action</url-pattern>
>    </filter-mapping>
>
>    <filter-mapping>
>      <filter-name>struts2</filter-name>
>      <url-pattern>/struts/*</url-pattern>
>    </filter-mapping>

Looks okay... I don't think mapping is the problem.

>
>
> but get the following error:
>
> <Jun
> 3, 2009 8:11:47 AM EDT> <Error> <HTTP>
> <BEA-101165> <Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.
> Unable
> to load configuration. -
> file:/dun/d67loc3/nesbitjs/NNC/enames2/dev/applications/eNames2/enames/WEB-INF/classes/struts.xml:13:19
>        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)


That's bad :(

What do you have on line 13? Might not hurt to post the whole thing.

>
> In my WEB-INF/lib I have struts2-core-2.1.6.jar so it should find the class fine.

Yes, it should be, as long as you have the appropriate dependencies as
well (xwork, freemarker, ognl, etc.)

>
> One thing I am not sure about is my struts.xml.  I am using Dojo so I added the following.
>
>      <dependency>
>         <groupId>org.apache.struts</groupId>
>         <artifactId>struts2-dojo-plugin</artifactId>
>         <version>2.1.6</version>
>      </dependency>

This definitely does *NOT* go in the struts.xml file. This is maven
configuration. You will have to grab the struts2-dojo-plugin-2.1.6.jar
file and its dependencies and drop them into your WEB-INF\lib
directory and remove this from your struts.xml file.


>
> However, I am not quite sure where to put it.  Inside the package, or just after the <struts> tag?  The migration page was not very clear on this.

It goes in your pom.xml, but that is if and only if you are using
maven. If you are not, you will have to download and add jar files by
hand.


-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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