NutzCN Logo
问答 Shiro INI configuration was either not found or discovered to be empty/unconfigured
发布于 2987天前 作者 老司机 5653 次浏览 复制 上一个帖子 下一个帖子
标签:

报错如题
配置如下
E:\EclipseWorkSpace\JavaEE\nutzbook\conf\shiro.ini
shiro.ini内容:

[main]

[urls]
/* = anon

web.xml:

<display-name>nutzbook</display-name>
	<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>

已至于所有filter之前,详细错误如下:

严重: Exception sending context initialized event to listener instance of class org.apache.shiro.web.env.EnvironmentLoaderListener
org.apache.shiro.config.ConfigurationException: Shiro INI configuration was either not found or discovered to be empty/unconfigured.
	at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:87)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
	at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
	at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
	at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

求解决方法

1 回复

conf目录没设置为源文件夹

添加回复
请先登陆
回到顶部