IOException 在启动 ActiveMQ“Classic”时解析来自 ServletContext 资源 [/WEB-INF/webconsole-embedded.xml] 的 XML 文档

IOException parsing XML document from ServletContext resource [/WEB-INF/webconsole-embedded.xml] while starting ActiveMQ "Classic"

提问人:chundi sai krishna 提问时间:10/27/2023 最后编辑:Justin Bertramchundi sai krishna 更新时间:10/27/2023 访问量:85

问:

我正在使用 JDK 11 启动 ActiveMQ“Classic”5.18.2,它给出了以下异常:

WARN | Failed startup of context o.e.j.w.WebAppContext@59838256{ActiveMQ Console,/admin,file:///home/pg/thirdparty/apache-activemq/webapps/admin/,UNAVAILABLE}
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/webconsole-embedded.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/webconsole-embedded.xml]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) ~[spring-beans-5.3.27.jar:5.3.27]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) ~[spring-beans-5.3.27.jar:5.3.27]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:196) ~[spring-beans-5.3.27.jar:5.3.27]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:232) ~[spring-beans-5.3.27.jar:5.3.27]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:203) ~[spring-beans-5.3.27.jar:5.3.27]
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) ~[spring-web-5.3.27.jar:5.3.27]
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) ~[spring-web-5.3.27.jar:5.3.27]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[spring-context-5.3.27.jar:5.3.27]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:671) ~[spring-context-5.3.27.jar:5.3.27]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.3.27.jar:5.3.27]
        at org.apache.activemq.web.WebConsoleStarter.createWebapplicationContext(WebConsoleStarter.java:71) ~[?:?]
        at org.apache.activemq.web.WebConsoleStarter.contextInitialized(WebConsoleStarter.java:44) ~[?:?]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572) ~[jetty-servlet-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765) ~[jetty-servlet-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379) ~[jetty-servlet-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449) ~[jetty-webapp-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414) ~[jetty-webapp-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) ~[jetty-servlet-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) ~[jetty-webapp-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:411) ~[jetty-security-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:417) ~[jetty-security-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.Server.start(Server.java:423) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.server.Server.doStart(Server.java:387) ~[jetty-server-9.4.51.v20230217.jar:9.4.51.v20230217]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.51.v20230217.jar:9.4.51.v20230217]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
:

我检查了文件夹中的路径,我可以看到文件在那里。但是找不到问题是什么,谁能帮我解决这个问题。/WEB-INF/webconsole-embedded.xmlwebapps

相关文件权限:

Files in the admin folder
drwxrwxr-x 4 gmedia gmedia   27 Nov 18  2014 tags
drwxrwxr-x 3 gmedia gmedia   16 Nov 18  2014 classes
-rwxrwxr-x 1 gmedia gmedia 5590 Oct 25 05:57 web.xml
-rwxrwxr-x 1 gmedia gmedia 2037 Oct 25 05:57 webconsole-osgi.xml
-rwxrwxr-x 1 gmedia gmedia 1353 Oct 25 05:57 webconsole-default.xml
-rwxrwxr-x 1 gmedia gmedia 2050 Oct 25 05:57 webconsole-jndi.xml
-rwxrwxr-x 1 gmedia gmedia 2138 Oct 25 05:57 webconsole-query.xml
-rwxrwxr-x 1 gmedia gmedia 2154 Oct 25 05:57 webconsole-invm.xml
-rwxrwxr-x 1 gmedia gmedia 2098 Oct 25 05:57 webconsole-embedded.xml
-rwxrwxr-x 1 gmedia gmedia 4307 Oct 25 05:57 dispatcher-servlet.xml
-rwxrwxr-x 1 gmedia gmedia 2061 Oct 25 05:57 webconsole-properties.xml
drwxrwxr-x 2 gmedia gmedia   28 Oct 25 05:58 jspf
   
permissions for the admin folder
drwxrwxr-x  3 gmedia gmedia   20 Nov 18  2014 api
-rwxrwxr-x  1 gmedia gmedia 6048 Oct 25 05:57 index.html
-rwxrwxr-x  1 gmedia gmedia 3638 Oct 25 05:57 favicon.ico
drwxrwxr-x 10 gmedia gmedia 4096 Oct 25 05:58 admin
drwxrwxr-x  2 gmedia gmedia   84 Oct 25 05:58 styles
drwxrwxr-x  2 gmedia gmedia 4096 Oct 25 05:58 images
activemq

评论

0赞 Justin Bertram 10/27/2023
您是否检查了磁盘以确保它确实存在并具有适当的读取权限?/home/pg/thirdparty/apache-activemq/webapps/admin/
0赞 chundi sai krishna 10/27/2023
您好@JustinBertram,我现在在问题中添加了上面的 ugo 权限
0赞 chundi sai krishna 10/30/2023
你好@JustinBertram你能帮我解决这个问题吗.提前致谢。
0赞 chundi sai krishna 11/2/2023
对于更新 issues.apache.org/jira/browse/... 上面的链接修复正在工作,但是当我尝试将控制台视为 http:hostname:8161 时,它首先询问用户名/密码,然后显示错误 404 未找到类似的东西,下面的链接也 stackoverflow.com/questions/62010663/... 当我单击 /admin 时,它正在打开 AMQ 控制台。
0赞 chundi sai krishna 11/2/2023
不确定为什么必须提供该修复程序,并且在输入用户名和密码后,它应该转移到索引.html页面,而不是404未找到页面

答: 暂无答案