Geronimo 部署错误:JAR 文件无效
我们有一个基于 Geronimo 的应用程序,运行良好。我们正在尝试自动化安装/部署,而这就是我陷入困境的地方:Deployment of JMS resources in Geronimo 2.2。
从 Geronimo 控制台创建资源(队列和主题连接)工作正常,但我无法使用 CLI 部署工具。
我使用控制台配置资源并单击“显示计划”而不是“部署”。我将计划保存到 queue-topic-plan.xml
(链接)并按照控制台中的说明运行以下命令:
java -jar bin/deployer.jar --user x --password y --verbose deploy \
queue-topic-plan.xml \
repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.2/geronimo-activemq-ra-2.2.rar
部署失败:
ERROR [DeployTool] Error:
org.apache.geronimo.common.DeploymentException: Invalid JAR file queue-topic-plan.xml
at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:97)
at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:168)
...
WTF!它是一个 XML 文件,而不是 JAR。不涉及 JAR。它是直接从控制台复制的。 此外,文档在计划文件 (XML) 和模块(rar 文件)参数的顺序方面相互矛盾。我已经尝试了两者,但我得到了相同的错误。
TIA 提供了一些照明。 FWIW,我是 Java/J2EE 新手。
We have a Geronimo-based app that works fine. We're trying to automate the installation/deployment and that's where I'm stuck: Deployment of JMS resources in Geronimo 2.2.
Creating the resources (Queue and Topic connection) from the Geronimo console works fine but I can't achieve the same using the CLI deploy tool.
I use the console to configure the resource and click Show Plan instead of Deploy. I save the plan into queue-topic-plan.xml
(link) and run the following command as explained in the console:
java -jar bin/deployer.jar --user x --password y --verbose deploy \
queue-topic-plan.xml \
repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.2/geronimo-activemq-ra-2.2.rar
The deployment fails:
ERROR [DeployTool] Error:
org.apache.geronimo.common.DeploymentException: Invalid JAR file queue-topic-plan.xml
at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:97)
at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:168)
...
WTF! It's an XML file, not a JAR. There's no JAR involved. And it's copied straight from the console.
Also, docs contradict each other about the order of the plan file (XML) and module (rar file) arguments. I've tried both and I get the same error though.
TIA for shedding some lights. FWIW, I'm a Java/J2EE newbie.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不敢相信现在已经是 2011 年了,我竟然在这样一个愚蠢的问题上花费了这么多时间 :-(
与 Geronimo 控制台中示例部署命令所说的相反,.rar 文件的路径不能是相对的
使用 :
而不是:
即使您从
$GERONIMO_HOME
启动该命令。I can't believe we're in 2011 and I'm spending so much time on such a silly issue :-(
As opposed to what the sample deploy command says in the Geronimo console, the path to the .rar file must not be relative.
Use :
instead of:
Even if you launch the command from
$GERONIMO_HOME