plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Feinauer <>
Subject Re: Missing Drivers in fat JAR
Date Thu, 14 May 2020 14:12:33 GMT

this is an issue that multiple people here faced... (cdutz, sruehl, myself at least).
Can we do anything to document that better?
I guess not?


Am 14.05.20, 15:59 schrieb "Wolfgang Huse" <>:

    Thanks a lot Chris...

    There was the Service transformer missing. I only had used the ManifestResourceTransformer
(which is included in the pom.xml in the examples-folder). The Service transformer is inherited
from the project root pom.xml

    Works now as expected....

    Mit freundlichen Grüßen – With kind regards

    Wolfgang Huse

    On 5/14/20, 2:11 PM, "Christofer Dutz" <> wrote:

        Hi Wolfgang,

        if you are speaking about a project of yours where you are using the shade plugin,
then you need to add a transformer to your plugin configuration.
        Every driver has a META-INF/services/ file, which
lists that particular driver.
        If you run the shade plugin without any transformer only one of these are packaged
in the jar the others are omitted. 
        That's why you have only one driver availale.

        In order to fix this please update your plugin configuration like we did in the examples:

                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                          These files contain signatures for classes, omit them as in
                          shaded archives this has cause quite some problems in the past.

        Hope that helps.


                      <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

        Am 14.05.20, 10:31 schrieb "Wolfgang Huse" <>:

            i am builing a fat jar with maven shade plugin but if I run the application an
error occurs:

            17:32.651 [main] INFO - Instantiating new
PLC Driver Manager with class loader jdk.internal.loader.ClassLoaders$AppClassLoader@55054057
            10:17:32.653 [main] INFO - Registering available
            10:17:32.658 [main] INFO - Registering driver
for Protocol modbus (Modbus)
            Exception in thread "main"
Unable to find driver for protocol 'opcua'

            Any hint how to include the needed classes for the drivers ?

            Mit freundlichen Grüßen – With kind regards

            Wolfgang Huse

View raw message