Caused by: java.lang.NoClassDefFoundError: com/google/zxing/NotFoundException

2,638 views
Skip to first unread message

Dominik

unread,
Aug 4, 2013, 5:15:08 AM8/4/13
to zx...@googlegroups.com
Hi all!

I am using Zxing to scan QR-Codes which I capture via a webcam and the "webcam-capture" library.
Everything works fine if I run my project (it is a JavaFX project) in Eclipse. But if I build my project and try to run the .jar or the .jnlp or the applet, I get the following error:


Caused by: java.lang.NoClassDefFoundError: com/google/zxing/NotFoundException
        at de.paan.client.webcam.ScanBarcodeService.createTask(Unknown Source)
        at javafx.concurrent.Service.start(Service.java:575)
        at de.paan.client.PAANTagWindowController.handleStartScanButton(Unknown Source)

Can anyone tell me, where this problem comes from?

Thanks
 Dominik

Sean Owen

unread,
Aug 4, 2013, 5:20:35 AM8/4/13
to zx...@googlegroups.com
The answer is right there -- you did not include any of the library classes in your app.

Dominik

unread,
Aug 4, 2013, 9:42:24 AM8/4/13
to zx...@googlegroups.com
Hi Sean,

I did include the library in the classpath as external library in my Eclipse project. The library appears in Eclipse under referenced libraries and in Eclipse everything works fine.
Only when I build the app and try to run it from outside Eclipse I get the error...

Bye 
 Dominik

Sean Owen

unread,
Aug 4, 2013, 10:03:37 AM8/4/13
to zx...@googlegroups.com
You're talking about compile-time inside Eclipse. Again, the problem is obviously the runtime packaging and environment. This is up to you and your project and nothing to do with the library.

Dominik

unread,
Aug 4, 2013, 2:03:03 PM8/4/13
to zx...@googlegroups.com
Hi Sean,

thank's for the tip.
The problem was that the "ZXING core.jar" had a space between ZXING and core.jar. I renamed it to "ZXING_core.jar" and it works now.

Bye
 Dominik
Reply all
Reply to author
Forward
0 new messages