Run of GAMA SVN Version on OSX Gives NoSuchMethodException

16 views
Skip to first unread message

Jason Barto

unread,
Jan 21, 2015, 10:45:30 AM1/21/15
to gama-p...@googlegroups.com


All,
I've recently built the latest rev of Gama from Subversion using the Gama provided instructions and using the Juno Eclipse.  The application seems to run well enough as an Eclipse application but after exporting it to be a standalone application I receive the following exception while reading in an ESRI shape file:

Begin Sub Task =Reading fileRoads_ITN.shp
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTError: Not implemented (java.lang.NoSuchMethodException: sun.lwawt.macosx.CEmbeddedFrame.<init>(long)))
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:196)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4650)
at msi.gama.gui.swt.SwtGui.run(SwtGui.java:777)
at msi.gama.common.util.GuiUtils.run(GuiUtils.java:212)
at msi.gama.outputs.AbstractDisplayOutput.open(AbstractDisplayOutput.java:47)
at msi.gama.outputs.AbstractOutputManager.init(AbstractOutputManager.java:164)
at msi.gama.outputs.SimulationOutputManager.init(SimulationOutputManager.java:50)
at msi.gama.runtime.AbstractScope.init(AbstractScope.java:489)
at msi.gama.runtime.FrontEndScheduler.schedule(FrontEndScheduler.java:158)
at msi.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:144)
at msi.gama.metamodel.population.SimulationPopulation.createAgents(SimulationPopulation.java:59)
at msi.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:212)
at msi.gama.kernel.experiment.ExperimentAgent._init_(ExperimentAgent.java:202)
at msi.gama.metamodel.agent.GamlAgent.init(GamlAgent.java:134)
at msi.gama.runtime.AbstractScope.init(AbstractScope.java:489)
at msi.gama.runtime.FrontEndScheduler.schedule(FrontEndScheduler.java:158)
at msi.gama.kernel.experiment.ExperimentAgent.schedule(ExperimentAgent.java:258)
at msi.gama.kernel.experiment.ExperimentPlan.open(ExperimentPlan.java:294)
at msi.gama.runtime.FrontEndController.processUserCommand(FrontEndController.java:85)
at msi.gama.runtime.FrontEndController.run(FrontEndController.java:64)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.eclipse.swt.SWTError: Not implemented (java.lang.NoSuchMethodException: sun.lwawt.macosx.CEmbeddedFrame.<init>(long))
at org.eclipse.swt.SWT.error(SWT.java:4423)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:164)
at msi.gama.gui.swt.swing.SwingControl.createFrame(SwingControl.java:254)
at msi.gama.gui.swt.swing.SwingControl.populate(SwingControl.java:241)
at msi.gama.gui.swt.swing.SwingControl.handleSetBounds(SwingControl.java:879)
at msi.gama.gui.swt.swing.SwingControl.setBounds(SwingControl.java:1027)
at org.eclipse.swt.custom.SashFormLayout.layout(SashFormLayout.java:104)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1201)
at org.eclipse.swt.widgets.Composite.resized(Composite.java:940)
at org.eclipse.swt.widgets.Control.setFrameSize(Control.java:3838)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5548)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSView.setFrame(NSView.java:275)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3568)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3550)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:201)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1201)
at org.eclipse.swt.widgets.Composite.resized(Composite.java:940)
at org.eclipse.swt.widgets.Control.setFrameSize(Control.java:3838)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5548)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSView.setFrame(NSView.java:275)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3568)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3550)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:201)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1201)
at org.eclipse.swt.widgets.Composite.resized(Composite.java:940)
at org.eclipse.swt.widgets.Control.setFrameSize(Control.java:3838)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5548)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSView.setFrame(NSView.java:275)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3568)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3604)
at org.eclipse.ui.internal.LayoutPart.setBounds(LayoutPart.java:300)
at org.eclipse.ui.internal.presentations.PresentablePart.setBounds(PresentablePart.java:170)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.layoutContent(PresentablePartFolder.java:131)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.layout(PresentablePartFolder.java:412)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:292)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.replace(PartStack.java:905)
at org.eclipse.ui.internal.PerspectiveHelper.addPart(PerspectiveHelper.java:423)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2331)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1154)
at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3934)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3931)
at msi.gama.gui.swt.SwtGui$8.run(SwtGui.java:417)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4650)
at msi.gama.gui.swt.SwtGui.run(SwtGui.java:777)
at msi.gama.gui.swt.SwtGui.internalShowView(SwtGui.java:411)
at msi.gama.gui.swt.SwtGui.showView(SwtGui.java:494)
at msi.gama.common.util.GuiUtils.showView(GuiUtils.java:140)
at msi.gama.outputs.AbstractDisplayOutput$1.run(AbstractDisplayOutput.java:37)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3976)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3653)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at msi.gama.gui.swt.Application.start(Application.java:120)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.NoSuchMethodException: sun.lwawt.macosx.CEmbeddedFrame.<init>(long)
at java.lang.Class.getConstructor0(Class.java:2730)
at java.lang.Class.getConstructor(Class.java:1676)
at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:161)
... 81 more


Can anyone recommend a fix?

Sincerely,
Jason

Alexis Drogoul

unread,
Jan 21, 2015, 10:50:57 AM1/21/15
to gama-p...@googlegroups.com
Did you specify the JVM on which it needs to run (latest 1.6 version from Apple — not the one from Oracle) ?

We have a number of issues on MacOS X, where GAMA in its current form cannot run under Java 1.7 and 1.8. You can see here how to install the latest 1.6:

https://code.google.com/p/gama-platform/wiki/G__Installation#On_MacOS_X_(Lion,_Mountain_Lion,_Mavericks)
> --
> You received this message because you are subscribed to the Google Groups "GAMA" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
> To post to this group, send email to gama-p...@googlegroups.com.
> Visit this group at http://groups.google.com/group/gama-platform.
> For more options, visit https://groups.google.com/d/optout.

--
Senior Researcher, UMI UMMISCO 209, IRD & UPMC, France.
--
alexis....@gmail.com | http://goo.gl/4ewFdJ
[Vietnam] +84915088155 [France] +33608698845
--
GAMA: http://gama-platform.org

Jason Barto

unread,
Jan 21, 2015, 11:45:59 AM1/21/15
to gama-p...@googlegroups.com
Alexis,
Thank you for your reply. I did as you suggested to include reinstall of the jdk. The issue persists. The odd thing is that it runs correctly from within eclipse. I'm thinking a class path or jar packaging issue?

Sincerely,
Jason

Alexis Drogoul

unread,
Jan 21, 2015, 12:08:20 PM1/21/15
to gama-p...@googlegroups.com
Hmmm… Did you follow all the instructions (i.e. including SWT 4.4 in your target platform, for instance) ? And are you sure you’re running on Java 1.6 ? Because this bug was specific to SWT < 4.3 and JDK 1.7 < u40.

One thing you can try is also to replace the Info.plist file present in Gama.app>Contents by the version attached to this mail. You might also want to add the attached « Model.icns » file to the Gama.app>Contents>Resources folder (to be sure no error will be generated).
Model.icns
Info.plist

Jason Barto

unread,
Jan 21, 2015, 2:43:13 PM1/21/15
to gama-p...@googlegroups.com
Alexis,
Thanks for your feedback. I did see the instructions about the SWT delta pack and *think* I followed them to the letter but I shall confirm later this evening. I will respond back after I've been able to inspect and check your suggestions.

Sincerely,
Jason

Jason Barto

unread,
Jan 21, 2015, 6:19:32 PM1/21/15
to gama-p...@googlegroups.com
Alexis,
thank you for your help and advice.  I'm happy to report that the exported build is now running properly under OSX Yosemite.  I had included the SWT4.3.zip delta package per the instructions, I had also specified v1.6 of the JDK in the build.  HOWEVER what I hadn't realized is that upon execution the MacOS Gama executable would use the default JDK on the system (1.7 in this case).  Your mention of Info.plist saved the day.  Having a look at the contents of Info.plist I came across the following comments and explicitly called out the 1.6.0 JDK on my system.  After doing so the build rendered my shape file without any errors.

<key>Eclipse</key>
 
<array>
 
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
 <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
 <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
 -->

 
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java</string>
 
<string>-keyring</string><string>~/.eclipse_keyring</string>
 
<string>-showlocation</string>
 
<!-- WARNING:
 If you try to add a single VM argument (-vmargs) here,
 *all* vmargs specified in eclipse.ini will be ignored.
 We recommend to add all arguments in eclipse.ini
 -->

 
</array>


Thank you so much for your help!

Sincerely,
Jason
Reply all
Reply to author
Forward
0 new messages