IBM Java 1.7 and RTC scm
$0-paulcnew@build3-rhel60:~> scm help
java.lang.IllegalStateException: Found two dtoEvolution elements with the same componentVersion value in bundle com.ibm.team.scm.common.
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:223)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:1)
at java.util.TreeMap.compare(TreeMap.java:1188)
at java.util.TreeMap.put(TreeMap.java:531)
at java.util.TreeSet.add(TreeSet.java:255)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processEvolutionElement(ModelElementDescriptor.java:70)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processChild(ModelElementDescriptor.java:63)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.processChildren(AbstractElementDescriptor.java:725)
<snip the rest of the stack trace and the normal output>
Is Java 1.7 supported by this version of RTC/scm or do I have to use some other version of Java or RTC?
thanks.
2 answers
Comments
This is the name of the zip file I installed: RTC-scmTools-Linux64-4.0.0.1.zip so it looks like 4.0.0.1 but scm -v outputs this:
com.ibm.team.filesystem.cli.tools, version 3.1.100.v20120817_2130
It's 4.0 FP1 then. The 3.1.100 version is for the plugin, which is more a reflection of API compatibility, not the product/release version.
This machine is a build machine. As a result we installed build tools and scm tools but no graphical client. There is a properties directory in the install dir and it contains the following:
$0-paulcnew@build3-rhel60:/opt/ibm/jazz> find properties
properties
properties/version
properties/version/RTC-Buildsystem-build.properties
properties/version/Build_System_Toolkit.4.0.0.cmptag
Note there is no scm tools properties file so the version attributes in RTC-Buildsystem-build.properties apply to the build tools. Is that correct?
And do you know why there is no properties file for the scm tools package?
thanks for your help.
I think it depends which download you installed. If you're on one of the Enterprise platforms (AIX, Z/OS etc) they often include the SCM CLI as part of the build system toolkit. If the SCM CLI really was installed separately, I'd expect it to have its own properties folder/file.
Thanks again, Nick.
the SCM CLI came from a different zip file. here are the two zip files:
RTC-BuildSystem-Toolkit-Linux-4.0.0.1.zip
RTC-scmTools-Linux64-4.0.0.1.zip
In order to confirm that the problem is indeed the IBM Java version, I removed the 1.7 RPM and installed a 1.6 RPM. The exception goes away. So, it appears it has something to do with 1.7. For now have modified the scm.ini file to point to the old java binary and that seems to work ok. (we can't remove IBM Java 1.7 as we need it for our product.) Meanwhile, I will investigate upgrading to a newer version of RTC. Can you recommend a version that will be best for Redhat 6.3 (on x86_64 architecture)? I imagine we can get any available version.
I'd suggest moving to the latest, 4.0.5, if possible. Pretty sure the supported platforms didn't change much, but you should double check the system requirements page linked from the downloads page.
Nick, is 4.0.5 available already? I believe that as of today, the last official version is 4.0.4.
Sorry, my mistake. I thought it had already been posted, but there were some delays (in the other apps) that held this up. I asked around, and the aim is to post it this Friday (Dec 6).
It occurs as soon as I try to get the team repository from TeamPlatform:
TeamPlatform.startup();
ITeamRepositoryService service = TeamPlatform.getTeamRepositoryService(); //<-- exception
Comments
Steffen, which version of the client libraries are you using? Which download did you get them from?
And which Java version? The one included with RTC, or some other one, i.e. is it Java 7?
I get the exception with java 7 and both, the client libraries and the RTC server are 4.0.4
Also I use it on a 64bit architecture using 64bit libraries if available (I did not find one for the build toolkit)
Regarding your question about where I got the files from:
The libraries are those provided on the "all downloads" page on the jazz / RTC website. I took the files labelled as plain java zip files or something like that.
The jdk is not the one included with RTC but one distributed in our system (most probably these are the once provided by oracle). I tried both, a java 6, which worked fine for RTC and a java 7 which did not. Sadly I need to use java 7 because other parts of the environment rely on it.
Steffen, is the stack trace you're seeing exactly the same as the original here? The problem was fixed in 4.0.3 and backported to 4.0.2. I'm unable to reproduce it running the SCM CLI on my Mac using 4.0.3, against Oracle Java 7.
Ok, I am sorry. I reconfigured my complete environment and recognized that I got some confusion in RTC versions. I was partially using 4.0.4 and partially 4.0. Now I switched to 4.0.4 completely and everything is fine.
But I am still not sure, which libraries I should use. I have got the RTC-SDK-4.0.4 (which I am using currently) and the RTC-Client-plainJavaLib-4.0.4. Which one is preferable to use when creating custom ANT tasks? Which one when creating Extensions for RTC?
No problem, it can get confusing with the different versions for client side vs server side.
Actually, that's not quite right. We still don't include com.ibm.team.build.toolkit in the plainJavaLib, but it is included in the SDK. The SDK has source, the plainJavaLib does not. In your case, for developing Ant tasks, I would develop against the SDK, then either deploy the jar containing your classes into the buildtoolkit directory of the Build System Toolkit, or deploy it in a separate directory but that will require adding another -lib argument when invoking Ant.
You explained that the plainJavaLib is for runtime. Does it contain anything that a user would not have already installed using the p2 install repository?
The p2 repo is for installing into an Eclipse IDE, so its plugins are intended to run in an OSGi/Equinox environment, not plain Java. The plainJavaLib is intended for use outside an OSGi/Equinox environment. As such it has a slightly different packaging for some of the jars, especially the ones from Apache. Other than that, the main difference is that the p2 repo includes UI plugins whereas the plainJavaLib is lower level, containing just the (headless) client libraries.