gpt4 book ai didi

java - Struts2启动时出错

转载 作者:行者123 更新时间:2023-12-02 12:03:24 25 4
gpt4 key购买 nike

您好,这是我关于让 struts2 工作的第二篇文章。我已经从 apache struts 下载并安装了最小依赖包,其中包括

commons-fileupload-1.3.3.jarcommons-io-2.5.jarcommons-lang3-3.6.jarfreemarker-2.3.23.jarjavassist-3.20.0-GA.jarlog4j-api-2.8.2.jarognl-3.1.15.jarstruts2-core-2.5.13.jar

所有这些都已添加到我在 eclipseoxygen 中的构建路径中。我在本地计算机上安装了 tomcat 7 和 8.5 以及 Java 9。

我已将过滤器调度程序更新为最新的语句

org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter

启动后出现以下错误,任何人有任何想法请!!!

INFO: Server startup in 2389 ms
Nov 02, 2017 2:15:45 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/Hello] threw exception
java.nio.file.InvalidPathException: Illegal char <:> at index 3: jar:file:\C:\apache-tomcat-8.5.23\webapps\Hello\WEB-INF\lib\struts2- core-2.5.13.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.<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:73)
at com.opensymphony.xwork2.util.fs.DefaultFileManager.fileNeedsReloading(DefaultFileManager.java:62)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:425)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:163)
at com.opensymphony.xwork2.config.ConfigurationManager.needReloadContainerProviders(ConfigurationManager.java:208)
at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:174)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960)
at org.apache.struts2.dispatcher.ExecuteOperations.executeStaticResourceRequest(ExecuteOperations.java:59)
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:130)
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:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
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)

最佳答案

这是一个已知问题,将在 Struts 2.5.14 中修复。另请参阅this jira ticketthis pull request

关于java - Struts2启动时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47077511/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com