PDA

View Full Version : GXT on build server



DarekKay
13 Dec 2011, 7:56 AM
I tried to deploy a simple GXT 3 Beta 1 application on a linux build server. While there are no problems in the developement mode, there is an exception on the server. The "com.sencha.gxt.core.client.dom.Layer.LayerResources.middleCenter" image is unrecognized. Is this a bug? Or is that image missing? (I couldn't find it in the gxt.3.0.0-beta1.jar).
Or is it a GWT problem with png images, like in this (http://groups.google.com/group/google-web-toolkit/browse_thread/thread/828048e8ac7d6afb) unanswered thread?

Here's the log:

Build Stacktrace:
[java] Scanning for additional dependencies: jar:file:/usr/home/u6t/build/workspace/Project/bin/war/WEB-INF/lib/gxt-3.0.0-beta1.jar!/com/sencha/gxt/core/client/dom/Layer.java
[java] Computing all possible rebind results for 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
[java] Rebinding com.sencha.gxt.core.client.dom.Layer.LayerResources
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method middleCenter
[java] Adding image 'com.sencha.gxt.core.client.dom.Layer.LayerResources.middleCenter'
[java] [ERROR] Unrecognized image file format
[java] [ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
[java] java.lang.NullPointerException
[java] at com.google.gwt.resources.rg.ImageResourceGenerator$BundledImage.addImage(ImageResourceGenerator.java:99)
[java] at com.google.gwt.resources.rg.ImageResourceGenerator.prepare(ImageResourceGenerator.java:541)
[java] at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1043)
[java] at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1069)
[java] at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:412)
[java] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
[java] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[java] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[java] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
[java] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
[java] at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[java] at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
[java] at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
[java] at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
[java] at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
[java] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
[java] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[java] [ERROR] Errors in 'jar:file:/usr/home/u6t/build/workspace/Project/bin/war/WEB-INF/lib/gxt-3.0.0-beta1.jar!/com/sencha/gxt/core/client/dom/Layer.java'
[java] [ERROR] Line 47: Failed to resolve 'com.sencha.gxt.core.client.dom.Layer.LayerResources' via deferred binding
[java] Dec 13, 2011 4:18:52 PM java.util.prefs.FileSystemPreferences syncWorld

Colin Alworth
15 Dec 2011, 9:47 AM
That is a new one for me, and I suspect you are right, it most likely has to do with either GWT itself or the os/jvm you are running the build on. Our nightly builds run on a linux server using maven and a sun 1.6 jdk, and don't encounter this issue.

Might be worth waking up the thread, or debugging a bit and filing a bug with GWT.

Gunther
12 Jan 2012, 2:53 AM
Are there any news on this?
I am very interested in solving the bug but do not know how to assist ;)

Gunther
17 Jan 2012, 5:49 AM
First of all I'd like to state that I am in the same team as DarekKay.

I condensed the error down to specificities in older Java versions. The version we used was:

java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

Installing

java version "1.6.0_03-p4"
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_16_jan_2012_08_26-b00)
Java HotSpot(TM) Client VM (build 1.6.0_03-p4-root_16_jan_2012_08_26-b00, mixed mode)
also led to the same error.

Java versions

openjdk version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b24)
OpenJDK Client VM (build 20.0-b12, mixed mode)
and

openjdk version "1.7.0"
OpenJDK Runtime Environment (build 1.7.0-root_2012_01_16_12_50-b00)
OpenJDK Client VM (build 21.0-b17, mixed mode)
, respectively, do no longer lead to the encountered error.

The error has to do with the iTXt field in PNG images.
com/sencha/gxt/core/client/dom/middleCenter.png defines some com.adobe.xmp in iTXt. Sadly, the field cannot be read thoroughly by the said versions of java, as they read beyond the end of the file and result in an IIOException that ultimatively causes a NullPointerException.

Some developers state that after re-saving middleCenter.png the error no longer occurs, which is perfectly reasonable if the respective program does not save iTXt information. (BTW: I don't fully understand how this error exactly occurs, since I would expect that the block-based layout of PNG metadata would be a easy-to-do parsing job. Well, nevermind.)

I wrote a small test program that I used to test which Java version is capable of gracefully reading PNG data that can be obtained from http://pastebin.com/V9eWyspN and basically is a small crafted copy of http://code.google.com/p/google-web-toolkit/source/browse/releases/2.0/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java?r=7428
Simply place middleCenter.png in /tmp (it is hard-coded, sry about that, but its a mock), compile it while adding gwt-user.jar and gwt-dev.jar and run it. It will produce an output as follows for too old versions of Java:

[/tmp]$ /usr/local/diablo-jdk1.6.0/bin/java -cp .:/opt/gwt/gwt-user.jar:/opt/gwt/gwt-dev.jar Main
Reengineered GWT source adding file '/tmp/middleCenter.png'...
reader format name: png
numImages: 1
Caught an exception. Continuing readers
javax.imageio.IIOException: Error reading PNG metadata
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:736)
at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1194)
at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1467)
at javax.imageio.ImageReader.read(ImageReader.java:923)
at Main.main(Main.java:66)
Caused by: java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:339)
at java.io.DataInputStream.readUTF(DataInputStream.java:592)
at javax.imageio.stream.ImageInputStreamImpl.readUTF(ImageInputStreamImpl.java:318)
at com.sun.imageio.plugins.png.PNGImageReader.parse_iTXt_chunk(PNGImageReader.java:444)
at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(PNGImageReader.java:684)
... 4 more
-> This is the error I am looking for!!! UNRECOGNIZED IMAGE FORMAT
Exception in thread "main" java.lang.NullPointerException
at Main$ImageRect.<init>(Main.java:213)
at Main.main(Main.java:132)

and for a "proper" Java version:

[/tmp]$ /usr/local/openjdk6/bin/java -cp .:/opt/gwt/gwt-user.jar:/opt/gwt/gwt-dev.jar Main
Reengineered GWT source adding file '/tmp/middleCenter.png'...
reader format name: png
numImages: 1
metadata != null ? -> true
metadata standart metadata -> true
IIOMetadataFormatImpl.standardMetadataFormatName: javax_imageio_1.0
looking at node 0
looking at node 1
in 'compression'
looking at compression node 0
looking at compression node 1
looking at compression node 2
looking at node 2
looking at node 3
looking at node 4
looking at node 5
Original program now does something with the size...

Hope that helped.

Cheers,
Gunther

Colin Alworth
23 Jan 2012, 8:52 AM
Nice write up - is there an associated GWT bug, or some official response for how broken JREs can be made to work?

Gunther
23 Jan 2012, 2:08 PM
To the best of my knowledge, there is no such associated bug.
The only possibility of making Java compile the sources correctly was to update the version of Java we use in production.

Almwakatobe
28 Mar 2012, 11:48 AM
That is a new one for me, and I suspect you are right, it most likely has to do with either GWT itself or the os/jvm you are running the build on. Our nightly builds run on a linux server using maven and a sun 1.6 jdk, and don't encounter this issue.

Might be worth waking up the thread, or debugging a bit and filing a bug with GWT.

My build environment is as follows:
Linux Redhat Enterprise 5.6 64 bit 2.6.18-238.19.1.el5
JDK 1.6.0_22 64 bit
ant 1.8.0
GWT 2.4.0
Ext GWT beta4 - gxt-3.0.0-beta4.jar uibinder-bridge-2.4.0.jar


I get the following error :

Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[java] Scanning for additional dependencies: file:/home/am74521/ProfileGUI/gui/src/main/java/com/gpf/cues/client/main/GuiDesktopShell.java
[java] Computing all possible rebind results for 'com.gpf.client.main.GUiDesktopShell.Binder'
[java] Rebinding com.gpf.client.main.CuesguiDesktopShell.Binder
[java] Invoking generator com.sencha.gwt.uibinder.rebind.UiBinderGenerator
[java] The following problems were detected
[java] [WARN] Line 13 column 40: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 18 column 27: encountered " ". Was expecting one of: <IDENT> <FUNCTION>
[java] [WARN] Line 19 column 23: encountered " ". Was expecting one of: <IDENT> <FUNCTION>
[java] [WARN] Line 64 column 36: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] Scanning for additional dependencies: jar:file:/home/am74521/GUI/gui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/core/client/resources/CommonStyles.java
[java] Computing all possible rebind results for 'com.sencha.gxt.core.client.resources.CommonStyles.Bundle'
[java] Rebinding com.sencha.gxt.core.client.resources.CommonStyles.Bundle
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method styles
[java] The following problems were detected
[java] [WARN] Line 34 column 33: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 40 column 22: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 48 column 33: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 50 column 10: encountered " ". Was expecting one of: <IDENT> <FUNCTION>
[java] Scanning for additional dependencies: jar:file:/home/am74521/ProfileGUI/cuesgui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/widget/core/client/ListView.java
[java] Computing all possible rebind results for 'com.sencha.gxt.widget.core.client.ListView.ListViewDefaultResources'
[java] Rebinding com.sencha.gxt.widget.core.client.ListView.ListViewDefaultResources
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method css
[java] The following problems were detected
[java] [WARN] Line 10 column 29: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 12 column 10: encountered " ". Was expecting one of: <IDENT> <FUNCTION>
[java] Scanning for additional dependencies: jar:file:/home/am74521/ProfileGUI/cuesgui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/theme/blue/client/window/BlueWindowAppearance.java
[java] Computing all possible rebind results for 'com.sencha.gxt.theme.blue.client.window.BlueWindowAppearance.BlueWindowResources'
[java] Rebinding com.sencha.gxt.theme.blue.client.window.BlueWindowAppearance.BlueWindowResources
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method style
[java] The following problems were detected
[java] [WARN] Line 9 column 10: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 11 column 10: encountered " ". Was expecting one of: <IDENT> <FUNCTION>
[java] Scanning for additional dependencies: jar:file:/home/am74521/ProfileGUI/cuesgui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/theme/blue/client/menu/BlueMenuAppearance.java
[java] Computing all possible rebind results for 'com.sencha.gxt.theme.blue.client.menu.BlueMenuAppearance.BlueMenuResources'
[java] Rebinding com.sencha.gxt.theme.blue.client.menu.BlueMenuAppearance.BlueMenuResources
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method style
[java] The following problems were detected
[java] [WARN] Line 2 column 10: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] Scanning for additional dependencies: jar:file:/home/am74521/ProfileGUI/cuesgui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/theme/blue/client/menu/BlueMenuItemAppearance.java
[java] Computing all possible rebind results for 'com.sencha.gxt.theme.blue.client.menu.BlueMenuItemAppearance.BlueMenuItemResources'
[java] Rebinding com.sencha.gxt.theme.blue.client.menu.BlueMenuItemAppearance.BlueMenuItemResources
[java] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[java] Preparing method style
[java] The following problems were detected
[java] [WARN] Line 2 column 14: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 2 column 14: encountered "-". Was expecting one of: "}" ";" <IDENT>
[java] [WARN] Line 3 column 20: encountered "moz-use-text-color". Was expecting one of: <NUMBER> <PERCENTAGE> <PT> <MM> <CM> <PC> <IN> <PX> <EMS> <EXS> <DEG> <RAD> <GRAD> <MS> <SECOND> <HZ> <KHZ> <DIMEN> <FUNCTION>
[java] [WARN] Line 4 column 23: encountered "_". Was expecting one of: "}" "+" "-" "," ";" "/" <STRING> <IDENT> <NUMBER> <URL> <PERCENTAGE> <PT> <MM> <CM> <PC> <IN> <PX> <EMS> <EXS> <DEG> <RAD> <GRAD> <MS> <SECOND> <HZ> <KHZ> <DIMEN> <HASH> <IMPORTANT_SYM> <UNICODERANGE> <FUNCTION>
[java] Scanning for additional dependencies: jar:file:/home/am74521/ProfileGUI/cuesgui/lib/gxt-3.0.0-beta4.jar!/com/sencha/gxt/theme/base/client/field/FieldLabelDefaultAppearance.java
:

Colin Alworth
28 Mar 2012, 11:57 AM
com.gpf.client.main.CuesguiDesktopShell appears to be the source of this error, I don't think you have the same problem as is being mentioned elsewhere in this thread which is more about a PNG issue in some JRE versions.

To help debug this, post the contents of the CuesguiDesktopShell.ui.xml, especially its <ui: style> element, which seems to be what this is complaining about. As that is the first error, I suspect that might be the root cause of the other errors that show up later - none of the projects I am building with seem to be emitting those errors for BlueMenuItemAppearance, CommonStyles, BlueWindowResources, etc.

Almwakatobe
28 Mar 2012, 12:41 PM
com.gpf.client.main.CuesguiDesktopShell appears to be the source of this error, I don't think you have the same problem as is being mentioned elsewhere in this thread which is more about a PNG issue in some JRE versions.

To help debug this, post the contents of the CuesguiDesktopShell.ui.xml, especially its <ui: style> element, which seems to be what this is complaining about. As that is the first error, I suspect that might be the root cause of the other errors that show up later - none of the projects I am building with seem to be emitting those errors for BlueMenuItemAppearance, CommonStyles, BlueWindowResources, etc.
Here is CuesguiDesktopShell.ui.xml , it was working fine until I upgraded to beta 4


<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:image field='gwtLogo' src="../style/images/gwtLogo.png" />
<ui:image field='rooLogo' src="../style/images/rooLogo.png" />
<ui:style>
@def contentWidth 98%;
.disabled {
color: gray;
}
.body {
overflow: auto;
}
.banner {
background-color: #777;
-moz-border-radius-topleft: 10px;
-webkit-border-top-left-radius: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-right-radius: 10px;
margin-top: 1.5em;
height: 4em;
}
.title {
color: white;
padding: 1em;
position: absolute;
color: #def;
}
.title h2 {
margin: 0;
}
.error {
position: absolute;
left: 12%;
right: 12%;
text-align: center;
background-color: red;
}
.login {
position: absolute;
left: 75%;
right: 0%;
text-align: center;
color: #def;
}
.users {
position: absolute;
right: 0;
}
.centered {
overflow:auto;
margin-right: auto;
margin-left: auto;
}
.content {
position: relative;
border: 1px solid #ddf;
overflow-y: auto;
overflow-x: hidden;
-moz-border-radius-bottomleft: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-right-radius: 10px;
}
.entities {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 11em;
}
.entitiesList {
border-right: 1px solid #ddf;
height: 100%;
outline: none;
}
.entitiesList > div > div {
padding-left: 1em;
padding-top: 5px;
padding-bottom: 5px;
}
.entityDetails {
margin-left: 11em;
}
@sprite .gwtLogo {
gwt-image: 'gwtLogo';
float: right;
}
@sprite .rooLogo {
gwt-image: 'rooLogo';
float: right;
}
.logos {
color: #aaa;
font-size: 0.8em;
width: 160px;
margin-left: auto;
margin-right: auto;
text-align: right;
}
</ui:style>
<g:DockLayoutPanel unit='EM'>
<g:north size='1'>
<g:HTMLPanel styleName='{style.centered}'>
<!-- div class='{style.banner}'>
<div class='{style.error}' ui:field='error'></div>
<span class='{style.title}'>
<h2>Cues GUI</h2>
</span>
</div> -->
</g:HTMLPanel>
</g:north>
<g:south size='2'>
<g:HTML>
<div class='{style.logos}'>
<span>Profile Gui:</span>
</div>
</g:HTML>
</g:south>
<g:center>
<g:FlowPanel>
<g:NotificationMole animationDuration='0' message='loading...' ui:field='mole'></g:NotificationMole>
<g:SimplePanel styleName="{style.centered}" ui:field='contentView'></g:SimplePanel>
</g:FlowPanel>
</g:center>
</g:DockLayoutPanel>
</ui:UiBinder>

Colin Alworth
28 Mar 2012, 1:56 PM
Thanks for the xml file. I'll try to see if I can get it to work locally, but a few points for you to look at:

* Are you using GXT? This file isn't referencing any GXT classes, suggesting that this is a GWT problem, or perhaps an issue in your code.
* GXT 3.0.0 RC was released today, get it at http://www.sencha.com/products/extgwt/download/ - can you try that, and make sure your lib/ directory, classpath only has one version of GWT (2.4.0) and GXT (3.0.0 RC)

Edit: I just created a simple project using gwt 2.4.0, gxt 3.0.0-beta4, uibinder-bridge 2.4.0 and a Test class using your ui.xml (but my own images), and the page loads fine in dev mode, and compiles as well to web mode. This suggests it is either a project setup issue (multiple copies of GWT with different versions can have strange effects), or perhaps the real issue is starting somewhere else, and only shows up in part of the log you've made available.

A few more suggestions: Switch to some other kind of image like a JPG, just to make certain that it has nothing to do with the bug that this thread is about. If no luck there, try a fresh project with this class, uibinder file, and the jars you've mentioned, and see if the issue still happens. Keep this as simple as possible, and share the project here so we can take a look, and see if anything is wrong in the setup, or if the setup itself exposes a GXT bug.

anass_benjelloun
22 May 2012, 10:23 AM
when I compile my project :
Compiling module com.hello.gxt.HelloGXT
Scanning for additional dependencies: jar:file:/D:/Program%20Files/eclipse-jee-galileo-win32/Bibliotheques_GXT/gxt-3.0.0-Commercial/gxt-3.0.0.jar!/com/sencha/gxt/core/client/dom/Layer.java
Computing all possible rebind results for 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
Rebinding com.sencha.gxt.core.client.dom.Layer.LayerResources
Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
Preparing method middleCenter
Adding image 'com.sencha.gxt.core.client.dom.Layer.LayerResources.middleCenter'
[ERROR] Unrecognized image file format
[ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
java.lang.NullPointerException
at com.google.gwt.resources.rg.ImageResourceGenerator$BundledImage.addImage(ImageResourceGenerator.java:99)
at com.google.gwt.resources.rg.ImageResourceGenerator.prepare(ImageResourceGenerator.java:541)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1043)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1069)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:412)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] Errors in 'jar:file:/D:/Program%20Files/eclipse-jee-galileo-win32/Bibliotheques_GXT/gxt-3.0.0-Commercial/gxt-3.0.0.jar!/com/sencha/gxt/core/client/dom/Layer.java'
[ERROR] Line 47: Failed to resolve 'com.sencha.gxt.core.client.dom.Layer.LayerResources' via deferred binding
[ERROR] Cannot proceed due to previous errors
Picked up _JAVA_OPTIONS: -Xmx1g

I understand that there is an error in a the jar library downloaded ! ??

anass_benjelloun
22 May 2012, 10:29 AM
When I compile my project I got :
Compiling module com.hello.gxt.HelloGXT
Scanning for additional dependencies: jar:file:/D:/Program%20Files/eclipse-jee-galileo-win32/Bibliotheques_GXT/gxt-3.0.0-Commercial/gxt-3.0.0.jar!/com/sencha/gxt/core/client/dom/Layer.java
Computing all possible rebind results for 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
Rebinding com.sencha.gxt.core.client.dom.Layer.LayerResources
Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
Preparing method middleCenter
Adding image 'com.sencha.gxt.core.client.dom.Layer.LayerResources.middleCenter'
[ERROR] Unrecognized image file format
[ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
java.lang.NullPointerException
at com.google.gwt.resources.rg.ImageResourceGenerator$BundledImage.addImage(ImageResourceGenerator.java:99)
at com.google.gwt.resources.rg.ImageResourceGenerator.prepare(ImageResourceGenerator.java:541)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1043)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1069)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:412)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] Errors in 'jar:file:/D:/Program%20Files/eclipse-jee-galileo-win32/Bibliotheques_GXT/gxt-3.0.0-Commercial/gxt-3.0.0.jar!/com/sencha/gxt/core/client/dom/Layer.java'
[ERROR] Line 47: Failed to resolve 'com.sencha.gxt.core.client.dom.Layer.LayerResources' via deferred binding
[ERROR] Cannot proceed due to previous errors
Picked up _JAVA_OPTIONS: -Xmx1g

so it's a bug in gxt 3 library ???

Colin Alworth
22 May 2012, 10:31 AM
Take a look at the reply already posted that discussed the JRE versions that seem to have this issue http://www.sencha.com/forum/showthread.php?161485-GXT-on-build-server&p=716153&viewfull=1#post716153. Apparently there is a problem with some Java versions reading images from some sources.

anass_benjelloun
23 May 2012, 1:35 AM
I fixed the problem using :

openjdk version "1.6.0"

dankurth
24 Sep 2012, 12:50 PM
I had the same error and in attempting to isolate cause reduced code down, in my case, to some gxt imports.

If include either one of the following gxt imports (with or without actually using them) in code that otherwise does nothing but Hello World got the compile errors. There were also errors stating null exception for image parsing as commented in earlier posts, but in this case though I got those messages I was not using or referring to any images at all.

I got the errors if using jdk1.6.0 or jdk1.6.0_01 (downloaded from Oracle, on Windows XP), but not if using java-6-openjdk-amd64 (version "openjdk-6-jre 6b24-1.11.4-1ubuntu0.12.04.1" ,on Ubuntu 12.04).

I then updated the jdk on Windows to 1.6_34 (download jdk-6u34-windows-i586.exe) and was able to do the Google compile in Eclipse on Windows XP also.

So, now able to compile that code on both Linux and Window, if use latest 1.6 version of jdk.

Full code (to reproduce) follows:
package x.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

// will run fine in plugin with following imports, but will not compile
// if actually use (not just import) will have runtime failure matching compile error
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
import com.sencha.gxt.widget.core.client.grid.ColumnModel;

public class Grids implements EntryPoint {
public void onModuleLoad() {
RootPanel.get().add(new Label("Hello World"));
}
}

ps..Using gwt 2.4 and either gxt-3.0.0 or gxt-3.0.1.

Colin Alworth
24 Sep 2012, 4:11 PM
Dankurth, can you also post your module file? And possibly the error log itself?

dankurth
24 Sep 2012, 4:30 PM
Dankurth, can you also post your module file? And possibly the error log itself?

Sure, if it is still useful (as I said figured out I could get past compile errors by using latest jdk, but that was after I'd already posted so just left post there as further info).

Error on google compile on Windows XP using jdk1.6.0 or jdk1.6.01 (from Oracle download) as follows:

Compiling module x.Grids
Scanning for additional dependencies: jar:file:/C:/Documents%20and%20Settings/Daniel/workspace/Grids2/war/WEB-INF/lib/gxt-3.0.1.jar!/com/sencha/gxt/core/client/dom/Layer.java
Computing all possible rebind results for 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
Rebinding com.sencha.gxt.core.client.dom.Layer.LayerResources
Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
Preparing method middleCenter
Adding image 'com.sencha.gxt.core.client.dom.Layer.LayerResources.middleCenter'
[ERROR] Unrecognized image file format
[ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'com.sencha.gxt.core.client.dom.Layer.LayerResources'
java.lang.NullPointerException
at com.google.gwt.resources.rg.ImageResourceGenerator$BundledImage.addImage(ImageResourceGenerator.java:99)
at com.google.gwt.resources.rg.ImageResourceGenerator.prepare(ImageResourceGenerator.java:541)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1043)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1069)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:412)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:257)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:96)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/Daniel/workspace/Grids2/war/WEB-INF/lib/gxt-3.0.1.jar!/com/sencha/gxt/core/client/dom/Layer.java'
[ERROR] Line 47: Failed to resolve 'com.sencha.gxt.core.client.dom.Layer.LayerResources' via deferred binding
[ERROR] Cannot proceed due to previous errors

The contents of the xml file are:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='x'>

<inherits name='com.google.gwt.user.User'/>
<inherits name='com.sencha.gxt.ui.GXT' />
<inherits name='com.google.gwt.user.theme.clean.Clean'/>

<entry-point class='x.client.Grids'/>

<source path='client'/>
<source path='shared'/>

</module>

And again the main source was simply:

package x.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

// will run fine in plugin with following imports, but will not compile
// if actually use (not just import) will have runtime failure matching compile error
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
import com.sencha.gxt.widget.core.client.grid.ColumnModel;

public class Grids implements EntryPoint {
public void onModuleLoad() {
RootPanel.get().add(new Label("Hello World"));
}
}

dankurth
24 Sep 2012, 4:53 PM
/*
* Note: presence of following imports will cause compile error on
* Windows XP if use jdk1.6.0 or jdk1.6_1 (and possibly others).
* However it has compiled ok on XP using jdk1.6_34 and on Ubuntu
* 12.04 using "openjdk-6-jre 6b24-1.11.4-1ubuntu0.12.04.1".
*
* BTW. on run with plug-in there was no complaint on XP on jdk1.6_1,
* but if then attempted to use (implement classes using) would get
* same error on runtime as shown on compile.
*/
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
import com.sencha.gxt.widget.core.client.grid.ColumnModel;

Colin Alworth
25 Sep 2012, 12:05 PM
Thanks Dan - I had missed the detail that you are now able to compile with a different JDK version.