当前位置: 首页 > 知识库问答 >
问题:

部署后未找到 Tomcat 页面错误

廖招
2023-03-14

在Tomcat服务器中部署代码后,我在浏览器中查看所有页面时都收到一条找不到的错误消息。

例如:- 未找到 /BOOKS/web/Index.html。

我在网络文件夹下有Index.html的文件。这是一个Spring-MVC框架应用程序

下面是错误日志详细信息。

错误日志

INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 
org.apache.catalina.core.StandardEngine.startInternal Starting Serviet Engine: Apache Tomcat/8.5.45
INFO [localhost startStop-1] org.apache.jasper.servlet.TldScanner.scanlars 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. 
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web
application archive [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/BOOKS]


WARNING [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used 
SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost(localhost].StandardContext[/BOOKS]] 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970) 
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig-java:1841)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


Caused by: java.lang.Illega1StateException: Unable to complete the scan for annotations for web application [/BOOKS] 
due to a StackoverflowError, Possible root causes include a too low setting for -Xss and Illegal cyclic Inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1OutputStream->org.bouncycastle.asn1.DEROutputStream->org.bouncycastle.asn1.ASN1OutputStream)

at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2116)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2054) 
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2000)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1970) 
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.Java:1923)
at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1230)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.Java:1134)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:769) 
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.Lifecyclebase.fireLifecyclefvent(LifecycleBase.java:94) 
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5063)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
... 10 more


SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/BOOKS] java.lang.IllegalStateException: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/BOOKS]] 
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970) 
at org.apache.catalina.startup.HostConfig$Deploywar.run(HostConfig.java:1841)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/BOOKS] has finished in [9,774] ms 
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/examples]
INFO [localhost-startStop-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. 
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/examples] has finished in [1,357] ms
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/docs]

INFO [localhost-startStop-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.
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/docs] has finished in [1,166] ms
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/manager]
INFO [localhost-startStop-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.
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/manager] has finished in [827] ms 
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/host-manager]
INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScannerscanJars 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.
INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory 
[/apps/opt/tomcat/apache-tomcat-8.5.45/webapps/host-manager] has finished in [843] ms 
INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8880"]
INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009"] 
INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 17571 ms

请帮帮忙。

共有1个答案

田兴旺
2023-03-14

您的依赖项中必须有两个版本的< code>bcprov-*:

  1. 一个旧的(直到版本1.46),其中ASN1OutputStream扩展了DEROutputStream
  2. 最近的一个(从版本1.47开始),层次结构被颠倒:DEROutputStream扩展了ASN1OutputStream

在Maven依赖项中查找名称以< code>bcprov-开头的多个依赖项,并检查应用程序的< code>WEB-INF/lib文件夹或Tomcat的公共类加载器(< code>$CATALINA_BASE和< code>$CATALINA_HOME的< code>lib文件夹)中是否没有其他版本。

编辑:对于Bouncy Castle(以及许多长期存在的库),多个版本的问题可能会因多个Maven工件(分为两组:bouncycastleorg.bouncycastle)而加剧,这些工件使用几乎相同的代码:bcprov-jdk14bcprov-jdk15onbcprov-jdk15to18等。有关示例,请参阅此问题。

 类似资料:
  • 我有一个没有集成api的NextJS应用程序,我想部署到Vercel。当我在本地运行它时,它工作得很好。,而且我也可以在没有任何错误的情况下构建它。。然而,当我在Vercel部署它时,我收到一个。 以下是我的文件夹结构: 我正在使用NextJs 10.0.3。 以下是已部署应用的链接。 我没有nextjs配置文件。我的假设是,错误是由动态路径引起的,但我找不到我的错误。此外,部署应用程序时没有页面

  • 我一直试图在tomcat上部署一个简单的Web服务,但我没有成功,它总是返回我404错误。 我使用了这个例子中的代码 http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/ 但无法使用war,因为我在服务器中设置了上下文信息。xml 因此,我使用了与mkyong相同的代码,但在部署时遵循以下步骤:

  • 问题内容: 我刚刚开始开发 网站 。目前,我所拥有的只是 一个HTML页面 ,该 页面 由几个 CSS样式表支持 。 我可以 从HTML和CSS页面 创建 WAR文件 吗?如何 将它们部署到Tomcat服务器上 ? 谢谢。 问题答案: 这是我的 设置 :我在Ubuntu 9.10上。 现在,这就是我所做的。 在 / usr / share中* 创建一个名为“ tomcat6-myapp ” 的文件

  • 我试图从分解的war目录进行部署,但得到了相同的上下文错误(如果我从eclipse进行部署,或者如果我尝试从manager页面进行部署,则会发生这种情况,错误输出如下): 我的运行配置-war:exploded tomcat:exploded-将分解的war文件的内容复制到\apache7\work\Catalina\localhost 是否缺少apache\tomcat配置设置<非常感谢您的任何

  • 我想创建一个JSF spring应用程序,但我的war没有部署,因为这个错误: ScanJars至少对一个JAR进行了TLD扫描,但没有TLD。启用此记录器的调试日志记录,以获取已扫描但未在其中找到TLD的JAR的完整列表。在扫描过程中跳过不需要的JAR可以改善启动时间和JSP编译时间。09-oct-2018 12:02:56.143 SCHWERWIEGEND[RMI TCP连接(6)-127.