jfinal整合shiro遇到问题

Mrpan_ 发布于 2016/05/30 11:06
阅读 527
收藏 0
严重: Error configuring application listener of class org.apache.shiro.web.env.EnvironmentLoaderListener
java.lang.ClassNotFoundException: org.apache.shiro.web.env.EnvironmentLoaderListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4919)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)


web.xml中配置如下:

<listener>
    <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
   <filter-name>shiro</filter-name>
   <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<filter-mapping>
   <filter-name>shiro</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

shiro-all-1.2.3.jar已经导入,且可以找到org.apache.shiro.web.env.EnvironmentLoaderListener.class文件

新手,求大神赐教

加载中
0
M
Mrpan_
求大神帮忙分析分析
0
iehyou
iehyou
你这个是已经加入到了编译路径 但是运行环境的web容器(tomcat)找不到EnvironmentLoaderListener类。
M
Mrpan_
谢谢,问题已解决!导包问题,通过maven添加相关jar包就会报这个错,直接放到lib下问题就解决了,具体原因不太明白!
0
红薯的小黄瓜
红薯的小黄瓜
<filter>
        <filter-name>shiroFilter</filter-name>
        <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
        <init-param>
            <param-name>configPath</param-name>
            <param-value>classpath:shiro.ini</param-value>
        </init-param>
    </filter>
M
Mrpan_
谢谢,问题已解决!导包问题,通过maven添加相关jar包就会报这个错,直接放到lib下问题就解决了,具体原因不太明白!!
返回顶部
顶部