Cannot open Designer Editor: Failed to load Module

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Cannot open Designer Editor: Failed to load Module

Postby jgaudio » Fri Nov 21, 2008 5:09 am

Hello everyone, hope you can give me a hand with this.

I'm unable to use the Designer Editor, because it fails to load a module.

This module is actually pretty basic, and its only reason to be is to include a package with TransferObjects, with the <source path="..." /> tag. Thing is, this TransferObjects are in a different project, not the one the module is defined in (meaning, the project where the .gwt.xml is located). Off course, this second project is included in the main project's build path. In fact, compiling and running the module works perfectly, just opening the Designer Editor fails.

It seems pretty clear this it's a classpath problem, but I can't find some property page or something that allows me to define where needed classes and .java are located so the Editor can find them. I'm sure the Designer must be looking into the project's build path, but somehow there's something that's not being found.

Any ideas what could I be missing?

I'm using the latest GWT Designer stable build, downloaded yesterday (11/20/2008), and a release of Eclipse Ganymede (3.4.0).

This is the .gwt-log file:
Code: Select all
Loading module 'com.abs.lasca.Lasca-Commons'
   [ERROR] Invalid module name: 'com.abs.lasca.Lasca-Commons'
[ERROR] Failure to load module 'com.abs.lasca.Lasca-Commons'
com.google.gwt.core.ext.UnableToCompleteException: (see "project_dir/.gwt-logs/.gwt-log" for details.)
   at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:296)
   at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:131)
   at com.instantiations.designer.gwt.hosted.odf.HostedModeSupport.loadModule(HostedModeSupport.java:210)
   at com.instantiations.designer.gwt.hosted.odf.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:223)
   at com.instantiations.designer.gwt.hosted.ie.BrowserShellIE6$External.gwtOnLoad(BrowserShellIE6.java:277)
   at com.instantiations.designer.gwt.hosted.ie.BrowserShellIE6$External.invoke(BrowserShellIE6.java:329)
   at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:295)
   at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:195)
   at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
   at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
   at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2370)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)
   at com.instantiations.designer.gwt.hosted.odf.HostedModeSupport.runMessagesLoop(HostedModeSupport.java:188)
   at com.instantiations.designer.gwt.hosted.odf.HostedModeSupport$1.run(HostedModeSupport.java:122)
   at com.instantiations.designer.gwt.hosted.ie.BrowserShellIE6.setUrl(BrowserShellIE6.java:111)
   at com.instantiations.designer.gwt.hosted.odf.HostedModeSupport.startup(HostedModeSupport.java:120)
   at com.swtdesigner.gwt.model.widgets.support.GWTState$1.run(GWTState.java:164)
   at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:446)
   at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354)
   at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
   at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
   at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1191)
   at com.swtdesigner.gwt.model.widgets.support.GWTState.<init>(GWTState.java:185)
   at com.swtdesigner.gwt.model.widgets.support.GWTState.createState(GWTState.java:1875)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.getState(UIObjectInfo.java:429)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.classByName(UIObjectInfo.java:191)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.<init>(UIObjectInfo.java:68)
   at com.swtdesigner.gwt.model.widgets.WidgetInfo.<init>(WidgetInfo.java:56)
   at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.<init>(AbstractContainerInfo.java:37)
   at com.swtdesigner.gwt.model.widgets.panel.ThisCompositeInfo.<init>(ThisCompositeInfo.java:48)
   at com.swtdesigner.gwt.model.GWTJavaInfoFactory.create(GWTJavaInfoFactory.java:224)
   at com.swtdesigner.model.parser.JavaInfoParser$ParserVisitor.visit(JavaInfoParser.java:2753)
   at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:467)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
   at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
   at com.swtdesigner.model.parser.JavaInfoParser.parse(JavaInfoParser.java:323)
   at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1191)
   at com.swtdesigner.gef.DesignerEditor$18.execute(DesignerEditor.java:1116)
   at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1110)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1101)
   at com.swtdesigner.editors.MultiPageEditor.showDesignEditor(MultiPageEditor.java:392)
   at com.swtdesigner.editors.MultiPageEditor$2.widgetSelected(MultiPageEditor.java:178)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
   at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
   at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3242)
   at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2017)
   at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
   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:382)
   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:585)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1212)


Thanks in advance,
Juan Ignacio.
jgaudio
 
Posts: 5
Joined: Fri Nov 21, 2008 4:22 am

Re: Cannot open Designer Editor: Failed to load Module

Postby Eric Clayberg » Sat Nov 22, 2008 9:19 am

My guess is that there is a problem with your module gwt.xml file. Adding a reference to the second project in your classpath only helps with Java compilation issues. It does not help with GWT runtime issues.

See the following sample project and screen shot.

GWT_test2.zip
Sample GWT projects
(23.81 KiB) Downloaded 85 times

GWT_test2.png
GWT_test2.png (106.98 KiB) Viewed 1134 times
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Cannot open Designer Editor: Failed to load Module

Postby jgaudio » Sat Nov 22, 2008 3:47 pm

Eric, first of all thank you for your answer.

I imported the two projects you posted in my workspace and compared them against my own, and apparently I'm defining the module the right way.

Could the problem be that this module (the one that includes the TransferObjects), is in time being inherited by other module?

I'll describe briefly the project structure so it'll be more clear.

ProjectStructure.JPG
ProjectStructure.JPG (26.24 KiB) Viewed 1102 times


I have these two modules: 'com.abs.lasca.Lasca-Commons' and 'com.abs.lasca.Lasca', located in the same package. Only that the source folder for the first one is defined to be 'clayer', and the source folder for the second one is the default, 'client'.

Lasca-Commons defines its source path to be 'clayer' to match the package in the project 'LascaCommons' containing the TransferObjects. It also inherits a module called 'com.abs.ABS-GWT-Commons' that includes base classes for our TransferObjects. This module is located in a library of our own, included in the project classpath, just like the gwt-user.jar file.

Lasca-Commons.gwt.xml
Code: Select all
<module>
   <inherits name="com.abs.ABS-GWT-Commons" />
   <source path="clayer"/>
</module>


The other module, Lasca, inherits Lasca-Commons, in order to be able to edit the TransferObjects in the UI.
Lasca.gwt.xml
Code: Select all
<module>
   <inherits name="com.abs.gwt.base.ABS-GWT-Base" />
   <inherits name="com.abs.lasca.admin.Admin" />
   <inherits name="com.abs.lasca.Lasca-Commons" />
   <inherits name="com.abs.security.ABS-Security" />
   <inherits name="com.abs.gwt.editors.ABS-Editors" />
   <inherits name="com.abs.gwt.dialogs.ABS-Dialogs" />
   <source path="client"/>   
   <source path="service"/>
   <entry-point class="com.abs.lasca.client.LascaEntryPoint" />
   <replace-with class="com.abs.lasca.service.LascaDelegate">
       <when-type-is class="com.abs.gwt.base.client.RPCDelegate" />
    </replace-with>
    <replace-with class="com.abs.lasca.client.LascaResourcesProvider">
       <when-type-is class="com.abs.gwt.base.client.ResourcesProvider" />
    </replace-with>
    <set-property name="user.agent" value="ie6"/>
    <set-property name="locale" value="default"/>
    <stylesheet src="css/lasca.css"/>
    <extend-property name="locale" values="es_AR,en_US,pt_BR"/>
</module>


I realized that if I don't deselect the 'Check for client classpath' option in the GWT section of the Designer property page, the GWT Builder complains about not finding necessary classes, because it assumes the 'client' package to be the source path for the 'Lasca-Commons' module, which is not. Anyway, even with this option deselected, the project compiles without errors, but the Designer tab of the Editor still complains about not being able to load the Lasca-Commons module.

Could this be related to the error cause?

Thanks again,
Juan Ignacio.
jgaudio
 
Posts: 5
Joined: Fri Nov 21, 2008 4:22 am

Re: Cannot open Designer Editor: Failed to load Module

Postby Eric Clayberg » Sat Nov 22, 2008 4:13 pm

Does your code run in hosted mode?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Cannot open Designer Editor: Failed to load Module

Postby jgaudio » Sat Nov 22, 2008 5:06 pm

Yes, perfectly. I'm using the GWT Designer launch configuration feature to run Hosted Mode.
jgaudio
 
Posts: 5
Joined: Fri Nov 21, 2008 4:22 am

Re: Cannot open Designer Editor: Failed to load Module

Postby jgaudio » Sun Nov 23, 2008 4:41 am

I decided to go with a workaround and it's working now, but I can't really say the problem was solved.

I merged both modules, adding the 'clayer' source path to the primary module 'Lasca', and removed the 'LascaCommons' module, that for some reason was never loaded properly. This works in this case, but it wouldn't if I needed to inherit the removed module somewhere else.

Could it be that the editor, when loading the module with the TransferObjects, was still looking in the default source path 'client', despite the option 'Check for client classpath' being deselected (which apparently did the trick for module compilation), or something like that? I can't think of another reason to why such a simple module could not be loaded. :shock:

Anyway, thanks Eric for your help!
jgaudio
 
Posts: 5
Joined: Fri Nov 21, 2008 4:22 am

Re: Cannot open Designer Editor: Failed to load Module

Postby Eric Clayberg » Tue Nov 25, 2008 8:12 pm

I don't know. If you want to send us a complete test case, we can look at it in more detail and maybe come up with something.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests