achuanle / umlet

Automatically exported from code.google.com/p/umlet
0 stars 0 forks source link

Umlet plugin was unable to instantiate class "com.baselet.plugin.editor.Editor" #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and place com.umlet.plugin_13.0.0.jar into eclipse\plugins.
2. Start eclipse.
3. Create Umlet diagram.

What is the expected output? What do you see instead?
Expected: Umlet Editor opened.
Instead: Error message: Plug-in "com.umlet.plugin" was unable to instantiate 
class "com.baselet.plugin.editor.Editor".

What version of the product are you using? On what operating system?
Umlet plugin 13.0.0, Eclipse Luna, JDK 1.8.0_20 on Windows 8.1 64-bit.

Please provide any additional information below.

Error stack shows Caused by: java.lang.NoClassDefFoundError: Could not 
initialize class sun.awt.Win32FontManager

Original issue reported on code.google.com by tri...@gmail.com on 23 Oct 2014 at 10:39

GoogleCodeExporter commented 9 years ago
I have not found this error message on google, perhaps it's just a plugin cache 
problem (as most eclipse plugin problems are).

Typically they can be fixed by starting eclipse with the clean argument: 
"eclipse -clean".
If that does not help I would suggest to create a new workspace, or download a 
new Eclipse installation.

Original comment by AFDiaX on 7 Nov 2014 at 8:39

GoogleCodeExporter commented 9 years ago
Tried to start Eclipse with -clean option but it does not help to resolve the 
issue.
Also tried with new Eclipse installation (same config), the same error happened 
!

Original comment by tri...@gmail.com on 10 Nov 2014 at 6:28

GoogleCodeExporter commented 9 years ago
The class sun.awt.Win32FontManager should be part of any JRE or JDK (in the 
rt.jar) and if you get a NoClassDefFoundError, it means the class is missing in 
your Java Runtime.

Umlet doesn't use the class directly so it's hard to figure out what the issue 
is, but I guess it has nothing to do with Umlet itself (although I don't have 
Windows 8.1 to check it for myself, but it works on Windows 7)

Have you tried reinstalling the JDK or using another JRE/JDK to start Eclipse?
Alternatively you could try starting standalone UMLet to check if it's an 
Eclipse specific issue.

Original comment by AFDiaX on 10 Nov 2014 at 8:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
One more thing: Is this really the root cause of the problem and not only a 
follow up error? Perhaps you can post the whole stack trace from the Eclipse 
log here (or append it as a text file if its too large).

Thanks

Original comment by AFDiaX on 10 Nov 2014 at 8:33

GoogleCodeExporter commented 9 years ago
Hi,
I can run standalone Umlet with no problem, Windows 8.1, JDK 1.8.0_25.
Following is Eclipse trace when running Umlet plugin. Windows 8.1, JDK
1.8.0_25, Eclipse Luna. Have looked into rt.jar, it does contain
sun.awt.Win32FontManager

org.eclipse.core.runtime.CoreException: Plug-in "com.umlet.plugin" was
unable to instantiate class "com.baselet.plugin.editor.Editor".
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(Regi
stryStrategyOSGI.java:194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExt
ension(RegistryStrategyOSGI.java:188)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(E
xtensionRegistry.java:905)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio
n(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableEx
tension(ConfigurationElementHandle.java:55)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285
)
at
org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.
java:235)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:349)
at
org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(Compatibil
ityPart.java:265)
at
org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(Compatib
ilityEditor.java:63)
at
org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityP
art.java:303)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at
org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:
888)
at
org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:
869)
at
org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
at
org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
at
org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactor
y.java:162)
at
org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBun
dle(ReflectionContributionFactory.java:104)
at
org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(Refl
ectionContributionFactory.java:73)
at
org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(Reflec
tionContributionFactory.java:55)
at
org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(C
ontributedPartRenderer.java:127)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRe
nderingEngine.java:983)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartR
enderingEngine.java:662)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartR
enderingEngine.java:766)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRender
ingEngine.java:737)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRendering
Engine.java:731)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRende
ringEngine.java:715)
at
org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceIm
pl.java:94)
at
org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.j
ava:40)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4734)
at
org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.
java:218)
at
org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHan
dler.java:36)
at
org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerW
rapper.java:197)
at
org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandle
rTracker.java:197)
at
org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandle
rTracker.java:1)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java
:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(Liste
nerQueue.java:148)
at
org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.j
ava:135)
at
org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:
78)
at
org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:
39)
at
org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
at
org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPubli
sher.java:59)
at
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.j
ava:374)
at
org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElem
ent(ElementContainerImpl.java:171)
at
org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelS
erviceImpl.java:488)
at
org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImp
l.java:454)
at
org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServ
iceImpl.java:694)
at
org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.
java:387)
at
org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.ja
va:1134)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210)
at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3056)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:541)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:500)
at com.baselet.plugin.wizard.NewWizard$2.run(NewWizard.java:142)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.j
ava:175)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
at com.baselet.plugin.wizard.NewWizard.performFinish(NewWizard.java:93)
at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at
org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.
java:269)
at
org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at
org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:
247)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at
org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFact
ory.java:132)
at
org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServi
ceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCo
mmand.java:508)
at
org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerS
erviceImpl.java:210)
at
org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandl
erService.java:343)
at
org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:15
9)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:595)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.
java:511)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContribution
Item.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRendering
Engine.java:1151)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEn
gine.java:1032)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java
:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java
:135)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ecli
pseAppLauncher.java:134)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLau
ncher.java:104)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
sun.awt.Win32FontManager
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:491)
at java.awt.Font.access$000(Font.java:224)
at java.awt.Font$FontAccessImpl.getFont2D(Font.java:228)
at sun.font.FontUtilities.getFont2D(FontUtilities.java:180)
at
sun.font.FontUtilities.fontSupportsDefaultEncoding(FontUtilities.java:338)
at
com.sun.java.swing.plaf.windows.WindowsLookAndFeel$WindowsFontProperty.configure
Value(WindowsLookAndFeel.java:2293)
at
com.sun.java.swing.plaf.windows.DesktopProperty.createValue(DesktopProperty.java
:154)
at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:233)
at javax.swing.UIDefaults.get(UIDefaults.java:163)
at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:64)
at javax.swing.UIDefaults.getFont(UIDefaults.java:389)
at javax.swing.UIManager.getFont(UIManager.java:672)
at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:208)
at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:66)
at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56)
at javax.swing.JComponent.setUI(JComponent.java:663)
at javax.swing.JPanel.setUI(JPanel.java:153)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.<init>(JPanel.java:86)
at javax.swing.JPanel.<init>(JPanel.java:95)
at
com.baselet.gui.eclipse.EclipseGUIBuilder.<init>(EclipseGUIBuilder.java:15)
at com.baselet.plugin.editor.Editor.<init>(Editor.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:433)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExt
ension(RegistryStrategyOSGI.java:184)
... 131 more

Original comment by tri...@gmail.com on 16 Nov 2014 at 11:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The error seems to be at:
com.baselet.gui.eclipse.EclipseGUIBuilder.<init>(EclipseGUIBuilder.java:15)

The code is:
private JPanel contentPlaceHolder = new JPanel(new BorderLayout());

so it's just instantiating Swing classes which are part of the JRE and should 
work.

The only thing I could suggest is to try Java7 or older Eclipse versions, but 
perhaps it would be easier to switch to the standalone version or the web 
version (www.umletino.com) and hope that the issue will be fixed in the future.

Unfortunately it seems like there is nothing we can fix in the UMLet codebase.

I will let this issue open to see if other people have the same problem. 
Perhaps then we can find a fix or workaround

Original comment by AFDiaX on 16 Nov 2014 at 1:38

GoogleCodeExporter commented 9 years ago
OK. Will switch to standalone Umlet while waiting for the fix or workaround.
Thanks.

Original comment by tri...@gmail.com on 17 Nov 2014 at 3:25