コミュニティ

StartLogging arguments check failed 回答済み

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.

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

4件のコメント

  • Avatar
    Permanently deleted user

    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 ?

    0
  • Avatar
    Dan Donley

    Linux. As I say, the path is definitely writable, it's the same as the application log file.

    0
  • Avatar
    Permanently deleted user

    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;

            IEngine engine = Engine.GetEngineObject("/opt/ABBYY/FREngine11/Bin", "SWEDxxxxxxxxxxxxxxxxxxxx");
            engine.StartLogging("/var/log/abbyy.log", false);    
            engine.LoadPredefinedProfile("DocumentConversion_Accuracy");
            IFRDocument document = engine.CreateFRDocument();
            //see my other posts for more Java-samples   

    And at last, dump your complete stacktrace in here.

    Best regards
    Koen de Leijer

    0
  • Avatar
    Dan Donley

    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!

    1

サインインしてコメントを残してください。