I'm struggling to get FineReader Engine 11 (11.1.19.931278) to accept a StartLogging command through the Java api. I'm wondering if I'm just doing something wrong -- I always get the exception:
com.abbyy.FREngine.EngineException: Arguments check failed. Expected: FileSystem::CheckName( fileName )
For context, my engine setup looks like:
IEngine engine = Engine.LoadEx(dll, "", "", "", false, lic, pw);
ILicense runtimeLicense = engine.GetAvailableLicenses(sn, pw).Find(rt);
engine.SetCurrentLicense(runtimeLicense, false);
engine.LoadPredefinedProfile("DocumentConversion_Accuracy");
String logpath = "/app-storage/logs/Abbyy_Log_file.log"
engine.StartLogging(logpath, false);
I am confident that the path is writable, I experience this exception when the path doesn't exist as well as when I programmatically create the file beforehand.
コメント
4件のコメント
Hi
I would suggest that the filepath is incorrect (case-sensitive!) or actually not writable.
Is "app-storage" really at the root of your file-system?
Else try to write directly in /var/log/abbyy.log or even /tmp/abbyy.log (keep in mind that /tmp/ is cleared at reboot)
Best regards
Koen de Leijer
PS. Are you using Linux or MacOSX ?
Linux. As I say, the path is definitely writable, it's the same as the application log file.
Hi
Is "app-storage" really at the root of your file-system?
Else try to write directly in /var/log/abbyy.log or even /tmp/abbyy.log (keep in mind that /tmp/ is cleared at reboot)
Else, try to load the Engine differently, using the developer-key, like;
And at last, dump your complete stacktrace in here.
Best regards
Koen de Leijer
I figured it out, it was in a detail I obscured in making a simpler code snippet to paste:
The path I posted, "/app-storage/logs/Abbyy_Log_file.log" will actually work. I was generating a path that included a time format of HH:mm:ss. Colon is a legal character under linux, but not in Windows. I assume FileSystem::CheckName( fileName ) checks paths against a list of characters forbidden on windows. That's why I could use the path string to create a file with Java and still have it fail in StartLogging.
I appreciate your help!
サインインしてコメントを残してください。