Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistributionProcess does not find ProductConfig 2-Arg-Constructor #34

Open
locosmac opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@locosmac
Copy link

locosmac commented Nov 21, 2023

Hi,

when I try to generate a patch that adds MariaDB to Wildfly 30.0.0.Final using the Maven plugin, the patcher seems to be unable to find the a constructor for org.jboss.as.version.ProductConfig that takes a ModuleLoader and a Hashmap with properties. It is not quite clear to me where this is coming from but my suspicion is that the constructor has been removed/replaced. The error that I am getting when upgrading my patcher https://github.com/locoslab/wildfly-mariadb-patcher is:

java.io.IOException: java.lang.NoSuchMethodException: org.jboss.as.version.ProductConfig.(org.jboss.modules.ModuleLoader,java.lang.String,java.util.Map)
at org.jboss.as.patching.generator.DistributionProcessor.process(DistributionProcessor.java:106)
at org.jboss.as.patching.generator.Distribution.create(Distribution.java:68)
at org.jboss.as.patching.generator.PatchGenerator.process(PatchGenerator.java:129)
at org.jboss.as.patching.generator.PatchGenerator.main(PatchGenerator.java:73)
Caused by: java.lang.NoSuchMethodException: org.jboss.as.version.ProductConfig.(org.jboss.modules.ModuleLoader,java.lang.String,java.util.Map)
at java.base/java.lang.Class.getConstructor0(Class.java:3585)
at java.base/java.lang.Class.getConstructor(Class.java:2271)
at org.jboss.as.patching.generator.DistributionProcessor.process(DistributionProcessor.java:98)

Looking at the code available at:

https://github.com/wildfly/wildfly-core/blob/main/version/src/main/java/org/jboss/as/version/ProductConfig.java

it seems to me as if there is only a constructor taking an additional ProductConfProps now but there seems to be a static method "fromFilesystemSlot" which loads the props from a file system path. So one possible workaround to keep the backwards compatibility might be to use this method instead, if the constructor is not available.

Cheers,

Marcus

@locosmac
Copy link
Author

locosmac commented Dec 1, 2023

You can close this, if you merge the pull-request #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant