根据教程加入shiro一章,引入了需要的jar包,增加web.xml中shiro的配置后,就无法启动了。
引入的jar包
commons-beanutils-1.9.3.jar
commons-logging-1.2.jar
druid-1.0.26.jar
log4j-1.2.17.jar
mysql-connector-java-5.1.40.jar
nutz-1.r.59.jar
nutz-integration-shiro-1.r.60.r2.jar
shiro-all-1.3.2.jar
slf4j-api-1.7.24.jar
slf4j-log4j12-1.7.24.jar
web.xml配置
mybook
org.apache.shiro.web.env.EnvironmentLoaderListener
ShiroFilter
org.apache.shiro.web.servlet.ShiroFilter
ShiroFilter
/*
REQUEST
FORWARD
INCLUDE
ERROR
DruidWebStatFilter
com.alibaba.druid.support.http.WebStatFilter
exclusions
*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*,/rs/*
DruidWebStatFilter
/*
nutz
org.nutz.mvc.NutFilter
modules
net.wendal.nutzbook.MainModule
exclusions
/rs/*,/druid/*
nutz
/*
REQUEST
FORWARD
INCLUDE
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
DruidStatView
com.alibaba.druid.support.http.StatViewServlet
DruidStatView
/druid/*
500
/WEB-INF/jsp/500.jsp
启动报错日志
28-Feb-2017 09:16:46.879 信息 [RMI TCP Connection(5)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
28-Feb-2017 09:16:46.926 严重 [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
28-Feb-2017 09:16:46.926 严重 [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/nutzbook] startup failed due to previous errors
[2017-02-28 09:16:46,988] Artifact mybook:war exploded: Error during artifact deployment. See server log for details.
28-Feb-2017 09:16:53.320 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.39\webapps\manager
28-Feb-2017 09:16:53.648 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.39\webapps\manager has finished in 328 ms
28-Feb-2017 09:19:34.261 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/nutzbook]
28-Feb-2017 09:19:34.293 信息 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\w_yusys2\.IntelliJIdea2016.2\system\tomcat\Unnamed_nutz\conf\Catalina\localhost\nutzbook.xml
28-Feb-2017 09:19:34.308 严重 [localhost-startStop-2] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/nutzbook]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@73d0d460]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4969)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 10 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:\Programer\IDEAProjects\nutz\out\artifacts\mybook_war_exploded] is not valid
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:730)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:688)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 13 more