QR code generation
Hello,
I have a problem generating QR code in Caché now.
After executing the code
set Status=##Class(%SYS.QRCode).GenerateImage(P0,,.DataURI)
(variable P0 contains data for QR code)
an error is displayed now:
"<NOTOPEN>zGenerate+27^%SYS.QRCode.1",,,,,,,,
("$^zGenerate+27^%SYS.QRCode.1 +1","$^zGenerateImage+4^%SYS.QRCode.1 +1"
This error occurs only on two servers, on the others the code works fine.
When calling the method, I do not specify any external file that should be opened.
Thank you for the answers.
Comments
The problem you are experiencing with generating QR codes using ##class(%SYS.QRCode).GenerateImage may be related to Java configuration or folder permissions on your servers. The %SYS.QRCode class depends on Java, and missing or misconfigured Java installation could lead to such errors:
Check Java Installation: Ensure that Java is installed and properly set up on the two problematic servers. The
%SYS.QRCodeimplementation requires Java. The Java executable must be accessible, and its path is determined:Verify Folder Permissions: Sometimes, such errors are caused by insufficient permissions on required directories where temporary files are created or accessed. Confirm that your application has the necessary permissions to write or read from the relevant folders [1][2].
Alternative Versions: If upgrading is an option, InterSystems IRIS 2023.1 provides updates to QR code generation that do not rely on Java. This could simplify your setup by eliminating Java dependencies entirely [1][2].
If these steps don’t resolve the issue, additional debugging might be required to pinpoint the exact cause related to the specific setup of your problematic servers. [1][2]
Sources: