Hi
We are getting the following error when trying to set the license in java class.
com.aspose.omr.AsposeLicenseException: Cannot find license ‘license.txt’.
We have downloaded the temporary license file, renamed it as license.txt and placed in the same folder as the java code and compiled into a jar file. However when trying to run this, the above error is thrown. The code is done as follows
License license = new License();
license.setLicense(“license.txt”);
The license.txt is also being included in the jar file and is in the same folder as in the custom java class file.
Please let us know.
Thanks
Krish
Hi Krish,
Thank you for contacting Aspose support.
Please note that Aspose.OCR APIs tries to find the license in the same folder as of aspose.omr/ocr jar files if you do not specify the complete path to the license file as you are coding your application right now. Please place the license.txt file in the same folder containing the aspose-omr-x.x-jdkxx.jar and keep the code as it is. It should fix the problem.
Moreover, please try to set the license in a simple console application just to make sure that there are no compatibility problems of your license with the current revision of Aspose.OMR for Java component.
Thanks for the response, I think it works now. However putting the code into applet format (via JNLP) is causing run time issues as following
Missing Codebase manifest attribute for: http://localhost/java/aspose-omr-2.0-jdk16.jar
Missing Codebase manifest attribute for: http://localhost/java/aspose-omr-2.0-jdk16.jar
class com.aspose.omr.internal.aj: Unable to create an element —> java.lang.ClassNotFoundException: com.aspose.omr.ChoiceBoxElement
— End of inner exception stack trace —
com.aspose.omr.OmrTemplate.a(Unknown Source)
com.aspose.omr.OmrTemplate.a(Unknown Source)
com.aspose.omr.OmrTemplate.load(Unknown Source)
Main.paint(Main.java:26)
Having a very hard time here with lots of security exceptions for the applets in the latest java, which i have now rectified signing our custom jar file and also the aspose jar file with jarsigner. But the above error now is causing issue.
Please help as I am still evaluating the product for a client requirement, and have spent quite a bit of time so far.
Thanks
Krish
Hi
Just wondering if delivering the omr code as applet is in fact possible with the aspose ocr java library in the first place? Seeing a lot of issues. If you can provide us a sample code of a working applet, that will be great, as we seem to be running out of all options here. Thanks in advance
Krish
Hi Krish,
It is good to know that you have figured out the issue related to the licensing. Regarding your recently presented scenario, I have evaluated the case by creating a simple Applet type project in Eclipse and rendered the Applet via the IDE without observing any issue. Please note, my test environment is Windows Home Premium (x64) and the target JDK revision is 1.8.0_20. Please check the attachment for the sample project in an archive.
It would ease my task of investigating the matter by deploying the Applet via JNPL if you can share a sample project from your end as well as steps to recreate the exception on my side. Moreover, we require your environment details to simulate it because the said problem could also environment specific. Please provide the following details.
- Operating system version
- Operating system architecture
- JDK type
- JDK version
Hi
Thank you for your prompt response. Applet under IDE seems to work fine, but when it is setup to run in browser with applet tag served from a webserver, this is where the problem is actually.
Java console displays the error mentioned above (for the aspose jar even though the jar file is set properly in the archive tag and being downloaded as we can see a browser security prompt for the aspose code asking for permissions).
Thinking that this may have to do with some security issues, we also tried with JNLP and the same issue comes up there as well. So the problem comes up both in the regular applet distribution and also in the latest JNLP.
If you can check your sample applet from webserver/browser and be able to get it working, we can use the same code as reference and work on our project accordingly, as we are in a bit of urgency mode.
Thanks very much,
Krish
Hi Krish,
Thank you for writing back. Please spare us little time to investigate the presented scenario in detail and get back to you with updates in this regard.
We have recently encountered similar inquiry in Aspose.OCR support forum where customer has experienced
ClassNotFoundException: com.aspose.omr.ChoiceBoxElement while rendering Applet (using Aspose.OMR for Java component) with AppletViewer. We have logged an official request for the product team to investigate this matter. Please confirm if
this thread has been created by your team members.
Hi
Yes, that’s our team member only, as we are tying individually now to get this to work somehow, and and stuck at the same point and issue.
Thanks
Krish
What we have been trying to do is bundle the OMR code as an applet, so marksheets can be processed locally at the client machine (browser) and only their response data is uploaded back to the server. This way we can avoid uploading the scanned copies of the marksheets to the server side for processing and simply use the applet/client-side code to process them. Any guidance in that direction will be greatly appreciated.
Thanks
Krish
Hi Krish,
Thank you for the details. Sure, I will try to get your scenario worked on my end to assist you further in this regard.
Shall I assume that your development environment is Linux with Oracle’s JDK?
Hi
Thanks for your prompt response. That will be great if we can get the scenario worked on your end and pass the same to us for our reference. We were trying both in Linux/Windows development environment with Oracle JDK
Thanks
Krish
Hi Krish,
Thank you for the confirmation. We have attached the same ticket (OCR-33912) to this thread as well in which we have requested the product team’s feedback on this matter. As soon as we hear more news in this regard, we will post here for your kind reference. In the meanwhile, we will try to get this scenario worked, and will let you know once we hit the success.
The issues you have found earlier (filed as OCR-33912) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.