Skip to main content



      Home
Home » Modeling » Papyrus » ClassNotFoundException on run(java.lang.ClassNotFoundException gets thrown when project is run)
ClassNotFoundException on run [message #1832591] Mon, 21 September 2020 09:34 Go to next message
Eclipse UserFriend
Hey guys,

I'm working on a project where Papyrus has been added to an Eclipse RCP project. Most things are working for now, but the attached exceptions are logged into the console on startup.
The org.eclipse.papyrus.uml.diagram.common plugin should include the editparts or am I missing something?

!ENTRY org.eclipse.papyrus.infra.tools 4 0 2020-09-21 15:07:35.799
!MESSAGE The class org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart doesn't exist
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart cannot be found by org.eclipse.papyrus.infra.gmfdiag.properties_4.1.200.202006100749
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:138)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:89)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:68)
	at org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf.setDescriptor(JavaInstanceOf.java:32)
	at org.eclipse.papyrus.infra.constraints.constraints.AbstractConstraint.setConstraintDescriptor(AbstractConstraint.java:54)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.loadConstraint(ConstraintFactory.java:89)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.createFromModel(ConstraintFactory.java:71)
	at org.eclipse.papyrus.infra.constraints.runtime.DefaultConstraintEngine.addConstraint(DefaultConstraintEngine.java:77)
	at org.eclipse.papyrus.infra.properties.ui.runtime.ViewConstraintEngineImpl.addContext(ViewConstraintEngineImpl.java:57)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:726)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:707)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:633)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:530)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.processContext(ContextExtensionPoint.java:93)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.<init>(ContextExtensionPoint.java:62)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.start(ConfigurationManager.java:169)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.getInstance(ConfigurationManager.java:143)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.ContextConfigurator.<clinit>(ContextConfigurator.java:19)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.configureContexts(Activator.java:80)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.start(Activator.java:49)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:843)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:792)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:477)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:923)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.ui.internal.WorkbenchPlugin.lambda$0(WorkbenchPlugin.java:287)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:55)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
	at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:55)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.Workbench$40.run(Workbench.java:2701)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.papyrus.infra.tools 4 0 2020-09-21 15:07:35.859
!MESSAGE The class org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart doesn't exist
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart cannot be found by org.eclipse.papyrus.infra.gmfdiag.properties_4.1.200.202006100749
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:138)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:89)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:68)
	at org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf.setDescriptor(JavaInstanceOf.java:32)
	at org.eclipse.papyrus.infra.constraints.constraints.AbstractConstraint.setConstraintDescriptor(AbstractConstraint.java:54)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.loadConstraint(ConstraintFactory.java:89)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.createFromModel(ConstraintFactory.java:71)
	at org.eclipse.papyrus.infra.constraints.runtime.DefaultConstraintEngine.addConstraint(DefaultConstraintEngine.java:77)
	at org.eclipse.papyrus.infra.properties.ui.runtime.ViewConstraintEngineImpl.addContext(ViewConstraintEngineImpl.java:57)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:726)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:707)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:633)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:530)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.processContext(ContextExtensionPoint.java:93)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.<init>(ContextExtensionPoint.java:62)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.start(ConfigurationManager.java:169)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.getInstance(ConfigurationManager.java:143)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.ContextConfigurator.<clinit>(ContextConfigurator.java:19)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.configureContexts(Activator.java:80)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.start(Activator.java:49)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:843)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:792)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:477)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:923)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.ui.internal.WorkbenchPlugin.lambda$0(WorkbenchPlugin.java:287)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:55)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
	at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:55)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.Workbench$40.run(Workbench.java:2701)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.papyrus.infra.tools 4 0 2020-09-21 15:07:35.876
!MESSAGE The class org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart doesn't exist
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart cannot be found by org.eclipse.papyrus.infra.gmfdiag.properties_4.1.200.202006100749
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:138)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:89)
	at org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper.loadClass(ClassLoaderHelper.java:68)
	at org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf.setDescriptor(JavaInstanceOf.java:32)
	at org.eclipse.papyrus.infra.constraints.constraints.AbstractConstraint.setConstraintDescriptor(AbstractConstraint.java:54)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.loadConstraint(ConstraintFactory.java:89)
	at org.eclipse.papyrus.infra.constraints.runtime.ConstraintFactory.createFromModel(ConstraintFactory.java:71)
	at org.eclipse.papyrus.infra.constraints.runtime.DefaultConstraintEngine.addConstraint(DefaultConstraintEngine.java:77)
	at org.eclipse.papyrus.infra.properties.ui.runtime.ViewConstraintEngineImpl.addContext(ViewConstraintEngineImpl.java:57)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:726)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.enableContext(ConfigurationManager.java:707)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:633)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.addContext(ConfigurationManager.java:530)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.processContext(ContextExtensionPoint.java:93)
	at org.eclipse.papyrus.infra.properties.internal.ContextExtensionPoint.<init>(ContextExtensionPoint.java:62)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.start(ConfigurationManager.java:169)
	at org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.getInstance(ConfigurationManager.java:143)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.ContextConfigurator.<clinit>(ContextConfigurator.java:19)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.configureContexts(Activator.java:80)
	at org.eclipse.papyrus.mbt.ui.simplification.internal.Activator.start(Activator.java:49)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:843)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:792)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:477)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:923)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.ui.internal.WorkbenchPlugin.lambda$0(WorkbenchPlugin.java:287)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:55)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
	at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:55)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.Workbench$40.run(Workbench.java:2701)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Re: ClassNotFoundException on run [message #1832614 is a reply to message #1832591] Tue, 22 September 2020 03:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Heinrich,

It very much should indeed. From the trace I assume you are using the 2020-06 release (4.8.0) ? can you see if the included jar do contain any of the mentioned classes (I just checked in the released jars and it is indeed there) ?
Are you importing/depending on the associated packages or is the common plugin correctly loaded when the RCP starts ?

Cheers,
/Quentin
Re: ClassNotFoundException on run [message #1832615 is a reply to message #1832591] Tue, 22 September 2020 03:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Bernhard,

This should be harmless (at the moment) and doesn't actually indicate that the classes do not exist. Rather, it indicates that we're looking for them in the wrong place, and that 1) It causes performance issues and 2) It might break in the future (When Bug 546433 [1] is fixed).

Since this code has been there for years, I'm surprised we didn't catch the errors earlier. These errors should be reported (as a sub-task of Bug 543723 [2], similar to Bug 543726 [3] )

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=546433
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=543723
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=543726

HTH,
Camille
Re: ClassNotFoundException on run [message #1832621 is a reply to message #1832614] Tue, 22 September 2020 03:59 Go to previous messageGo to next message
Eclipse UserFriend
Quentin Le Menez wrote on Tue, 22 September 2020 07:27
Hi Heinrich,

It very much should indeed. From the trace I assume you are using the 2020-06 release (4.8.0) ? can you see if the included jar do contain any of the mentioned classes (I just checked in the released jars and it is indeed there) ?
Are you importing/depending on the associated packages or is the common plugin correctly loaded when the RCP starts ?

Cheers,
/Quentin

Hey and thank you for your replies,

Yes, I'm using the 2020-06 release, after updating from 2020-03 to see if the exceptions are fixed. The included jar does indeed contain the mentioned classes.
I'm new to the project and Eclipse RCP, so I'm not exactly sure what you mean, but the plugin is included in the run configuration.

Cheers,
Bernhard

[Updated on: Tue, 22 September 2020 04:00] by Moderator

Re: ClassNotFoundException on run [message #1832641 is a reply to message #1832621] Tue, 22 September 2020 09:21 Go to previous message
Eclipse UserFriend
Hi

Not sure if it's the problem here, but when I need to refer to a class by textual name, e.g. "XXX", I generate the text by XXX.class.getName() thereby ensuring that XXX is correctly spelled and that any refactoring takes effect and that searches hit. Never type it independently. If you have a dependency problem, use a builder to auto-generate a file containing some upstream constants that are defined to reference downstream values.

Regards

Ed Willink
Previous Topic:Adding a new plugin to Papyrus
Next Topic:Bug fixing strategy?
Goto Forum:
  


Current Time: Thu Jul 17 09:03:51 EDT 2025

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

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

Back to the top