The problem is that you are building your fat. maven-assembly-plugin does not process files associated with ServiceLoader correctly. ServiceLoader relies on entries that are listed in META-INF/services/org.apache.beam.sdk.io.FileSystemRegistrar for each implementation, so Java knows how to find them.
The contents of META-INF/services/org.apache.beam.sdk.io.FileSystemRegistrar in your fatjar are most likely:
org.apache.beam.sdk.io.LocalFileSystemRegistrar
You need to have its list (and any other implementations you want):
org.apache.beam.sdk.io.LocalFileSystemRegistrar org.apache.beam.sdk.extensions.gcp.storage.GcsFileSystemRegistrar
It is best to use a tool that understands these ServiceLoader requirements, such as the maven-shade-plugin , when it is configured to use the ServicesResourceTransformer to build its own fat.
source share