Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Plain Java client - org/eclipse/osgi/util/NLS

I am trying to run a Plain Java client outside of Eclipse. I am using RTC 3.0.1. I have installed the files from RTC-Client-plainJavaLib-3.0.1.zip. When I run the program, I receive the following stack trace. The program runs fine within Eclipse.

java.lang.NoClassDefFoundError: org/eclipse/osgi/util/NLS
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.core.internal.registry.ExtensionRegistry.addContribution(ExtensionRegistry.java:914)
at com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry.processPlugin(StandaloneExtensionRegistry.java:139)
at com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry.<init>(StandaloneExtensionRegistry.java:106)
at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeRegistry(InternalTeamPlatform.java:233)
at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:102)
at com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:49)

0 votes



One answer

Permanent link
I am running the Java program via an Ant Taskdef. Here is a snippet from the build.xml file.

<path id="compile.classpath">
<fileset dir="${rtc.lib.dir}">
<include name="*.jar"/>
</fileset>
</path>

<path id="run.classpath">
<path refid="compile.classpath" />
<path path="${classes.dir}"/>
</path>

<taskdef name="loadrtc" classname="LoadRtcTask" loaderref="run.classpath.loader"/>



Does the ClassLoader created by StandaloneExtensionRegistry delegate to the parent ClassLoader if a class is not found? Listed below is some Ant debug output showing that the NLS class was successfully loaded by Ant when initially accessing TeamPlatform

Finding class org.eclipse.osgi.util.NLS
Loaded from c:\view\rpastuch_view2\payx\tools\lib\rtc\org.eclipse.osgi_3.5.2.R35x_v20100126.jar org/eclipse/osgi/util/NLS.class
Class org.eclipse.osgi.util.NLS loaded from ant loader (parentFirst)
Finding class com.ibm.team.repository.client.TeamPlatform
Loaded from c:\view\rpastuch_view2\payx\tools\lib\rtc\com.ibm.team.repository.client_1.1.1.v20110524_1821.jar com/ibm/team/repository/client/TeamPlatform.class
Class com.ibm.team.repository.client.TeamPlatform loaded from ant loader (parentFirst)
Finding class com.ibm.team.repository.client.ITeamRepositoryService
Loaded from c:\view\rpastuch_view2\payx\tools\lib\rtc\com.ibm.team.repository.client_1.1.1.v20110524_1821.jar com/ibm/team/repository/client/ITeamRepositoryService.class
Finding class com.ibm.team.repository.client.util.IEventSource
Loaded from c:\view\rpastuch_view2\payx\tools\lib\rtc\com.ibm.team.repository.client_1.1.1.v20110524_1821.jar com/ibm/team/repository/client/util/IEventSource.class
Class com.ibm.team.repository.client.util.IEventSource loaded from ant loader (parentFirst)
Class com.ibm.team.repository.client.ITeamRepositoryService loaded from ant loader (parentFirst)


Thanks.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 11 '11, 10:12 a.m.

Question was seen: 6,134 times

Last updated: Nov 11 '11, 10:12 a.m.

Confirmation Cancel Confirm