We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AsposeOCR API implementation Runtime Error

pls I’m trying to use AsposeOCR API to read text from images into excel file, but after installations and setups , at runtime I run into this error: Exception in thread “main” java.lang.ExceptionInInitializerError , caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy…

My code:

public static void read(){
AsposeOCR api = new AsposeOCR();
File imgfile = showDialog();
RecognitionSettings setts = new RecognitionSettings();
RecognitionResult rs = api.RecognitionPage(imgfile.getAbspath(), setts);
rs.save(“excel.xlsx”, Format.Xlsx);
}

The error occurred at line 4. Pls help me out, I don’t know what else to do… Thanks…

@Olatuneday

Please note that Aspose.OCR has a dependency on onnxrumtime library. Please make sure to add a reference to onnxrumtime in you pom.xml file. Also, you check the dependencies in the below article of the API documentation. In case you still face this issue, please let us know.