Getting error while running jar file in linux while getting passed in my eclipse
I have runnable jar file with all its associated jars and class in it.
While executing in eclipse it is getting passed.
But while running it in linux getting below error.
java -jar statusReporter.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:420)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:112)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:131)
at com.telstra.ideaaz.rtc.WorkitemsValidation.login(WorkitemsValidation.java:73)
at com.telstra.ideaaz.rtc.StatusReporter.main(StatusReporter.java:65)
Caused by: java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.
at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:192)
at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:93)
at com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:72)
at com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:60)
... 6 more
Accepted answer
Check out these old posts.
https://jazz.net/forum/questions/61339/exception-in-standalone-v2-client-connecting-to-repository
https://jazz.net/forum/questions/207793/illegal-argument-exception-is-being-thrown-by-the-executable-jar-using-the-rtc-client-sdk-api
https://jazz.net/forum/questions/23488/self-executing-jar-with-plain-java-api
https://jazz.net/forum/questions/138137/how-to-execute-rtc-api-runnable-jar-code-from-command-line
One other answer
thanks for the above links. i have solved the above issue.
we have to run it as jar not as executable jar.
Now blocked with new error while login .
Exception in thread "main" com.ibm.team.repository.common.TeamRepositoryExceptio
n: CRJAZ0056I There is a version mismatch for the "com.ibm.team.repository" serv
ice. The server version is "35" while the client version is "32".
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.validat
eServiceCall(ServiceInterfaceProxy.java:223)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(
ServiceInterfaceProxy.java:87)
at com.sun.proxy.$Proxy0.describe(Unknown Source)
at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepo
sitory.java:1513)
at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepo
sitory.java:1)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepo
sitory.java:1287)
at com.ibm.team.repository.common.transport.CancelableCaller.call(Cancel
ableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelable
Service(TeamRepository.java:1280)
at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(
TeamRepository.java:1506)
at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepo
sitory.java:641)