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

java.lang.NoClassDefFoundError: com/ibm/team/repository/client/ITeamRepository

 Hello


Im trying to develop a follow-up for deliver action.

I need to get the component name of a changeset.

Im trying this
private ITeamRepository fRepository;

public  followUpClassName(ITeamRepository repository) {
this.fRepository = repository;
}

 
Object data = operation.getOperationData(); ;
DeliverOperationData data1 = (DeliverOperationData) data;
List<IChangeSetHandle> changeSetHandles = data1.getChangeSetHandles();
List<IChangeSet> changeSets = fRepository.itemManager().fetchCompleteItems(changeSetHandles, IItemManager.DEFAULT, monitor1.newChild(25));

But when i run the deliver operation i get this error message: java.lang.NoClassDefFoundError: com/ibm/team/repository/client/ITeamRepository

Do you think i need any dependencie or external jar for get the change set??

0 votes


Accepted answer

Permanent link

 com/ibm/team/repository/client/ITeamRepository is part of the client API and not available in extensions run on the server. You must extend abstract service to get access to the service APIs.


See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ for how to do this kind of stuff. Do the extensions workshop.

Álvaro Alonso selected this answer as the correct answer

0 votes

Comments

 Thanks!!!


One other answer

Permanent link

 As the name suggests this exception in Java occurs when JVM  tries to load a particular class and doesn't found the requested class in the classpath you specified. This means that, your classpath is broken.  Java ClassNotFoundException thrown when an application tries to load in a class through its string name using:


  •     The forName method in class Class.
  •     The findSystemClass method in class ClassLoader .
  •     The loadClass method in class ClassLoader.

When you get a ClassNotFoundException , it means that the Java Virtual Machine has traversed the entire classpath you specified and not found the class you've attempted to reference. The one and only solution is to check your classpath carefully.

Verify the name of the requested class is correct and the specified .jar file exists in your classpath. If not, you must explicitly add it to your application’s classpath.

If it's present in your classpath then there is high chance that your classpath is getting overridden or application is using classpath specified in jar file or start-up script and to fix that you need to find the exact classpath used by your application.


0 votes

Comments

It blows the mind, why one would answer an already answered and accepted question. 

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

Question asked: Nov 20 '19, 4:00 a.m.

Question was seen: 2,211 times

Last updated: Jun 22 '21, 2:10 a.m.

Confirmation Cancel Confirm