struts2第一个示例程序出现错误,解决不了
发表在JavaWeb图书答疑 2020-01-15 《Java Web从入门到精通》第14章 Struts2基础 323页-324页
是否精华
版块置顶:

O{X)DF]7O91)A1A72$L`W3Q.png

我跟着书上弄的,也百度了一下,不知道具体拿出了问题,

分享到:
精彩评论 5
根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2020-01-16
沙发

看tomcat启动日志是不是抛异常了

帅气的鹏鹏
学分:18 LV2
2020-01-16
板凳

根号申 发表于2020-01-16 08:51

看tomcat启动日志是不是抛异常了

严重: 启动过滤器异常

java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:213)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)

at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)

at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4530)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5169)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:633)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)

... 42 more

老师这个怎么解决,我用的版本是struts2.3.37


根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2020-01-16
地板

java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

缺commons-lang3.jar包,加上就好了

帅气的鹏鹏
学分:18 LV2
2020-01-16
4L

加上commons-lang3.jar以后还是报错

严重: Servlet.service() for servlet [jsp] in context with path [/23] threw exception

java.nio.file.InvalidPathException: Illegal char <:> at index 3: jar:file:\E:\JAVAEEworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\23\WEB-INF\lib\struts2-core-2.3.37.jar

at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)

at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)

at java.base/java.io.File.toPath(Unknown Source)

at java.base/java.util.zip.ZipFile$Source.get(Unknown Source)

at java.base/java.util.zip.ZipFile$CleanableResource.<init>(Unknown Source)

at java.base/java.util.zip.ZipFile$CleanableResource.get(Unknown Source)

at java.base/java.util.zip.ZipFile.<init>(Unknown Source)

at java.base/java.util.zip.ZipFile.<init>(Unknown Source)

at java.base/java.util.jar.JarFile.<init>(Unknown Source)

at java.base/java.util.jar.JarFile.<init>(Unknown Source)

at java.base/java.util.jar.JarFile.<init>(Unknown Source)

at com.opensymphony.xwork2.util.fs.JarEntryRevision.needsReloading(JarEntryRevision.java:76)

at com.opensymphony.xwork2.util.fs.DefaultFileManager.fileNeedsReloading(DefaultFileManager.java:66)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:397)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:169)

at com.opensymphony.xwork2.config.ConfigurationManager.needReloadContainerProviders(ConfigurationManager.java:215)

at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:179)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:73)

at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)

at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:81)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:89)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Unknown Source)


根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
首页上一页 1 下一页尾页 5 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照