Getting error "Caused by: java.lang.IllegalArgumentException" when running standalone RTC Plain Java application
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)
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
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.
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.
Comments
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 ?
Hi Ralph,
Any idea why ?
Thanks
Is it Okay to use JRE 1.6 or it has to be IBM JRE ?
Thanks.
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.
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