Skip to content

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

Open
@locosmac

Description

@locosmac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions