1

I'm trying to use DataObjects in Java:

DataFactory factory = DataFactory.INSTANCE;

in one java Project using:

import commonj.sdo.DataObject;

And I'm getting this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org.eclipse.core.runtime.RegistryFactory
 at org.eclipse.core.internal.runtime.InternalPlatform.getRegistry(InternalPlatform.java:671)
 at org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:867)
 at com.ibm.wsspi.sca.extensions.ServiceProviderRegistry.loadServiceProviders(ServiceProviderRegistry.java:167)
 at com.ibm.wsspi.sca.extensions.ServiceProviderRegistry$1.run(ServiceProviderRegistry.java:88)
 at java.security.AccessController.doPrivileged(AccessController.java:202)
 at com.ibm.wsspi.sca.extensions.ServiceProviderRegistry.getServiceProviders(ServiceProviderRegistry.java:86)
 at com.ibm.wsspi.sca.extensions.ServiceProviderRegistry.getServiceProvider(ServiceProviderRegistry.java:101)
 at com.ibm.ws.sca.resources.loader.ClassLoaderRegistry.<clinit>(ClassLoaderRegistry.java:59)
 at java.lang.J9VMInternals.initializeImpl(Native Method)
 at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
 at com.ibm.ws.sca.internal.container.impl.ContainerImpl.<clinit>(ContainerImpl.java:356)
 at java.lang.J9VMInternals.initializeImpl(Native Method)
 at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
 at com.ibm.ws.sca.internal.container.impl.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:70)
 at com.ibm.ws.sca.internal.container.Container.<clinit>(Container.java:111)
 at java.lang.J9VMInternals.initializeImpl(Native Method)
 at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
Koekiebox
  • 5,793
  • 14
  • 53
  • 88
Pedro
  • 2,907
  • 6
  • 34
  • 46

3 Answers3

0

I faced a similar issue when trying to instantiate the BOFactory class from JUnit. I was able to resolve it by adding org-eclipse-equinox-registry.jar files to my projects, along with the SDO jar files.

Adding JAR files to Project

See also: Junit : Exception while creating BOFactory instance

Community
  • 1
  • 1
0

I think the application is based on EMF SDO?

Instead of Java application, you may run your application as a Eclipse application in your IDE, because the application require OSGi bundle loading mechanism to load the required bundle (i.e. org.eclipse.core.runtime) in the runtime.

qichuan
  • 620
  • 6
  • 13
  • I'm trying to run in Webphere Application Server 7.0, is the target Server. Do we need any special bundle on WAS? – Pedro Jan 11 '11 at 11:57
0

Are you using Process Server? I'm pretty sure com.ibm.ws.sca.internal.container.impl.ContainerImpl is a Process Server class...

Tom Seelbach
  • 201
  • 2
  • 6
  • Yes I'm but I solve the problem putting the classes under packages org.eclipse.emf.ecore.sdo.sample.client and org.eclipse.emf.ecore.sdo.sample.dms – Pedro Jan 14 '11 at 11:16