java.lang.NoClassDefFoundError: com/google/zxing/WriterException

459 views
Skip to first unread message

John Lloyd

unread,
Jul 21, 2022, 11:15:57 AM7/21/22
to zxing
Within my Maven class I have included the required ZXing dependencies yet it still throws this error. Why can't writer exception be found at run time? I also checked within the added dependencies where I can see the WriterException.class jar...

I have also made more details on my StackoverFlow page: 

Lachezar Dobrev

unread,
Jul 22, 2022, 6:00:50 AM7/22/22
to John Lloyd, zxing
Dependencies are used to build the code, but are not included in the
build output. You need to include the dependencies at runtime,
commonly either by adding the .jar files in the -classpath argument,
or by adding the .jar files in a MANIFEST.MF file in the built code.
Alternatively you can add the Maven Shade plug-In and build an
so-called Uber-Jar, which contains the built code and the
dependencies. This only applies properly if you are building a
stand-alone application.

https://maven.apache.org/plugins/maven-shade-plugin/

HTH, GL
> --
> You received this message because you are subscribed to the Google Groups "zxing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/zxing/505fa50e-d28a-4ed0-90e3-b19bdc90b2c9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages