NPE in GWTDesigner Design View

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

NPE in GWTDesigner Design View

Postby masini » Wed Jan 02, 2008 10:49 pm

I'm using Maven style source folder structure in my project, so src/main/java for Java sources and src/main/resources for gwt.xml and public resources.
This works great with Eclipse, with Maven of course, and with GWT Designer compile time check.
But when I switch from "source" to "design" view I got a NullPointerException:

Code: Select all
org.apache.commons.lang.exception.NestableError: com.swtdesigner.properties.PropertyException: java.lang.reflect.InvocationTargetException
   at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:119)
   at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:96)
   at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:89)
   at com.swtdesigner.model.parser.JavaInfoParser$ParserVisitor.endVisit(JavaInfoParser.java:1445)
   at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:336)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
   at org.eclipse.jdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:224)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
   at org.eclipse.jdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:272)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
   at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
   at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at com.swtdesigner.model.parser.JavaInfoParser$ParserVisitor.visit(JavaInfoParser.java:3003)
   at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:466)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
   at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:213)
   at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
   at com.swtdesigner.model.parser.JavaInfoParser.parse(JavaInfoParser.java:320)
   at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1140)
   at com.swtdesigner.gef.DesignerEditor$17.execute(DesignerEditor.java:1072)
   at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1066)
   at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1059)
   at com.swtdesigner.editors.MultiPageEditor.showDesignEditor(MultiPageEditor.java:426)
   at com.swtdesigner.editors.MultiPageEditor$2.widgetSelected(MultiPageEditor.java:196)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
   at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706)
   at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3227)
   at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2005)
   at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:316)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
   at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: com.swtdesigner.properties.PropertyException: java.lang.reflect.InvocationTargetException
   at com.swtdesigner.gwt.model.GWTJavaInfoFactory.create(GWTJavaInfoFactory.java:160)
   at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:113)
   ... 64 more
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at com.swtdesigner.gwt.model.GWTJavaInfoFactory.create(GWTJavaInfoFactory.java:152)
   ... 65 more
Caused by: org.apache.commons.lang.exception.NestableError: java.lang.IllegalArgumentException: No module found for compilation unit FakeEntryPoint.java.
GWT widgets can be used only in client package of GWT module.
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.getState(UIObjectInfo.java:396)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.classByName(UIObjectInfo.java:181)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.<init>(UIObjectInfo.java:63)
   at com.swtdesigner.gwt.model.widgets.WidgetInfo.<init>(WidgetInfo.java:50)
   at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.<init>(AbstractContainerInfo.java:35)
   at com.swtdesigner.gwt.model.widgets.panel.PanelInfo.<init>(PanelInfo.java:25)
   at com.swtdesigner.gwt.model.widgets.panel.ComplexPanelInfo.<init>(ComplexPanelInfo.java:23)
   at com.swtdesigner.gwt.model.widgets.panel.CellPanelInfo.<init>(CellPanelInfo.java:20)
   at com.swtdesigner.gwt.model.widgets.panel.VerticalPanelInfo.<init>(VerticalPanelInfo.java:28)
   ... 70 more
Caused by: java.lang.IllegalArgumentException: No module found for compilation unit FakeEntryPoint.java.
GWT widgets can be used only in client package of GWT module.
   at com.swtdesigner.gwt.model.widgets.support.GWTState.<init>(GWTState.java:87)
   at com.swtdesigner.gwt.support.browser.ie.GWTStateIE6.<init>(GWTStateIE6.java:28)
   at com.swtdesigner.gwt.support.browser.ie.BrowserSupportFactory.createState(BrowserSupportFactory.java:12)
   at com.swtdesigner.gwt.model.widgets.support.GWTState.createState(GWTState.java:1470)
   at com.swtdesigner.gwt.model.widgets.UIObjectInfo.getState(UIObjectInfo.java:394)
   ... 78 more


I have the same bug in GWTDesigner 3.0.0 and 3.0.1.

The workaround is easy, just copy the file from src/main/resources to src/main/java but it's really annoying not to use the standard structure for my project.

Do you know any other workaround that can let me work with Maven style structure ?
masini
 
Posts: 5
Joined: Wed Jan 02, 2008 7:01 am

Re: NPE in GWTDesigner Design View

Postby Eric Clayberg » Thu Jan 03, 2008 10:12 am

Give this a try in the latest v3.0.1 build.

This has been tested and seems to work with the test case that you sent via e-mail.
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

Postby masini » Thu Jan 03, 2008 11:26 pm

I'm using version 3.0.1 [20080103021532], does the same apply for you ?
masini
 
Posts: 5
Joined: Wed Jan 02, 2008 7:01 am

Postby Eric Clayberg » Fri Jan 04, 2008 3:56 am

masini wrote:I'm using version 3.0.1 [20080103021532], does the same apply for you ?

No. As I suggested above, give this a try in the latest build.

The test case you sent in works fine with that build.
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

Postby masini » Fri Jan 04, 2008 2:04 pm

WIth build 20080104090241 all works great !!
Thx.
masini
 
Posts: 5
Joined: Wed Jan 02, 2008 7:01 am

Postby Eric Clayberg » Fri Jan 04, 2008 6:17 pm

masini wrote:WIth build 20080104090241 all works great !!
Thx.

Thanks for the update.
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: NPE in GWTDesigner Design View

Postby masini » Tue Feb 12, 2008 12:48 am

With build 20080104090241 the bug was solved, today I installed the software to my colleague, build 200802112203 and the bug is out again !!!

Mad is that I don't have the old build, but I really think that also the new build should work.
Please help us.
Thanks.
masini
 
Posts: 5
Joined: Wed Jan 02, 2008 7:01 am

Re: NPE in GWTDesigner Design View

Postby Eric Clayberg » Tue Feb 12, 2008 10:51 am

Try this again with the latest build.

It was temporary regression caused by another fix.
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 3 guests