Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem with jar included twice
Problem with jar included twice [message #329355] Fri, 20 June 2008 17:47
David is currently offline DavidFriend
Messages: 3
Registered: July 2009
Junior Member
Hi, I've been developing a plugin and all was (almost) smooth until I
tried to deploy it. My plugin includes (uses) log4j and commons logging,
but it's not intended to run alone... it depends on other plugins which
you most likely don't know aboute (just in case, I'll mention they are
part of the Neon Toolkit). The problem is, if I don't include the jar
package of the commons.logging then I get this message (from the log file):

!ENTRY org.eclipse.osgi 4 0 2008-06-20 19:33:44.218
!MESSAGE An error occurred while automatically activating bundle
org.neontoolkit.oyster2.client.gui (200).
!STACK 0
org.osgi.framework.BundleException: Exception in
org.neontoolkit.oyster2.client.gui.Activator.start() of bundle
org.neontoolkit.oyster2.client.gui.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1010)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:966)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:172)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:625)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:219)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:125)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1487)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:950)
at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:941)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:3408)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3406)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:92)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:336)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:352)
at
org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/Log
at
org.neontoolkit.oyster2.client.gui.WebServersLocator.<init>(WebServersLocator.java:47)
at org.neontoolkit.oyster2.client.gui.Activator.start(Activator .java:51)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:985)
... 58 more
Root exception:
java.lang.NoClassDefFoundError: org/apache/commons/logging/Log
at
org.neontoolkit.oyster2.client.gui.WebServersLocator.<init>(WebServersLocator.java:47)
at org.neontoolkit.oyster2.client.gui.Activator.start(Activator .java:51)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:985)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:966)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:342)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .preFindLocalClass(EclipseLazyStarter.java:88)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:278)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:172)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:625)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:219)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:125)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1487)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:950)
at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:941)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:3408)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3406)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:92)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:336)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:352)
at
org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)








Fine, that was to be expected when omitting a jar file. But if I include
it, the first time I open my perspective it works, but if I close Eclipse
and starts it again, this happens (pay attention to the last line):






!ENTRY com.ontoprise.ontostudio.datamodel 4 0 2008-06-20 19:42:04.296
!MESSAGE java.lang.ExceptionInInitializerError
!STACK 0
java.lang.ExceptionInInitializerError
at
org.springframework.core.io.DefaultResourceLoader.<init>(DefaultResourceLoader.java:52)
at
org.springframework.context.support.AbstractApplicationConte xt. <init>(AbstractApplicationContext.java:184)
at
org.springframework.context.support.AbstractApplicationConte xt. <init>(AbstractApplicationContext.java:177)
at
org.springframework.context.support.GenericApplicationContex t. <init>(GenericApplicationContext.java:97)
at
org.springframework.context.support.GenericApplicationContex t. <init>(GenericApplicationContext.java:119)
at
org.springframework.context.support.StaticApplicationContext . <init>(StaticApplicationContext.java:63)
at
org.springframework.context.support.StaticApplicationContext . <init>(StaticApplicationContext.java:52)
at com.ontoprise.indexer.IndexManager.a(IndexManager.java:67)
at com.ontoprise.indexer.IndexManager.<init>(IndexManager.java:49)
at
com.ontoprise.apibase.OntoBrokerOntologyManagerCore.b(OntoBr okerOntologyManagerCore.java:395)
at
com.ontoprise.apibase.OntoBrokerOntologyManagerCore.<init>(OntoBrokerOntologyManagerCore.java:105)
at
org.semanticweb.kaon2.api.KAON2Manager.newOntologyManager(KA ON2Manager.java:133)
at
com.ontoprise.ontostudio.datamodel.impl.ModuleContainer.conn ect(ModuleContainer.java:305)
at
com.ontoprise.ontostudio.datamodel.impl.ModuleContainer.<init >(ModuleContainer.java:197)
at
com.ontoprise.ontostudio.datamodel.DatamodelPlugin.createCon tainer(DatamodelPlugin.java:459)
at
com.ontoprise.ontostudio.datamodel.DatamodelPlugin.getContai ner(DatamodelPlugin.java:325)
at
com.ontoprise.ontostudio.io.actions.RestoreRunnable.run(Rest oreRunnable.java:65)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:113)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused
by org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed.))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(L ogFactoryImpl.java:543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(L ogFactoryImpl.java:235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(L ogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java :351)
at org.springframework.util.ClassUtils.<clinit>(ClassUtils.java:72)
... 18 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed.)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstru ctor(LogFactoryImpl.java:397)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(L ogFactoryImpl.java:529)
... 22 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid
class loader hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed.
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstru ctor(LogFactoryImpl.java:385)



so, it says:

You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed.

Well... how can I solve this???
... 23 more
Previous Topic:Setting a menu item's name dynamically
Next Topic:How to set Default "Rus As" > launchShortcut to F11 or Ctrl+F11 selection
Goto Forum:
  


Current Time: Thu Jul 25 20:21:56 GMT 2024

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

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

Back to the top