It's all about the answers!

Ask a question

Getting error "Caused by: java.lang.IllegalArgumentException" when running standalone RTC Plain Java application


Mostafa Radwan (1158) | asked Aug 19 '13, 2:02 a.m.
Hi Folks,

 I'm facing an issue similar to the ones in the links below. I wrote an RTC plain Java v3.0.0.1 in Eclipse Juno. It runs successfully in Eclipse. When I tried to export the project as an executable JAR, I got the error message below and the application would stop. I've tried the following workarounds with no luck :
(1) RepositoryPackage.eINSTANCE.eContents(); right after TeamPlatform.startup();
(2) Export the project as a normal JAR.

Any idea on what could be causing this ?

Links to similar issue :


https://jazz.net/forum/questions/61339/exception-in-standalone-v2-client-connecting-to-repository
https://jazz.net/forum/questions/19258/jazz-java-plain-api-on-gwt-server-side-problem

Exception stacktrace:

com.ibm.team.repository.common.TeamRepositoryException: Badly configured client.
  Missing a foundation component tag.
        at com.ibm.team.repository.client.internal.TeamRepository.checkServerVer
sionMatches(TeamRepository.java:1657)
        at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(
TeamRepository.java:1445)
        at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepo
sitory.java:618)
        at com.coverity.ps.common.plugins.bugtracking.TeamConcert.init(TeamConce
rt.java:345)
        at com.coverity.ps.common.plugins.bugtracking.TeamConcert.<init>(TeamCon
cert.java:163)
        at com.coverity.ps.integrations.ExportCoverityDefects.execute(ExportCove
rityDefects.java:92)
        at com.coverity.ps.integrations.ExportCoverityDefects.main(ExportCoverit
yDefects.java:188)

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Aug 19 '13, 6:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

if you run the code from classes (not Jar's) does it work then? See at the end of https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/

The related posts:
https://jazz.net/forum/questions/19258/jazz-java-plain-api-on-gwt-server-side-problem seems to be a problem with using server side API in the client. And https://jazz.net/forum/questions/61339/exception-in-standalone-v2-client-connecting-to-repository seems to be a problem, where the way the JAR was created solved the issue.

Please try to make sure to use a Java Version that is compatible. I have seen some issues with Java 7 in the forums. Please be a ware that, if you set up the SDK and Plain Java, it is easy to mix client and server side API which can cause strange effects.  See http://rsjazz.wordpress.com/2013/03/14/what-apis-are-available-for-rtc-and-what-can-you-extend/ to get a feel for what you look at.
Mostafa Radwan selected this answer as the correct answer

Comments
Mostafa Radwan commented Aug 19 '13, 11:52 a.m.

Hi Ralph,

 Thanks for your response.

I've tried to run it from the classes and now getting a different type (screenshot below) of an error related to RSA.  Any idea what's causing this ?
screenshot


Mostafa Radwan commented Aug 20 '13, 3:29 p.m.

Hi Ralph,
 Any idea why ?

Thanks


Mostafa Radwan commented Aug 20 '13, 6:39 p.m.

Is it Okay to use JRE 1.6 or it has to be IBM JRE ?

Thanks.


Ralph Schoon commented Aug 22 '13, 5:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I typically use the JRE that ships with the product. So I would suggest to try to do the same. The JRE is available in the server and also ships with the Eclipse client.


Mostafa Radwan commented Aug 22 '13, 6:13 p.m.

Thanks Ralph.

I got it resolved by including the jars used in the classpath as per the following post.

https://jazz.net/forum/questions/61339/exception-in-standalone-v2-client-connecting-to-repository


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.