Cargo No Longer Expanding WARs

8 views
Skip to first unread message

Jeff Jensen

unread,
Apr 28, 2022, 2:13:15 AM4/28/22
to codehau...@googlegroups.com
Hi,
I have had a Cargo Maven 3 Plugin in a build (starting four REST services for testing) successfully running for a year and yesterday it stopped working.  I've been trying to find what's locally changed to fix (guessing something in the OS) but still not resolved.  I'm wondering if anyone has suggestion how to investe from the Cargo plugin actions.

For the build, the Cargo plugin log shows:
* Cargo plugin seems to start Tomcat
* Cargo plugin copies the .WAR files to the webapps dir

[info][talledLocalContainer] Tomcat 9.x starting...
[info][stalledLocalDeployer] Deploying (.the WAR in the m2 dir to ...\target/cargo/tomcat9x\webapps)
[info][stalledLocalDeployer] Deploying [C:\Users\jjensen\.m2\repository\com\jeff\jeff-test-war\1.0-SNAPSHOT\jeff-test-war-1.0-SNAPSHOT.war] to [(target directory)\target/cargo/tomcat9x\webapps]...

* For some reason, the WARs are no longer expanded into the directories for Tomcat.
* Then the startup times out after a few minutes.

Of course, there are no log files for the services and the file in the <output> config also does not exist.

I added <logLevel>debug</logLevel> but the messages do not suggest a problem.

How can I see more details on what Cargo is doing, try to discover what's not happening/blocking it from happening?  How does Cargo explode the WARs and tell Tomcat?

Jeff Jensen

unread,
Apr 28, 2022, 11:25:09 AM4/28/22
to codehau...@googlegroups.com
I resolved the problem.

The slight hint was the cargo-jvm-version-* files created after the problem began were empty and the prior ones had the Java -version output:
  [debug][talledLocalContainer] Output appended to C:\Users\jjensen\AppData\Local\Temp\cargo-jvm-version-1486501580375180408.txt

I ran what Cargo said it ran and reported no errors:
[debug][talledLocalContainer] Executing 'C:\Program Files\Java\jdk1.8.0_231\jre\bin\java.exe' with arguments:
'-version'

However, I encountered a "program not found" error.  Restoring java.exe there resolved the problem.  "Why" it was removed is a different discussion! ;-)


As an enhancement to shorten the troubleshooting time, can Cargo log errors for things such as command output problems?

S. Ali Tokmen

unread,
Apr 28, 2022, 6:01:05 PM4/28/22
to codehau...@googlegroups.com

Hi Jeff

That is a great finding!

I raised https://codehaus-cargo.atlassian.net/browse/CARGO-1583 accordingly, and fixed in https://github.com/codehaus-cargo/cargo/commit/ca356eac19e0a833f8bdae2fd2d46f4fb0457134 (which will be part of the next Codehaus cargo release).

Regards

S. Ali Tokmen
https://ali.tokmen.com/
https://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAKumxBxmh6BdoLCxzqAOA994rNYCiAW%2B2GBKoOSz%2BPVa_UZuiA%40mail.gmail.com.

Jeff Jensen

unread,
Apr 28, 2022, 8:34:01 PM4/28/22
to codehau...@googlegroups.com
Wonderful!  Thank you so much.


Reply all
Reply to author
Forward
0 new messages