gwtext.jar fails to load from maven classpath variable

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

gwtext.jar fails to load from maven classpath variable

Postby alexzakharov » Tue Jun 30, 2009 8:55 am

I noticed an odd problem with GWT-EXT integration.

Lets say I have a module configured for GWT-EXT and lets say gwtext.jar is added to the build path of my eclipse project from a local directory (e.g. c:\alex\gwtext.jar). Then when switching to designer view for my module everything works as expected.

Now, if instead gwtext.jar is added to the build path via a variable (e.g MAVEN-REPO/gwt/gwtext.jar) then when switching to designer mode I blow up because designer can't find the jar.

In other words if .classpath file for my eclipse project looks like below then designer mode is fine.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
...
<classpathentry kind="lib" path="C:/software/repository/gwt/jars/gwtext-2.0.6.jar"/>
...
</classpath>

BUT if .classpath file for my eclipse project looks like this (see below), then designer blows up:


<?xml version="1.0" encoding="UTF-8"?>
<classpath>
...
<classpathentry kind="var" path="MAVEN_REPO/gwt/jars/gwtext-2.0.6.jar"/>
...
</classpath>

MAVEN_REPO is defined in classpath variables as \software\repository
(C:\software\repository is a local drive)

Also, notice the projects runs fine, it is just the designer mode.
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: gwtext.jar fails to load from maven classpath variable

Postby alexzakharov » Tue Jun 30, 2009 9:19 am

i temporarily fixed the problem by setting my MAVEN-REPO to be C:/software/repository instead of /software/repository.

But it would be nice if designer interpreted '/software/repository' as a local windows directory as opposed to a network drive... the rest of eclipse does.
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: gwtext.jar fails to load from maven classpath variable

Postby Eric Clayberg » Tue Jun 30, 2009 12:07 pm

GWT Designer doesn't care which way you have it specified in your .classpath file. It seemed to work either way on our end.

Are you cable to launch in hosted mode both ways? Are there any compilation errors showing?

What do you mean by "blow up because designer can't find the jar"? What is the exact exception?
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: gwtext.jar fails to load from maven classpath variable

Postby alexzakharov » Tue Jun 30, 2009 1:07 pm

everything compiles and runs fine, only the designer mode doesn't render for the module.

my theory is that designer doesn't correctly interpret platform-independent variables. for example if in Window->Preferences->Java->Build Path->Classpath Variables I specify MAVEN_REPO as C:\software\repository and then my GWT project's build-path references a jar like this MAVEN_REPO/gwtext.jar then compilation, hosted mode, designer all work fine.

However if now I go ahead and redefine MAVEN_REPO as /software/repository then compilation, hosted mode work but designer throws an error when I switch to 'Design' view of my GWT-EXT-enabled module.

The actual error is below. I suspect that when designer sees /software/repository it thinks it is not a local directory but a shared drive.


Loading inherited module 'com.google.gwt.user.theme.standard.Standard'
Loading inherited module 'com.gwtext.GwtExt'
[ERROR] Unable to open resource: jar:file:/\software\repository\gwt\jars\gwtext-2.0.6.jar!/com/gwtext/GwtExt.gwt.xml
java.io.FileNotFoundException: \\software\repository\gwt\jars\gwtext-2.0.6.jar (The network path was not found)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.google.gwt.dev.util.Util.createReader(Util.java:218)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:262)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:212)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:223)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:257)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:314)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:265)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:163)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:291)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:132)
at com.instantiations.designer.gwt.hosted.ods.HostedModeSupport.loadModule(HostedModeSupport.java:220)
at com.instantiations.designer.gwt.hosted.ods.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:233)
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:2371)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)
at com.instantiations.designer.gwt.hosted.ods.HostedModeSupport.runMessagesLoop(HostedModeSupport.java:198)
at com.instantiations.designer.gwt.hosted.ods.HostedModeSupport$1.run(HostedModeSupport.java:129)
at com.instantiations.designer.gwt.hosted.ie.BrowserShellIE6.setUrl(BrowserShellIE6.java:111)
at com.instantiations.designer.gwt.hosted.ods.HostedModeSupport.startup(HostedModeSupport.java:127)
at com.instantiations.designer.gwt.model.widgets.support.GWTState.initialize(GWTState.java:159)
at com.instantiations.designer.gwt.model.widgets.support.GWTState.<init>(GWTState.java:143)
at com.instantiations.designer.gwt.parser.ParseFactory.createClassLoader(ParseFactory.java:312)
at com.instantiations.designer.gwt.parser.ParseFactory.initializeClassLoader(ParseFactory.java:288)
at com.instantiations.designer.gwt.parser.ParseFactory.getRootContext(ParseFactory.java:90)
at com.instantiations.designer.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java:836)
at com.instantiations.designer.core.parser.JavaInfoParser.parse(JavaInfoParser.java:210)
at com.instantiations.designer.core.parser.JavaInfoParser.access$000(JavaInfoParser.java:110)
at com.instantiations.designer.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:132)
at com.instantiations.designer.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:131)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:99)
at com.instantiations.designer.core.parser.JavaInfoParser.parse(JavaInfoParser.java:130)
at com.instantiations.designer.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:408)
at com.instantiations.designer.core.editor.DesignPage.access$800(DesignPage.java:57)
at com.instantiations.designer.core.editor.DesignPage$7$1.run(DesignPage.java:316)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:178)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4251)
at com.instantiations.designer.core.editor.DesignPage$7.run(DesignPage.java:313)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at com.instantiations.designer.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:334)
at com.instantiations.designer.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:444)
at com.instantiations.designer.core.editor.UndoManager.activate(UndoManager.java:77)
at com.instantiations.designer.core.editor.DesignPage.handleActiveState_True(DesignPage.java:216)
at com.instantiations.designer.core.editor.DesignPage.handleActiveState(DesignPage.java:203)
at com.instantiations.designer.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:80)
at com.instantiations.designer.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:43)
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:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
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:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
[ERROR] Line 11: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see "project_dir/.gwt-logs/.gwt-log" for details.)
at com.google.gwt.dev.util.Util.createReader(Util.java:221)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:262)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:212)
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: gwtext.jar fails to load from maven classpath variable

Postby alexzakharov » Tue Jun 30, 2009 1:26 pm

OK, I was able to replicate with a brand-new simple project:

- create new gwt project (with default ImageViewer). lets say the project is in c:\workspace\test
- right-click configure for GWT-EXT
- exit eclipse, rename gwtext.jar into gwtext-2.0.6.jar
- start eclipse ('desig' view will fail of course as well as compilation)
- go to project's build path and point it to gwtext-2.0.6 instead of gwtext. everything works.
- now go to Java->Preferences (Under main Eclipse preferences) and define a classpath variable BOO
- set BOO = c:\workspace\test
- goto build path of the the image viewer project and specify a reference to gwtext-2.0.6 like this: BOO/gwtext-2.0.6 (via 'Add Variable'). everything will still work fine
- go back to global java preferences and set BOO=\workspace\test
- NOW, close ImageViewer file, open ImageViewer file and goto 'Design' view.

You get his error in design view:

WindowBuilder internal error

WindowBuilder encountered unexpected internal error. Please contact support.

com.google.gwt.core.ext.UnableToCompleteException: (see "project_dir/.gwt-logs/.gwt-log" for details.)

And the log contains this:

Loading inherited module 'com.google.gwt.user.theme.standard.Standard'
Loading inherited module 'com.gwtext.GwtExt'
[ERROR] Unable to open resource: jar:file:/\workspace\GWTEXTFail\gwtext-2.0.6.jar!/com/gwtext/GwtExt.gwt.xml
java.io.FileNotFoundException: \\workspace\GWTEXTFail\gwtext-2.0.6.jar (The network path was not found)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.google.gwt.dev.util.Util.createReader(Util.java:218)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:262)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:212)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:223)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:257)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:314)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:265)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:163)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:291)
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: gwtext.jar fails to load from maven classpath variable

Postby Eric Clayberg » Wed Jul 01, 2009 6:58 am

Give this a try using the latest GWT Designer v7.1 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

Re: gwtext.jar fails to load from maven classpath variable

Postby alexzakharov » Wed Jul 01, 2009 10:32 am

Excellent - it works. Thanks!
alexzakharov
 
Posts: 19
Joined: Wed Jun 03, 2009 12:14 pm

Re: gwtext.jar fails to load from maven classpath variable

Postby Eric Clayberg » Wed Jul 01, 2009 10:58 am

Good news.
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 1 guest