plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <>
Subject Re: Missing Drivers in fat JAR
Date Thu, 14 May 2020 12:11:13 GMT
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