It's all about the answers!

Ask a question

Exception in finding Unresollved using plain java api?


vikas v (15419) | asked Mar 17 '16, 5:56 a.m.
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!!
          







Comments
vikas v commented Mar 17 '16, 6:39 a.m.

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.

One answer



permanent link
Ralph Schoon (63.4k33646) | 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,

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.


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.

 Another suggestion I would have is to paste "org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException" into Google search and look at the various hits, especially on StackOverflow to figure if there is something relevant for your situation.

Your answer


Register or 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.