It's all about the answers!

Ask a question

TeamPlatform.startup courses NullPointerException


Melanie Finke (7731520) | asked Mar 08 '12, 5:14 a.m.
Hello,

I'm using the Rational Team Concert Version 3.0.1 and the Plain Java API 3.0.1.2 .

While starting up the TeamPlatform
TeamPlatform.startup();


the following Exception appears.

java.lang.NullPointerException
at com.ibm.team.repository.common.internal.util.VersionStringComparator.getIntegerParts(VersionStringComparator.java:71)
at com.ibm.team.repository.common.internal.util.VersionStringComparator.innerCompare(VersionStringComparator.java:45)
at com.ibm.team.repository.common.internal.util.VersionStringComparator.compare(VersionStringComparator.java:32)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:152)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:1)
at java.util.TreeMap.compare(Unknown Source)
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processEvolutionElement(ModelElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processChild(ModelElementDescriptor.java:53)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.processChildren(AbstractElementDescriptor.java:725)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.<init>(AbstractElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.AbstractComponentChildElementDescriptor.<init>(AbstractComponentChildElementDescriptor.java:30)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.<init>(ModelElementDescriptor.java:37)
at com.ibm.team.repository.common.internal.util.ComponentElementDescriptor.processChild(ComponentElementDescriptor.java:262)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.processChildren(AbstractElementDescriptor.java:725)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.<init>(AbstractElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.ComponentElementDescriptor.<init>(ComponentElementDescriptor.java:39)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.handleExtensionAdded(ComponentRegistry.java:860)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.handleExtensionAdded(ComponentRegistry.java:1)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.basicHandleExtensionAdded(ExtensionRegistryReader.java:205)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.handleExtensionAddedToRegistry(ExtensionRegistryReader.java:624)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.addContributedExtensions(ExtensionRegistryReader.java:143)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.start(ExtensionRegistryReader.java:1129)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.earlyStart(ExtensionRegistryReader.java:318)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.<init>(ExtensionRegistryReader.java:114)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.<init>(ComponentRegistry.java:75)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.<clinit>(ComponentRegistry.java:47)
at com.ibm.team.repository.common.LogFactory.getLog(LogFactory.java:73)
at com.ibm.team.repository.client.internal.TeamRepositoryService.<clinit>(TeamRepositoryService.java:70)
at com.ibm.team.repository.client.TeamPlatform.getTeamRepositoryService(TeamPlatform.java:126)
at jazzExcel.jazz.JazzConnection.getConnection(JazzConnection.java:43)
at jazzExcel.jazz.JazzConnection.<init>(JazzConnection.java:27)
at jazzExcel.main.Start.main(Start.java:12)
Mrz 08, 2012 10:57:37 AM com.ibm.team.repository.common.transport.AbstractElementDescriptor processChildren
Schwerwiegend: null
java.lang.NullPointerException
at com.ibm.team.repository.common.internal.util.VersionStringComparator.getIntegerParts(VersionStringComparator.java:71)
at com.ibm.team.repository.common.internal.util.VersionStringComparator.innerCompare(VersionStringComparator.java:45)
at com.ibm.team.repository.common.internal.util.VersionStringComparator.compare(VersionStringComparator.java:32)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:152)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:1)
at java.util.TreeMap.compare(Unknown Source)
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processEvolutionElement(ModelElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.processChild(ModelElementDescriptor.java:53)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.processChildren(AbstractElementDescriptor.java:725)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.<init>(AbstractElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.AbstractComponentChildElementDescriptor.<init>(AbstractComponentChildElementDescriptor.java:30)
at com.ibm.team.repository.common.internal.util.ModelElementDescriptor.<init>(ModelElementDescriptor.java:37)
at com.ibm.team.repository.common.internal.util.ComponentElementDescriptor.processChild(ComponentElementDescriptor.java:262)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.processChildren(AbstractElementDescriptor.java:725)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.<init>(AbstractElementDescriptor.java:60)
at com.ibm.team.repository.common.internal.util.ComponentElementDescriptor.<init>(ComponentElementDescriptor.java:39)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.handleExtensionAdded(ComponentRegistry.java:860)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.handleExtensionAdded(ComponentRegistry.java:1)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.basicHandleExtensionAdded(ExtensionRegistryReader.java:205)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.handleExtensionAddedToRegistry(ExtensionRegistryReader.java:624)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.addContributedExtensions(ExtensionRegistryReader.java:143)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.start(ExtensionRegistryReader.java:1129)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.earlyStart(ExtensionRegistryReader.java:318)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.<init>(ExtensionRegistryReader.java:114)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.<init>(ComponentRegistry.java:75)
at com.ibm.team.repository.common.internal.util.ComponentRegistry.<clinit>(ComponentRegistry.java:47)
at com.ibm.team.repository.common.LogFactory.getLog(LogFactory.java:73)
at com.ibm.team.repository.client.internal.TeamRepositoryService.<clinit>(TeamRepositoryService.java:70)
at com.ibm.team.repository.client.TeamPlatform.getTeamRepositoryService(TeamPlatform.java:126)
at jazzExcel.jazz.JazzConnection.getConnection(JazzConnection.java:43)
at jazzExcel.jazz.JazzConnection.<init>(JazzConnection.java:27)
at jazzExcel.main.Start.main(Start.java:12)

Contacting https://clm-tomcat:9443/ccm/...
Connected


Because on top stands something with VersionString I tried the Java API 3.0.1, but the same Exception occured.

Despite of this Exception I am connected and can read Workitems through it. Does it course any harm?

Kind regards

Accepted answer


permanent link
Ralf Zahn (4112) | answered Mar 08 '12, 12:05 p.m.
This seems to be a bug. The plugin.xml file within the com.ibm.team.scm.common bundle contains the following line:

[dtoEvolution componentVersion="3.0"]


where the attribute modelVersion is missing. So the invocation of com.ibm.team.repository.common.internal.util.EvolutionDescriptor#getModelVersion() returns null. This null-value is used for comparison within the com.ibm.team.repository.common.internal.util.VersionStringComparator. Unfortunately, this comparator is not able to handle null values.

So one of those (a missing modelVersion or the comparator) have to get fixed.
Melanie Finke selected this answer as the correct answer

2 other answers



permanent link
Oliver Vinn (261) | answered Jul 13 '12, 5:17 a.m.
I have a similar problem; To hide this from the user I redirect stderr and stdout before the call and then restore them afterwards.

// Stop bug displaying
// at com.ibm.team.repository.common.internal.util.VersionStringComparator.getIntegerParts(VersionStringComparator.java:71)

                // Capture for restore
PrintStream stderr = System.err;
PrintStream stdout = System.out;
try {
                        // Redirect output to null (don't capture)
System.setErr(null);
System.setOut(null);
                        // Get RTC connection
connection = TeamPlatform.getTeamRepositoryService().getTeamRepository(repository);
}
finally {

                        // Ensure we restore afterwards
System.setErr(stderr);
System.setOut(stdout);
}

permanent link
Sjors van der Gouw (162) | answered May 08 '12, 4:38 p.m.
I get the same (non-blocking) NullPointerException running anttask "startBuildActivity" (RTC 3.0.1.1). But it seems to be caused by switching to Java 1.7.0_03. No problems when building using Java 1.6.0_29.
Anyone recognizes this JDK relation???

I've not tried combination of latest RTC (3.0.1.2?) with latest JDK (1.7.0_04) yet.

Comments
Andy Edwards commented Mar 27 '13, 10:32 a.m. | edited Mar 27 '13, 10:42 a.m.

I'm hitting the same problem with IBM JVMs:

IBM JVM Java 1.6.0 SR9 works fine.
IBM JVM Java 1.7.0 SR4, startBuildActivity hits java.lang.NullPointerException at com.ibm.team.repository.common.internal.util.VersionStringComparator.getIntegerParts(VersionStringComparator.java:71)

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.