You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by tkofford <tk...@ku.edu> on 2017/06/29 21:23:12 UTC
Problem with shiro 1.4.0 and filterChainResolver
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
--
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.
Re: Problem with shiro 1.4.0 and filterChainResolver
Posted by Brian Demers <br...@gmail.com>.
Thanks!
On Wed, Jul 5, 2017 at 11:43 AM, Kofford, C. Todd <tk...@ku.edu> 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
>
> tkofford@ku.edu
>
>
>
> *From:* Brian Demers [mailto:brian.demers@gmail.com]
> *Sent:* Wednesday, July 5, 2017 10:17 AM
> *To:* user@shiro.apache.org
> *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 <tk...@ku.edu> 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
> tkofford@ku.edu
>
>
>
>
> --
> 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.
>
>
>
RE: Problem with shiro 1.4.0 and filterChainResolver
Posted by "Kofford, C. Todd" <tk...@ku.edu>.
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
tkofford@ku.edu
From: Brian Demers [mailto:brian.demers@gmail.com]
Sent: Wednesday, July 5, 2017 10:17 AM
To: user@shiro.apache.org
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 <tk...@ku.edu>> 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
tkofford@ku.edu<ma...@ku.edu>
--
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.
Re: Problem with shiro 1.4.0 and filterChainResolver
Posted by Brian Demers <br...@gmail.com>.
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 <tk...@ku.edu> 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
> tkofford@ku.edu
>
>
>
>
> --
> 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.
>