It's all about the answers!

Ask a question

Strange problem - NoClassDefFound...


Kai Nehring (3116) | asked Jul 03 '08, 6:32 p.m.
Hi,

I've created a Business Delegate to use Jazz functionality from our planning tool. All Unit-Tests pass but when I call it from our project, I can't create a connection to Jazz. Instead, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org.eclipse.core.expressions.ICountable
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at org.eclipse.core.runtime.spi.RegistryStrategy.createExecutableExtension(RegistryStrategy.java:201)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at com.ibm.team.repository.common.internal.util.StandaloneAdapterRegistry.loadFactory(StandaloneAdapterRegistry.java:46)
at com.ibm.team.repository.common.internal.util.StandaloneAdapterRegistry.handleExtensionAdded(StandaloneAdapterRegistry.java:32)
at com.ibm.team.repository.common.util.ExtensionReader.internalReadElement(ExtensionReader.java:196)
at com.ibm.team.repository.common.util.ExtensionReader.readRegistry(ExtensionReader.java:344)
at com.ibm.team.repository.common.util.ExtensionReader.start(ExtensionReader.java:374)
at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeAdapterRegistry(InternalTeamPlatform.java:248)
at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:105)
at com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:48)
at ca.ucalgary.jazzconnect.internal.JazzConnection.login(JazzConnection.java:39)
at ca.ucalgary.jazzconnect.ComponentManager.setup(ComponentManager.java:101)
at ca.ucalgary.jazzconnect.ComponentManager.<init>(ComponentManager.java:49)
at ca.ucalgary.agileplanner.adapter.jazz.ComponentManager.getAdapter(ComponentManager.java:18)
at persister.distributed.ServerCommunicator.main(ServerCommunicator.java:104)




I've never seen the org.eclipse.core.expressions package that should contain the ICountable interface. I don't have this package or interface in my connector-project.

What's the problem and how can I solve it?

Thanks in advance,
Kai

4 answers



permanent link
Matt Lavin (2.7k2) | answered Jul 09 '08, 9:17 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Sounds like it might be a launch configuration setup problem.

When you say "All Unit-Tests pass" are you referring to testcases that you wrote, or testcases that were written for the basic jazz functionality?

When you "call it from project", have you tried to 'Validate plug-ins' from the plug-in tab of the launch configuration dialog.

permanent link
Christof Marti (681) | answered Jul 10 '08, 2:43 a.m.
Hi Kai,

it looks like the problem occurs in a plain-Java setup where org.eclipse.core.expressions is not supported. The exception is thrown when an IAdapterFactory is instantiated which probably uses ICountable. Searching for both in my workspace shows that SelectionAdapterFactory in the org.eclipse.ui.workbench plug-in is such an adapter factory, maybe you have that or a similar adapter factory on your classpath and need to remove it?

HTH,

Christof
Jazz Work Item team


kainehring wrote:
Hi,

I've created a Business Delegate to use Jazz functionality from our
planning tool. All Unit-Tests pass but when I call it from our
project, I can't create a connection to Jazz. Instead, I get the
following error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org.eclipse.core.expressions.ICountable
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at
org.eclipse.core.runtime.spi.RegistryStrategy.createExecutableExtension(RegistryStrategy.java:201)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at
com.ibm.team.repository.common.internal.util.StandaloneAdapterRegistry.loadFactory(StandaloneAdapterRegistry.java:46)
at
com.ibm.team.repository.common.internal.util.StandaloneAdapterRegistry.handleExtensionAdded(StandaloneAdapterRegistry.java:32)
at
com.ibm.team.repository.common.util.ExtensionReader.internalReadElement(ExtensionReader.java:196)
at
com.ibm.team.repository.common.util.ExtensionReader.readRegistry(ExtensionReader.java:344)
at
com.ibm.team.repository.common.util.ExtensionReader.start(ExtensionReader.java:374)
at
com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeAdapterRegistry(InternalTeamPlatform.java:248)
at
com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:105)
at
com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:48)
at
ca.ucalgary.jazzconnect.internal.JazzConnection.login(JazzConnection.java:39)
at
ca.ucalgary.jazzconnect.ComponentManager.setup(ComponentManager.java:101)
at
ca.ucalgary.jazzconnect.ComponentManager.<init>(ComponentManager.java:49)
at
ca.ucalgary.agileplanner.adapter.jazz.ComponentManager.getAdapter(ComponentManager.java:18)
at
persister.distributed.ServerCommunicator.main(ServerCommunicator.java:104)




I've never seen the org.eclipse.core.expressions package that should
contain the ICountable interface. I don't have this package or
interface in my connector-project.

What's the problem and how can I solve it?

Thanks in advance,
Kai

permanent link
Kai Nehring (3116) | answered Jul 10 '08, 5:08 p.m.
Hi,

This problem only seem to appear when I try to use the "plain java API" in an eclipse plug in project. I moved the code to the server implementation (where it belongs to) which is not an eclipse plug in --> everything is fine.

Thanks
Kai




Hi Kai,

it looks like the problem occurs in a plain-Java setup where org.eclipse.core.expressions is not supported. The exception is thrown when an IAdapterFactory is instantiated which probably uses ICountable. Searching for both in my workspace shows that SelectionAdapterFactory in the org.eclipse.ui.workbench plug-in is such an adapter factory, maybe you have that or a similar adapter factory on your classpath and need to remove it?

HTH,

Christof
Jazz Work Item team


kainehring wrote:
Hi,

I've created a Business Delegate to use Jazz functionality from our
planning tool. All Unit-Tests pass but when I call it from our
project, I can't create a connection to Jazz. Instead, I get the
following error:



permanent link
Craig Raffel (7157) | answered Aug 20 '12, 2:53 p.m.
I am using the Plain Java API and had a similar NoClassDefFound for InternalTeamPlatform.

You don't have all of the required jars on your classpath, I am thinking the API is loading classes at runtime.

I resolved the issue by placing each jar in RTC-Client-plainJavaLib-3.0.1.2 in my classpath and removing them one by one until I received an error. I would put the jar back on the classpath until I went through all of them...

Your answer


Register or to post your answer.