Problem with shiro 1.4.0 and filterChainResolver

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with shiro 1.4.0 and filterChainResolver

tkofford
I have a very simple shiro webapp that works great with shiro 1.3.2, but when I bump up shiro to version 1.4.0, I get errors when my webapp starts up in tomcat. Specifically, I get the following stack trace in the logs:

29-Jun-2017 16:01:11.222 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter shiroFilter
 javax.servlet.ServletException: org.apache.shiro.env.RequiredTypeException: Object named 'filterChainResolver' is not of required type [org.apache.shiro.web.filter.mgt.FilterChainResolver].
        at org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:105)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

My web.xml is as follows:
...
  <listener>
    <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
  </listener>
 
  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
...

I saw that this was mentioned in https://issues.apache.org/jira/browse/SHIRO-610 , but I was unsure how to "fix" it.

Any suggestions?

Thanks in advance!

Todd Kofford
tkofford@ku.edu
Reply | Threaded
Open this post in threaded view
|

Re: Problem with shiro 1.4.0 and filterChainResolver

Brian Demers
Todd,
Can you point me to a sample project, that I can run and reproduce ?

On Thu, Jun 29, 2017 at 5:23 PM, tkofford <[hidden email]> wrote:
I have a very simple shiro webapp that works great with shiro 1.3.2, but when
I bump up shiro to version 1.4.0, I get errors when my webapp starts up in
tomcat. Specifically, I get the following stack trace in the logs:

29-Jun-2017 16:01:11.222 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.filterStart Exception starting
filter shiroFilter
 javax.servlet.ServletException: org.apache.shiro.env.RequiredTypeException:
Object named 'filterChainResolver' is not of required type
[org.apache.shiro.web.filter.mgt.FilterChainResolver].
        at
org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:105)
        at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

My web.xml is as follows:
...
  <listener>

<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
  </listener>

  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
...

I saw that this was mentioned in
https://issues.apache.org/jira/browse/SHIRO-610 , but I was unsure how to
"fix" it.

Any suggestions?

Thanks in advance!

Todd Kofford
[hidden email]




--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-with-shiro-1-4-0-and-filterChainResolver-tp7581664.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: Problem with shiro 1.4.0 and filterChainResolver

tkofford

Sure Brian, see https://github.com/tkofford/struts2shiro

 

However, you’ll need to update the shiro version to 1.4.0 after cloning, because it’s committed with shiro version 1.3.2.

 

Thanks for taking a look!

 

Todd Kofford

[hidden email]

 

From: Brian Demers [mailto:[hidden email]]
Sent: Wednesday, July 5, 2017 10:17 AM
To: [hidden email]
Subject: Re: Problem with shiro 1.4.0 and filterChainResolver

 

Todd,

Can you point me to a sample project, that I can run and reproduce ?

 

On Thu, Jun 29, 2017 at 5:23 PM, tkofford <[hidden email]> wrote:

I have a very simple shiro webapp that works great with shiro 1.3.2, but when
I bump up shiro to version 1.4.0, I get errors when my webapp starts up in
tomcat. Specifically, I get the following stack trace in the logs:

29-Jun-2017 16:01:11.222 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.filterStart Exception starting
filter shiroFilter
 javax.servlet.ServletException: org.apache.shiro.env.RequiredTypeException:
Object named 'filterChainResolver' is not of required type
[org.apache.shiro.web.filter.mgt.FilterChainResolver].
        at
org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:105)
        at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

My web.xml is as follows:
...
  <listener>

<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
  </listener>

  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
...

I saw that this was mentioned in
https://issues.apache.org/jira/browse/SHIRO-610 , but I was unsure how to
"fix" it.

Any suggestions?

Thanks in advance!

Todd Kofford
[hidden email]




--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-with-shiro-1-4-0-and-filterChainResolver-tp7581664.html
Sent from the Shiro User mailing list archive at Nabble.com.

 

Reply | Threaded
Open this post in threaded view
|

Re: Problem with shiro 1.4.0 and filterChainResolver

Brian Demers
Thanks!

On Wed, Jul 5, 2017 at 11:43 AM, Kofford, C. Todd <[hidden email]> wrote:

Sure Brian, see https://github.com/tkofford/struts2shiro

 

However, you’ll need to update the shiro version to 1.4.0 after cloning, because it’s committed with shiro version 1.3.2.

 

Thanks for taking a look!

 

Todd Kofford

[hidden email]

 

From: Brian Demers [mailto:[hidden email]]
Sent: Wednesday, July 5, 2017 10:17 AM
To: [hidden email]
Subject: Re: Problem with shiro 1.4.0 and filterChainResolver

 

Todd,

Can you point me to a sample project, that I can run and reproduce ?

 

On Thu, Jun 29, 2017 at 5:23 PM, tkofford <[hidden email]> wrote:

I have a very simple shiro webapp that works great with shiro 1.3.2, but when
I bump up shiro to version 1.4.0, I get errors when my webapp starts up in
tomcat. Specifically, I get the following stack trace in the logs:

29-Jun-2017 16:01:11.222 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.filterStart Exception starting
filter shiroFilter
 javax.servlet.ServletException: org.apache.shiro.env.RequiredTypeException:
Object named 'filterChainResolver' is not of required type
[org.apache.shiro.web.filter.mgt.FilterChainResolver].
        at
org.apache.shiro.web.servlet.AbstractFilter.init(AbstractFilter.java:105)
        at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

My web.xml is as follows:
...
  <listener>

<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
  </listener>

  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
...

I saw that this was mentioned in
https://issues.apache.org/jira/browse/SHIRO-610 , but I was unsure how to
"fix" it.

Any suggestions?

Thanks in advance!

Todd Kofford
[hidden email]




--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-with-shiro-1-4-0-and-filterChainResolver-tp7581664.html
Sent from the Shiro User mailing list archive at Nabble.com.