Question

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.

Was it helpful?

Solution

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 :

$GERONIMO_HOME/repository/.../geronimo-activemq-ra-2.2.rar

instead of:

repository/.../geronimo-activemq-ra-2.2.rar

Even if you launch the command from $GERONIMO_HOME

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top