Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Error(java.lang.IllegalStateException: More than 1 metadata storage manager registered for storage type com.ibm.team.filesystem.hfs) on loading a repository workspace programmatically!

Hello ,

I am using plain java client api 6.0. I am creating a repository workspace using code : JoinOperations.createWorkspace(repo, selectedStream,
                      this.readConfiguration.getRepo_Workspace_name(),
this.readConfiguration.getRepoWorkspaceDesc(), null,monitor);

Workspace is created correctly with all the components.

And i am getting the ISandbox object by using below code :
public ISandbox getSandboxForPath(ILocation sandboxPath)
            throws FileSystemException {
        ISharingManager sharingManager = SharingManager.getInstance();
        // FileSystemCore.getSharingManager();

        Collection<ISandbox> updatedSandBoxList = sharingManager
                .getRegisteredSandboxes();

        ISandbox selSandbox = null;
        for (ISandbox sandboxTemp : updatedSandBoxList) {
            if (sandboxTemp.getRoot().toOSString()
                    .equalsIgnoreCase(sandboxPath.toOSString())) {
                selSandbox = sandboxTemp;
            }
        }
        if (selSandbox == null) {
            selSandbox = getSandbox(sandboxPath, false);
        }
        sharingManager.register(selSandbox, false, null);
        return selSandbox;
    }

    public ISandbox getSandbox(ILocation copyFileAreaRoot, boolean registered) {
        if ((registered)
                && (!ICopyFileAreaManager.instance.copyFileAreaExists(
                        copyFileAreaRoot, 0))) {
            return null;
        }
        return new Sandbox(copyFileAreaRoot);
    }

and am using below code to load repo workspace :
ILoadRule2 loadRule = ILoadRuleFactory.loadRuleFactory.getLoadRule(
                    workspaceconn, lrFileReader, true, monitor);

            ILoadOperation loadoperator = loadRule.getLoadOp(this.sandbox,
                    LoadDilemmaHandler.getDefault(), monitor);
loadoperator.run(monitor);

I get error message "java.lang.IllegalStateException: More than 1 metadata storage manager registered for storage type com.ibm.team.filesystem.hfs" at line :loadoperator.run(monitor);

Could you please tell me how i it can be fixed ?




1

0 votes


Accepted answer

Permanent link
Hello,

This was caused due to duplicate entries of com.ibm.filesystem.client jar file in eclipse workspace.
Ralph Schoon selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,959

Question asked: Aug 02 '16, 3:55 a.m.

Question was seen: 1,204 times

Last updated: Aug 08 '16, 5:05 a.m.

Confirmation Cancel Confirm