Created a new service in Java for QR code generation (“QRgen”). Service takes in a string, and dimensions (pixels) of the desired output. It has 2 methods. One of them returns a bytestream and another returns a png file and creates an entry in table qr_code.
Please describe the expected behavior of the issue, starting from the first action.
I downloaded the java SDK and I built the class(“QRgen”) offline using intellij IDEA.
I ran CodeRunner.sh to test it in debug mode. Both methods worked fine.
I ran Deploy.sh and the service was seen on Backendless as a Deployed Service.
I invoked the deployed service in curl. Was expecting to see the same results as in debug mode.
Actual Behavior
When running the service QRgen in deployed mode, I see the following error when either of the 2 methods is invoked:
400 - Type:“java.lang.NoClassDefFoundError”, Description:“Could not initialize class java.util.zip.Deflater”, ExceptionClass:“ServiceException” {Msg:“none”, Cause:“none”}
Reproducible Test Case
Go to the app’s Business Services. Click on QRgen. Select either of the 2 POST methods. Pass these parameters and invoke.
Could you please zip up your project, upload the zip to the Backendless files storage and send us the link for it? You can email the link to support@backendless.com.
Hello,
This question will seem strange to you, but our developed product (nothing to do with yours) also encounters a NoClassDefFoundError on ZipDeflater with a JDK 11, did you understand what caused it ?
Thank you for your help