Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I am trying to add member (si add), check-out (si co) and check-in (si ci) through MKS APIs but I am receiving below error,
com.mks.api.response.InvalidCommandOptionException: si: MKS124822: Invalid value provided for "sandbox": File paths must be rooted in <Integrity_installed_directory>\data\tmp: sandboxName is set to <sandbox_path>\project.pj
After getting this error I have created sandbox on <Integrity_installed_directory>\data\tmp path but then I get the below error,
com.mks.api.response.ItemNotFoundException: MKS125216: The sandbox file <Integrity_installed_directory>\data\tmp\<file_name> is not registered with the system.
Though the command created through the MKS APIs are executed successfully from the command prompt.
Kindly assist me on this and have a look on the command creation code.
Add member command code:
public Command checkInCommand(CheckInFileVO checkInFile) {
Command command = new Command(Command.SI, "ci");
command.addOption(new Option("sandbox", checkInFile.getSandbox()));
command.addOption(new Option("author", checkInFile.getAuthor()));
command.addOption(new Option("description", "Update revision"));
command.addOption(new Option("yes"));
command.addSelection(checkInFile.getFilePath());
System.out.println(IntegrityUtil.printCommand(command));
return command;
}
Same way the check-out and check-in command created, let me know if you need to have look on those command code as well.
Thanks,
Gajanan
Hi Gajanan,
You may want to open a Support case, to trouble-shoot this.
What is the exact syntax and call, in your API script, that you are using?
Does the sandbox show in the output of "si sandboxes" command, if you run that from CLI?
Hi Michael,
Thanks for your quick response!
si sandbox command given out from command prompt.
C:\Users\xyz>si sandboxes
e:\Gajanan\Sandbox\project.pj -> /RMT/project.pj (test:7001)
e:\PTC\Integrity\ILMServer11\data\tmp\project.pj -> /RMT/project.pj (test:7001)
e:\Sandboxes\gajanan_sdbx\TestingIntegration.pj -> /TestingIntegration/TestingIntegration.pj (test:7001)
e:\Sandboxes\sbdx_10\sandbox\TestingIntegration.pj -> /TestingIntegration/TestingIntegration.pj (test:7001)
But failed through the APIs.
12:03:18.759 [main] ERROR com.kpit.target.integrity.IntegrityConnector - Error occured during Integrity command execution: si sandboxes --
com.mks.api.response.ApplicationRuntimeException: MKS124803: Internal error detected: Exception was: java.lang.NullPointerException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_102]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_102]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_102]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_102]
at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_102]
at com.mks.api.response.APIExceptionFactory.getAPIExceptionObject(APIExceptionFactory.java:134) ~[mksapi.jar:16.0 000-00 506]
at com.mks.api.response.APIExceptionFactory.createAPIException(APIExceptionFactory.java:46) ~[mksapi.jar:16.0 000-00 506]
at com.mks.api.response.impl.XMLResponseHandler.getException(XMLResponseHandler.java:1134) ~[mksapi.jar:16.0 000-00 506]
at com.mks.api.response.impl.XMLResponseHandler.getResponse(XMLResponseHandler.java:285) ~[mksapi.jar:16.0 000-00 506]
at com.mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:321) ~[mksapi.jar:16.0 000-00 506]
at com.mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:273) ~[mksapi.jar:16.0 000-00 506]
at com.mks.connect.AbstractCmdRunner.execute(AbstractCmdRunner.java:448) ~[mksapi.jar:16.0 000-00 506]
at com.kpit.target.integrity.IntegrityConnector.executeCommand(IntegrityConnector.java:57) [bin/:?]
at com.kpit.target.integrity.util.test.SandboxTest.main(SandboxTest.java:29) [bin/:?]
Let me know if you required more details to resolve the issue that I am facing.
Thanks!
Hi Michael,
I have missed to inform you that I am getting the "forbidden" error when I tried to open a Support case. Though I have tried with different browsers, machines and even tried to create a support case from my colleagues credentials but the result is same.
Thanks!