I tried to use the example provided with tomcat:
I use tomcat, deployed the JS library, in src/lib,
a temp license file under src/lic.
When running the example i see that error in the browser console.
Did i miss something ?
Capture d’écran 2025-03-05 211031.jpg (22.3 KB)
@lgermain
It seems you are encountering an issue while trying to use Aspose.BarCode for JavaScript via C++ with Tomcat. Here are a few steps you can take to troubleshoot the problem:
-
Check License File Location: Ensure that the temporary license file is correctly placed in the src/lic
directory. The path should be accessible by your application.
-
Verify Deployment: Make sure that the JavaScript library is properly deployed in the src/lib
directory. Double-check that all necessary files are included and that there are no missing dependencies.
-
Browser Console Errors: Since you mentioned seeing an error in the browser console, it would be helpful to look at the specific error message. This can provide clues about what might be going wrong. Common issues could include file not found errors, permission issues, or JavaScript runtime errors.
-
Tomcat Configuration: Ensure that your Tomcat server is correctly configured to serve static files from the src/lib
directory. You may need to adjust your web.xml or server settings to allow access to these resources.
-
Consult Documentation: If you haven’t already, reviewing the official documentation for Aspose.BarCode for JavaScript via C++ may provide additional insights or troubleshooting tips.
If you continue to experience issues, consider reaching out on the Aspose support forum for more targeted assistance. You can share the specific error message from the console, which will help others diagnose the problem more effectively.
For further assistance, you can also explore the technical support options available through Aspose, including free and paid support services.
If you have any more details or specific error messages, feel free to share them for more tailored help!
@lgermain,
Thanks for the screenshot.
It looks like the Aspose.BarCode for JavaScript via C++ library is not initializing correctly in your Tomcat setup/environment. Could you please try to identify the possible reasons using some measures and to try to figure out the issue:
1). Ensure that Aspose.BarCode.JS.cpp.js, relevant web assembly file and related files are correctly placed in src/lib
(or the correct web-accessible folder under webapps
).
2). The JavaScript file may not be loading correctly. Check if you can access the script via browser:
e.g.,
http://localhost:8080/YOUR_APP_NAME/lib/Aspose.BarCode.JS.cpp.js
If it returns a 404 Not Found, ensure that Tomcat is serving static files from this location.
3). Check if Wasm is loaded properly. If Aspose.BarCode.JS.cpp.wasm
is missing or not loaded, the JavaScript module will fail to initialize. Moreover, some servers do not serve .wasm
files correctly without explicitly setting the MIME type.
4). Check if license is found and applied correctly. The temporary license should be accessible within your server’s runtime. Try specifying the absolute path when setting the license if it makes any difference.
Moreover, see the document on Installation guidelines for your reference.
If you’re still facing issue, let us know the exact error message(s) and any relevant logs. Moreover, provide your sample project and complete environment details. We will look into it soon.
1 Like
@lgermain,
It’s good to hear that your issue is resolved. Please don’t hesitate to reach out to us again if you have any additional questions or feedback.