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

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!!
          






0 votes

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.



One answer

Permanent link
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.

0 votes

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.

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 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

Question asked: Mar 17 '16, 5:56 a.m.

Question was seen: 6,231 times

Last updated: Mar 17 '16, 6:51 a.m.

Confirmation Cancel Confirm