It's all about the answers!

Ask a question


Álvaro Alonso (35127) | asked Nov 22 '19, 9:41 a.m.

Hello, im trying to get the name of a file since server side.

I get this error java.lang.NoClassDefFoundError:

IFileItem f = (IFileItem) scmService.fetchState(chngObj, null, null);

Do you know another form to get the name of a file.
I have acces to the change set.


One answer

permanent link
David Lafreniere (4.8k7) | answered Dec 02 '19, 12:10 p.m.
The 'Filesystem' layer depends on the 'SCM' layer but not the other way around.
I.e. IScmService lives in '' and the IFileItem which you are trying to cast to lives in '', which it knows nothing about.

Fortunately you can just cast to an IVersionable instead of an IFileItem, which has a .getName() method

Your answer

Register or to post your answer.