It's all about the answers!

Ask a question

NullPointerException when running snippets


Jared Russell (1.3k12019) | asked Mar 07 '11, 12:59 p.m.
Hi,

I'm trying to setup my development environment for RTC 3 and I'm having an issue when trying to run the plainjava snippets. I've been following the guide here.

I have the RTC 3 client installed to: C:\rtc\jazz - 3.0, with the plainjava libraries installed to C:\rtc\jazz - 3.0\client\plainjava.

I then created a new plugin project as per the guide referenced above, using the plainjava fodler as the location. I then added all of the dependencies in the Automated Management of Dependencies section, saved the project, added the dependencies to the Required Dependencies section, and finally deleted all dependencies from the automated section. At this point the snippets all compile with no errors.

To try and run snippet 1, I created a debug configuration with the Snippets project and snippets.Snippet1 main class selected. In the arguments tab I entered the following VM argument: -Djava.ext.dirs="C:\rtc\jazz - 3.0\client\eclipse\jdk\jre\lib\ext":snippets:.. In the classpath tab I select the User Entries section and then select Add JARS's... and select all JAR's in the snippets folder.

When I run this configuration I get the following output from the eclipse console:


Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.repository that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.links that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.filesystem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.filesystem that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.query that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.linkClosure that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.foundation.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.foundation that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.scm.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.scm that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.process.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.process that is not unique.
Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.initializeBaseTrustManager(ValidatingX509TrustManager.java:56)
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.<init>(ValidatingX509TrustManager.java:99)
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.<init>(ValidatingX509TrustManager.java:79)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFactory.<init>(SecureInterruptableSocketFactory.java:117)
at com.ibm.team.repository.transport.client.RemoteTeamServer.buildHostConfiguration(RemoteTeamServer.java:234)
at com.ibm.team.repository.transport.client.RemoteTeamServer.ensureInitialized(RemoteTeamServer.java:208)
at com.ibm.team.repository.transport.client.RemoteTeamServer.setCredentials(RemoteTeamServer.java:462)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:383)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:400)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:111)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:130)
at snippets.Snippet1.login(Snippet1.java:37)
at snippets.Snippet1.main(Snippet1.java:28)


Does anyone have any ideas why I'm seeing this?

I have found that if I remove the JVM argument from the debug configuration the exception is no longer thrown, and the snippet runs ok, however I still see the "SEVERE" entries in the log file...


Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.repository that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.links that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.filesystem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.filesystem that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.query that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.linkClosure that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.foundation.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.foundation that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.scm.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.scm that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.process.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.process that is not unique.
Contacting https://localhost:9443/ccm/...
Unable to login: CRJAZ1371E The URL "https://localhost:9443/ccm/versionCompatibility?clientVersion=3.0" cannot be reached. The server cannot be reached. The network could not connect to the server. The error is "Connection refused: connect". Contact your system administrator.


Thanks,

Jared

6 answers



permanent link
Carlos Maciel (3112) | answered Jun 25 '12, 10:37 a.m.
Just wanted to add something important. This solution worked for me, but as having the workspace on linux, the environment variables should be separated by ":", not ";". Example: -Djava.ext.dirs=path-to-env\jazz\client\plainjava:snippets:path-to-env\jazz\server\jre\lib\ext:. snippets.Snippet1

permanent link
Gael CROVA (2145) | answered Nov 21 '11, 9:33 a.m.
Hello,

I just found the same problem, and I fixed it as indicated in https://jazz.net/forums/viewtopic.php?p=26680

To fix it using your command line (on windows environment), you can include the ext/lib of the server as following
java -Djava.ext.dirs=path-to-env\jazz\client\plainjava;snippets;path-to-env\jazz\server\jre\lib\ext;. snippets.Snippet1

Hope this help !
Gael

permanent link
A B (881811) | answered Sep 21 '11, 11:52 p.m.
In some post i read that this issue is related to enviornment or class path setting but not really sure what the exact cause is.

I checked at my end but the settings looks OK :| . Also, at my end, this dont interfere with proper functioning of code.

-regards,
Achal

I'm seeing the same issue. Was anybody able to resolve this problem?

permanent link
Lachlan Hillman (3631) | answered Sep 21 '11, 5:40 p.m.
I'm seeing the same issue. Was anybody able to resolve this problem?

permanent link
A B (881811) | answered Aug 31 '11, 8:36 a.m.
@jrussell and devwillie

I also got similar errors(pasted below) under similar circumstances. Any idea why this is happening and what could be the solution for it?

-Regards,
Achal

Errors:

Aug 31, 2011 4:57:08 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.filesystem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.filesystem that is not unique.
Aug 31, 2011 4:57:08 PM

permanent link
William Lucas (1823) | answered May 03 '11, 6:04 p.m.
Hi,

I've found the same messages for RTC 2.0 (no NullPointerException but received the same ExtensionRegistryReader errors.

-Will

Hi,

I'm trying to setup my development environment for RTC 3 and I'm having an issue when trying to run the plainjava snippets. I've been following the guide here.

I have the RTC 3 client installed to: C:\rtc\jazz - 3.0, with the plainjava libraries installed to C:\rtc\jazz - 3.0\client\plainjava.

I then created a new plugin project as per the guide referenced above, using the plainjava fodler as the location. I then added all of the dependencies in the Automated Management of Dependencies section, saved the project, added the dependencies to the Required Dependencies section, and finally deleted all dependencies from the automated section. At this point the snippets all compile with no errors.

To try and run snippet 1, I created a debug configuration with the Snippets project and snippets.Snippet1 main class selected. In the arguments tab I entered the following VM argument: -Djava.ext.dirs="C:\rtc\jazz - 3.0\client\eclipse\jdk\jre\lib\ext":snippets:.. In the classpath tab I select the User Entries section and then select Add JARS's... and select all JAR's in the snippets folder.

When I run this configuration I get the following output from the eclipse console:


Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.repository that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.links that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.filesystem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.filesystem that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.query that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.linkClosure that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.foundation.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.foundation that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.scm.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.scm that is not unique.
Mar 7, 2011 5:50:31 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.process.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.process that is not unique.
Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.initializeBaseTrustManager(ValidatingX509TrustManager.java:56)
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.<init>(ValidatingX509TrustManager.java:99)
at com.ibm.team.repository.transport.client.ValidatingX509TrustManager.<init>(ValidatingX509TrustManager.java:79)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFactory.<init>(SecureInterruptableSocketFactory.java:117)
at com.ibm.team.repository.transport.client.RemoteTeamServer.buildHostConfiguration(RemoteTeamServer.java:234)
at com.ibm.team.repository.transport.client.RemoteTeamServer.ensureInitialized(RemoteTeamServer.java:208)
at com.ibm.team.repository.transport.client.RemoteTeamServer.setCredentials(RemoteTeamServer.java:462)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:383)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:400)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:111)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:130)
at snippets.Snippet1.login(Snippet1.java:37)
at snippets.Snippet1.main(Snippet1.java:28)


Does anyone have any ideas why I'm seeing this?

I have found that if I remove the JVM argument from the debug configuration the exception is no longer thrown, and the snippet runs ok, however I still see the "SEVERE" entries in the log file...


Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.repository that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.repository.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.links that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.filesystem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.filesystem that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.query that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.workitem.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.workitem.linkClosure that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.foundation.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.foundation that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.scm.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.scm that is not unique.
Mar 7, 2011 5:53:57 PM com.ibm.team.repository.common.util.ExtensionRegistryReader logError
SEVERE: The com.ibm.team.process.common bundle's plugin.xml file contains a <component> element with the id attribute value com.ibm.team.process that is not unique.
Contacting https://localhost:9443/ccm/...
Unable to login: CRJAZ1371E The URL "https://localhost:9443/ccm/versionCompatibility?clientVersion=3.0" cannot be reached. The server cannot be reached. The network could not connect to the server. The error is "Connection refused: connect". Contact your system administrator.


Thanks,

Jared

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.