Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Launching Equinox throws java.lang.ClassCircularityError(Embedding OSGi inside the existing JVM throws an error initially)
Launching Equinox throws java.lang.ClassCircularityError [message #650445] Mon, 24 January 2011 23:26 Go to next message
Tom H is currently offline Tom HFriend
Messages: 18
Registered: July 2009
Junior Member
Hi experts,

I am using org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar in order to start the OSGi environment in existing JVM. I use org.eclipse.core.runtime.adaptor.EclipseStarter.startup to initialize the OSGi instance with proper config.ini and plugins/*.jars.

However, I see this error on the first time I call the startup method inside the JVM. If I can the startup method again in the same JVM, It goes through. Can you let me know what can be wrong?

Thanks,
Tom

The stacktrace is here:
java.lang.ClassCircularityError: org/eclipse/osgi/framework/internal/protocol/jar/Handler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.osgi.framework.util.SecureAction.forName(SecureA ction.java:335)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:80)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createInternalURLStreamHandler(StreamHandlerFactory.ja va:123)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:110)
at java.net.URL.getURLStreamHandler(URL.java:1107)
at java.net.URL.<init>(URL.java:393)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:555)
at sun.misc.URLClassPath$3.run(URLClassPath.java:333)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:322)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:299)
at sun.misc.URLClassPath.getResource(URLClassPath.java:168)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.embed.impl.ReverseDelegationClassLoader.loadReverseDeleg ateClass(ReverseDelegationClassLoader.java:91)
at com.embed.impl.PluginLibraryClassLoader.loadReverseDelegateC lass(PluginLibraryClassLoader.java:58)
at com.embed.impl.ReverseDelegationClassLoader.loadClass(Revers eDelegationClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.embed.impl.ChainedClassLoader.loadClass(ChainedClassLoad er.java:89)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at com.embed.impl.ReverseDelegationClassLoader.loadClass(Revers eDelegationClassLoader.java:168)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.osgi.framework.util.SecureAction.forName(SecureA ction.java:335)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:80)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createInternalURLStreamHandler(StreamHandlerFactory.ja va:123)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:110)
at java.net.URL.getURLStreamHandler(URL.java:1107)
at java.net.URL.<init>(URL.java:393)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:555)
at sun.misc.URLClassPath$3.run(URLClassPath.java:333)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:322)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:299)
at sun.misc.URLClassPath.getResource(URLClassPath.java:168)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.embed.impl.ReverseDelegationClassLoader.loadReverseDeleg ateClass(ReverseDelegationClassLoader.java:91)
at com.embed.impl.PluginLibraryClassLoader.loadReverseDelegateC lass(PluginLibraryClassLoader.java:58)
at com.embed.impl.ReverseDelegationClassLoader.loadClass(Revers eDelegationClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.embed.impl.ChainedClassLoader.loadClass(ChainedClassLoad er.java:89)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at com.embed.impl.ReverseDelegationClassLoader.loadClass(Revers eDelegationClassLoader.java:168)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.osgi.framework.util.SecureAction.forName(SecureA ction.java:335)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:80)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createInternalURLStreamHandler(StreamHandlerFactory.ja va:123)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:110)
at java.net.URL.getURLStreamHandler(URL.java:1107)
at java.net.URL.<init>(URL.java:393)
at java.net.URL.<init>(URL.java:283)
at java.net.URL.<init>(URL.java:306)
at java.io.File.toURL(File.java:623)
at org.eclipse.core.runtime.adaptor.EclipseStarter.searchForBun dle(EclipseStarter.java:574)
at org.eclipse.core.runtime.adaptor.EclipseStarter.getInitialBu ndles(EclipseStarter.java:696)
at org.eclipse.core.runtime.adaptor.EclipseStarter.loadBasicBun dles(EclipseStarter.java:633)
at org.eclipse.core.runtime.adaptor.EclipseStarter.access$1(Ecl ipseStarter.java:623)
at org.eclipse.core.runtime.adaptor.EclipseStarter$1.bundleChan ged(EclipseStarter.java:308)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:1234)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:141)
at org.eclipse.osgi.framework.internal.core.Framework.publishBu ndleEventPrivileged(Framework.java:1518)
at org.eclipse.osgi.framework.internal.core.Framework.publishBu ndleEvent(Framework.java:1469)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:281)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.l aunch(StartLevelManager.java:247)
at org.eclipse.osgi.framework.internal.core.SystemBundle.resume (SystemBundle.java:201)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Fr amework.java:644)
at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.ja va:51)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Ecli pseStarter.java:313)
at com.embed.ATSFetchlet.startOSGIContext(ATSFetchlet.java:157)
at com.embed.ATSFetchlet.getMetric(ATSFetchlet.java:833)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Re: Launching Equinox throws java.lang.ClassCircularityError [message #650544 is a reply to message #650445] Tue, 25 January 2011 13:44 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
This could be related to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=303842 which is fixed in 3.6. It looks like you are using a rather old version of equinox (3.4). Could you try this on 3.6?

Tom.
Re: Launching Equinox throws java.lang.ClassCircularityError [message #650622 is a reply to message #650544] Tue, 25 January 2011 18:26 Go to previous message
Tom H is currently offline Tom HFriend
Messages: 18
Registered: July 2009
Junior Member
Thx Tom.

We will try to see if we can move up to 3.6. Will repost if we can reproduce in 3.6

-Tom
Previous Topic:Where to report issues in classes of package org.osgi....?
Next Topic:Bundle pools
Goto Forum:
  


Current Time: Fri Apr 26 07:05:54 GMT 2024

Powered by FUDForum. Page generated in 0.02781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top