我下载并解压缩了最新的ActiveMQ版本5.17.1。我使用的是Java11.0.11和Windows10EnterpriseBuild: 19044.1706。
当我通过.\bin\activemq.bat start
启动.\bin\activemq.bat start
时,我得到了这个FileNotFoundException
WARN | Store limit is 102400 mb (current store usage is 0 mb). The data directory: C:\Programs\apache-activemq-5.17.1\bin\..\data\kahadb only has 21729 mb of usable space. - resetting to maximum available disk space: 21729 mb
WARN | Temporary Store limit is 51200 mb (current store usage is 0 mb). The data directory: C:\Programs\apache-activemq-5.17.1\bin\..\data only has 21728 mb of usable space. - resetting to maximum available disk space: 21728 mb
INFO | ActiveMQ WebConsole available at http://127.0.0.1:8161/
INFO | ActiveMQ Jolokia REST API available at http://127.0.0.1:8161/api/jolokia/
WARN | jolokia-agent: Error while accessing access restrictor at file:C:Programsapache-activemq-5.17.1bin..conf/jolokia-access.xml. Denying all access to MBeans for security reasons. Exception: java.io.FileNotFoundException: C:Programsapache-activemq-5.17.1bin..conf\jolokia-access.xml (The system cannot find the path specified)
java.io.FileNotFoundException: C:Programsapache-activemq-5.17.1bin..conf\jolokia-access.xml (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method) ~[?:?]
at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]
at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]
at java.io.FileInputStream.<init>(FileInputStream.java:112) ~[?:?]
如何修复这个FileNotFoundException
?
这似乎是文件名(即C:Programsapache-activemq-5.17.1bin..conf\jolokia-access.xml
)的一些问题。
我甚至不确定是否应该信任FileNotFoundException
错误消息。
发布于 2022-06-10 13:40:24
设置Windows环境变量时
ACTIVEMQ_HOME=C:/Programs/apache-activemq-5.17.1/
我能解决这个问题(注意后面的斜杠)。这个错误就消失了。
但我注意到了更多的事情:
ACTIVEMQ_HOME=C:/Programs/apache-activemq-5.17.1
,则仍然存在这个问题。ACTIVEMQ_HOME=C:\Programs\apache-activemq-5.17.1\
,我仍然会遇到问题(也就是说,如果我使用反斜杠)。ACTIVEMQ_HOME
,我也会遇到问题。因此,这似乎是ActiveMQ Windows启动脚本activemq.bat
中的一个bug。它不应该对这个值太敏感。而且,它应该可以在没有设置ACTIVEMQ_HOME
的情况下工作(但它不能工作)。
发布于 2022-07-28 09:55:55
我有点同意,这需要从ActiveMq方面来解决。但要解决此问题,可以将环境变量设置为-
ACTIVEMQ_HOME=C:\\Programs\\apache-activemq-5.17.1\\
对我来说很管用
发布于 2022-09-22 03:25:26
基于活动MQ Jira问题中的输入,我将${prop:activemq.conf}替换为D:\Program \activemq\webapp\api\web.xml中的${prop:activemq.conf}
<init-param>
<param-name>policyLocation</param-name>
<param-value>file:D:/Program Files/activemq/conf/jolokia-access.xml</param-value>
</init-param>
之后,不会抛出错误。
https://stackoverflow.com/questions/72574570
复制相似问题