0

I have a problem with a java based DXL import.

We want to maintain properties files via our Java framework. I am working with a temporary file on my filesystem (I am working on a local server). I am exporting the new properties file to my filesystem, generate a DXL file in the same folder and then try to import the DXL into my database.

I have done several options of the importer and we are creating the stream and the importer with sessionAsSignerWithFullAccess. The code is signed with the ID of the Server Admin who has Full Access to everything.

When importing the DXL I receive only the error message "DXL Import Operation failed", the error log of the importer says I am not authorized to perform this operation.

Do you have any idea what could be the problem? From my point of view I can't give my User any more rights on the server.

Here is the code for the import function:

private void importDXLFile(String filepath) {
    String dxlPath = filepath.replaceAll(".properties", ".dxl");
    DxlImporter importer = null;
    Stream stream = null;

    System.out.println("dxlPath: " + dxlPath);

    try {           
        stream = BCCJsfUtil.getCurrentSessionAsSignerWithFullAccess(FacesContextEx.getCurrentInstance()).createStream();
        if (!stream.open(dxlPath, "ISO-8859-1")) {
            System.out.println("Cannot read " + dxlPath + " from server");
        }
        System.out.println("User: " + BCCJsfUtil.getCurrentSessionAsSignerWithFullAccess(FacesContextEx.getCurrentInstance()).getEffectiveUserName());
        importer = BCCJsfUtil.getCurrentSessionAsSignerWithFullAccess(FacesContextEx.getCurrentInstance()).createDxlImporter();
        importer.setReplaceDbProperties(false);
        importer.setReplicaRequiredForReplaceOrUpdate(false);
        importer.setDesignImportOption(DxlImporter.DXLIMPORTOPTION_REPLACE_ELSE_CREATE);
        importer.setInputValidationOption(DxlImporter.DXLVALIDATIONOPTION_VALIDATE_NEVER);
        importer.setExitOnFirstFatalError(false);
        importer.importDxl(stream.readText(), BCCJsfUtil.getCurrentDatabase());

        stream.close();
    } catch (NotesException e) {
        e.printStackTrace();
        try {
            System.out.println("Log: " + importer.getLog());
            System.out.println("LogComment: " + importer.getLogComment());

        } catch (NotesException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

    }
}

As you can see I tried several options, hoping it would change anything, but it is always the same error message. The generated DXL seems valid, as we can import it manually with Ytria.

I hope someone has an idea. Any help would be appreciated.

Thanks in advance.

Matthias

4

1 回答 1

3

请检查您的 ACL 设置:“最大 Internet 名称和密码”设置为“管理员”还是“设计师”?

于 2013-01-09T10:18:59.423 回答