Exception in finding Unresollved using plain java api?
Hello,
I am trying to find out all the Unresolved changes of the loaded workspace(Loaded with the help of load file) Code: ISharingManager sm = FileSystemCore.getSharingManager(); ILocalChangeManager lcm = sm.getLocalChangeManager(); String target = "HWRef"; PathLocation pathlocation = new PathLocation(projectConfiguration.getSandBoxLocation() ); ILocation sandBoxLocation = pathlocation.getCanonicalForm(); String[] targetPaths = target.split("/"); ISandbox sbox = sm.getSandbox(sandBoxLocation, false); System.out.println(sbox.getRoot()); IShare[] sss= sbox.allShares(null); IRelativeLocation relativeLocation = new RelativeLocation(Arrays.asList(targetPaths)); IShareable shareable = sbox.findShareable(relativeLocation, ResourceType.FOLDER); lcm.refreshChanges(new ISandbox[] { sbox },RefreshType.TRAVERSE_ALL_WITH_RECOMPUTE_OF_KNOWN, null); ILocalChange[] localChanges = lcm.getPendingChanges(new IShareable[] { shareable }, null); In the localChanges it was showing as: "org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array." i have used another method of localChanges but got same message. IShare[] shares= sbox.allShares(null); ILocalChange[] localChanges1 = lcm.getPendingChanges(shares); Thanks in advance!! |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Mar 17 '16, 6:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Consider to check the imports of your application for the classes that can't be found. Remove unused imports, make sure the classes are the ones that they should be and not one with a similar name but a different package. Find the package name and identify where these classes your come from and how they could be provided.
Usually you should only need a JDK and the Plain Java Client Libraries in your class path, otherwise you use SDK or other classes you probably shouldn't. Comments
vikas v
commented Mar 17 '16, 6:40 a.m.
Thanks for suggestion,
Ralph Schoon
commented Mar 17 '16, 6:50 a.m.
| edited Mar 17 '16, 6:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
How on earth should I know where this comes from and how to fix it? I can only suggest to wonder about the class loader and to try to debug where the load happens and what goes wrong.
|
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.
Comments
Thanks for suggestion,
getPendingChanges is working fine if I load the project normally with this below code
IShare[] shares= sbox.allShares(null);
ILocalChange[] localChanges1 = lcm.getPendingChanges(shares);
but when i load the project with a "Load Rule File" and try to fetch pending changes i am getting the exception.
"org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array."
Please let me know whether the problem is due to this loading from rule file or please provide some alternative to get pending changes when loaded through rule file.