Roger11
(Roger Parkinson)
August 16, 2011, 6:21am
1
Here is what happens. I downloaded a fresh copy of Eclipse and installed it (this is to ensure no problems are caused by all the random plugins I have installed in my main system). This is the Eclipse+Java package so it just has the eclipse IDE and Mylyn. I removed Mylyn.
I installed the Vaadin plugin and created a Vaadin project in my empty workspace. All good.
Then I created a Vaadin Composite and that worked in that it created a Java file that looks like this:
package com.example.testingvaadin;
import com.vaadin.Application;
import com.vaadin.ui.*;
public class TestingvaadinApplication extends Application {
@Override
public void init() {
Window mainWindow = new Window(“Testingvaadin Application”);
Label label = new Label(“Hello Vaadin user”);
mainWindow.addComponent(label);
setMainWindow(mainWindow);
}
}
When I try to open it though I get a long stack trace in the eclipse log (below). It looks like it is trying to do something with mozilla and not finding a library. I checked the locations it is looking for libswt-mozilla-gtk-3659.so and libswt-mozilla-gtk.so and they are there on my disk. Anyone know what is going on?
Versions:
vaadin 6.6.4
Vaadin Bundle For Eclipse 6.6.2.201106151429
Vaadin Plug-in for Eclipse 2.0.1.201105170102
Eclipse Helios Service Release 2 Build id: 20110218-0911
FireFox 5.0
Ubuntu 11.04
Java java-6-sun-1.6.0.26
here’s the stack trace:
!ENTRY org.eclipse.jface 4 0 2011-08-16 17:58:04.832
!MESSAGE Unhandled event loop exception during blocked modal context.
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME=‘/usr/lib/xulrunner-addons’]
(java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/opt/eclipse_36_java/configuration/org.eclipse.osgi/bundles/203/1/.cp/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
no swt-mozilla-gtk in java.library.path
/tmp/swtlib-32/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
Can’t load library: /tmp/swtlib-32/libswt-mozilla-gtk.so
))
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
at com.vaadin.visualdesigner.eclipse.wizards.NewCustomComponentWizard.performFinish(NewCustomComponentWizard.java:67)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:254)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME=‘/usr/lib/xulrunner-addons’]
(java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/opt/eclipse_36_java/configuration/org.eclipse.osgi/bundles/203/1/.cp/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
no swt-mozilla-gtk in java.library.path
/tmp/swtlib-32/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
Can’t load library: /tmp/swtlib-32/libswt-mozilla-gtk.so
)
at org.eclipse.swt.SWT.error(SWT.java:4109)
at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1770)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:656)
at org.eclipse.swt.browser.Browser.(Browser.java:119)
at com.vaadin.visualdesigner.eclipse.editors.VaadinEditor.createBrowser(VaadinEditor.java:246)
at com.vaadin.visualdesigner.eclipse.editors.VaadinEditor.createVisualEditorPage(VaadinEditor.java:202)
at com.vaadin.visualdesigner.eclipse.editors.VaadinEditor.createPages(VaadinEditor.java:135)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:747)
at com.vaadin.visualdesigner.eclipse.wizards.NewCustomComponentWizard$2.run(NewCustomComponentWizard.java:126)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
… 51 more
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/opt/eclipse_36_java/configuration/org.eclipse.osgi/bundles/203/1/.cp/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
no swt-mozilla-gtk in java.library.path
/tmp/swtlib-32/libswt-mozilla-gtk-3659.so: libxpcom.so: cannot open shared object file: No such file or directory
Can’t load library: /tmp/swtlib-32/libswt-mozilla-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:267)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1755)
... 73 more
John
(John Ahlroos)
August 16, 2011, 7:06am
2
Just to check, do you have XULRunner installed? If not, something like
sudo apt-get install xulrunner-2.0
should do the trick.
Roger11
(Roger Parkinson)
August 16, 2011, 7:23pm
3
I didn’t but I do now and it did not make any difference.
Thanks for the reply, though, I’m sure it is a step along the way.
Actually I think the problem is affecting things other than the Vaadin plugin.
If the internal browser is invoked then this error shows.
So there’s some underlying problem (which made your suggestion look very hopeful)
Roger11
(Roger Parkinson)
August 16, 2011, 10:21pm
4
I downloaded and installed this package (couldn’t see how to do it except manually):
http://packages.ubuntu.com/maverick/libswt-mozilla-gtk-3.5-jni
and then it worked.
I still have xulrunner installed too, so that might be part of the solution.
There are old references to issues in Eclipse:
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/456167
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/445842
John
(John Ahlroos)
August 19, 2011, 6:30am
5
For reference.
This issue came up on my Fedora 15 machine as well, here are the steps I had to do to get it to work:
SWT does not come preinstalled anymore. You need to install it by issuing
yum install eclipse-swt
Eclipse might still complain that about a missing MOZILLA_FIVE_HOME path. You can resolve this issue by adding
export MOZILLA_FIVE_HOME=“/usr/lib64/xulrunner-2”
to your .bash_profile. Change path accordingly if you are not using a 64bit system. Remember to log out and in again after the change!
If that did not work, ensure that you have XULRunner installed and the path to it is set correctly.