Datasource issues after upgrading cargo 1.9.12 -> 1.10.4

13 views
Skip to first unread message

maylann....@gmail.com

unread,
Feb 1, 2023, 6:25:24 AM2/1/23
to Codehaus Cargo
Hi Ali,

I'm having some issues with a different behavior after upgrading to latest cargo version and running wildfly. Seems to have started after version 1.10.1.
The different behavior is bottomline that cargo is updating the standalone.xml file in the wildfly home directory and adding the datasources there. And when I say the wildfly home directory I don't mean in the target/cargo/configurations/wildfly10x/configuration folder, I mean in the specified container home property where I am refering to a wildfly installation path on my laptop. Before I upgraded the cargo version, the datasources was only added to the standalone.xml under the created wildfly container here: target/cargo/configurations/wildfly10x/configuration

And my problem is now that when running the container again it fails with a duplicate datasource :

[INFO] [talledLocalContainer] 11:52:44,850 ERROR [org.jboss.as.cli.CommandContext] (main) {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0212: Duplicate resource [
[INFO] [talledLocalContainer]     (\"subsystem\" => \"datasources\"),
[INFO] [talledLocalContainer]     (\"xa-data-source\" => \"rs-my-appDS\")
[INFO] [talledLocalContainer] ]"}}
[INFO] [talledLocalContainer] {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0212: Duplicate resource [
[INFO] [talledLocalContainer]     (\"subsystem\" => \"datasources\"),
[INFO] [talledLocalContainer]     (\"xa-data-source\" => \"rs-my-appDS\")
[INFO] [talledLocalContainer] ]"}}
[INFO] [talledLocalContainer] 11:52:44,862 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) stopped in 8ms
[INFO] [talledLocalContainer]

I guess because it copies the standalone.xml again from the wildfly home with the datasources already existing in it and tries to add the datasources again when starting wildfly.
Can you help me?
Is there some configuration or anything I am missing?

I have added my cargo maven plugin configuration. and the standalone.xml where you will see it has been updated with 2 xa-datasources.
And I am running on jdk 1.8


Best regards
Kasper




cargo-config.xml
standalone.xml

S. Ali Tokmen

unread,
Feb 2, 2023, 4:33:19 PM2/2/23
to codehau...@googlegroups.com

Hi Kasper

This is indeed bizarre...

One question: what version of WildFly are you using? I am asking because your Codehaus Cargo configuration indicates wildfly10x, and that version is from 2016 so I'm not sure whether it is the actual version you're using.

I am asking, as WildFly 10.x seems to have an issue referenced WFCORE-1373 where it doesn't register custom domain directory, causing it to write configuration changes directly into default directory. It appears this was fixed with WildFly 11.x onwards (and, by this I do not mean the Codehaus Cargo WildFly 11.x container, but rather the WildFly version itself).

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/27bb734e-5a41-4477-a838-fc710fa0f4fbn%40googlegroups.com.
Message has been deleted

S. Ali Tokmen

unread,
Feb 4, 2023, 4:28:19 PM2/4/23
to codehau...@googlegroups.com

Hi Kasper

After many cross-checks, it indeed turns out this bug affecting WildFly 10.x was introduced sometime between Codehaus Cargo's latest 1.9.x version (see https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/1282 where wildfly10x works fine) and 1.10.0 (see https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/1331 where it starts breaking).

I now raised https://codehaus-cargo.atlassian.net/browse/CARGO-1601 and also came up with a fix, once https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/1455 completes you can use the latest SNAPSHOT. To do so:

  1. In the pom.xml, change the cargo-maven3-plugin version to 1.10.5-SNAPSHOT
  2. Run the below two commands:

maylann....@gmail.com

unread,
Mar 8, 2023, 7:44:28 AM3/8/23
to Codehaus Cargo
Hi,

Sorry for not comming back to you on this issue. Tried upgrading wildfly as you wrote, but stumbled into issues with that and had to leave the task and didn't notice your latest comment. So I am very sorry for not testing out you snapshot release. However my colleague just told me that the 1.10.5 works, so thanks for helping out :)

/Kasper

S. Ali Tokmen

unread,
Mar 8, 2023, 3:06:09 PM3/8/23
to codehau...@googlegroups.com

Hi Kasper

Great news, thanks for confirming!

Reply all
Reply to author
Forward
0 new messages