View Full Version : clear.gif is missing

4 Apr 2012, 11:15 PM
If we run our applications in hosted mode or in compiled mode (with tomcat), the clear.gif in the generated source code is missing. This result in an 404 error and for example, the image for displaying the sort direction in the header of the grid will not be displayed.

Only the clear.nocache.gif is found in the compile folder. I'am missing something?

6 Apr 2012, 8:28 AM

Ahhh. I just noticed your's is nocache....did you do something specific to turn on/off cacheing?


That's odd. How are you building your application? Maven? If so, I can paste our relevate POM code.

Here's the output from our web app (mainEntry is the rename-to) for clear.gif - do you have the one under base?

$ find -name *.gif | grep clear

10 Apr 2012, 12:46 AM
Yes, we are building with Maven. Only the clear.gif in the root folder is missing. The other two files you are mentioned are available.

Colin Alworth
10 Apr 2012, 9:36 AM
y612000, is it possible you are not adding GXT.gwt.xml to your module file, but are only including the pieces that you intend to use? Doing that would skip the public/ dir that contains clear.gif.

22 May 2012, 6:08 AM
Hey Colin, having the same issue. I copied the GXT.gwt.xml file into my own .gwt.xml to avoid the Blue Appearance.

The solution, which you seem to hint at, is to create a public folder next to my .gwt.xml file that contains the clear.gif and the blank.html files.

Colin Alworth
22 May 2012, 9:26 AM
The clear.gif file probably belongs in the core module so that this isn't an issue, but in the meantime, yes, if you are using a custom module setup that excludes GXT.gwt.xml, you may need to move the file.

As a side note, you may not need to copy GXT.gwt.xml to override Blue - it should be sufficient to put your own replace-with rules after the GXT inherits statement so that yours take precedence. This also would allow widgets that you haven't yet rethemed to continue to work until they are themed.

<inherits name='com.sencha.gxt.ui.GXT' />

<inherits name='my.project.theme.custom.CustomTheme' />

2 May 2013, 12:39 AM
Hi Colin,

I read your post about optimizing a GXT application.
One of your advices is to use:

<inherits name="com.sencha.gxt.widget.core.Core"/>
<inherits name="com.sencha.gxt.state.State"/>
<inherits name="com.sencha.gxt.theme.blue.Blue"/>

insteed of using

<inherits name='com.sencha.gxt.ui.GXT'/>

in the module descriptor.

if I use the first inherits, the clear.gif is not deployed to the module directory and some widgets looks awful. (because of the msissing clear.gif)
Going back to the second definition, the clear.gif gets deployed and everything is ok!

Colin Alworth
2 May 2013, 10:26 AM
The blog post Gishmo is referring to: http://www.sencha.com/blog/using-the-gwt-compiler-for-better-builds/

You are definitely correct about that - I've made some tentative changes to better support that use case. A cleaner fix if you want to have all of those permutations would be to put a copy of clear.gif in your own public/ dir so that it is compiled in.

That said, in the discussion of things that actually help build times and sizes, this doesn't even rank - it saves less than 1% compiled size. I can't think of a case where saving 21k over 2.5MB would be worthwhile - gzipped, that 21k will end up being a savings of about 5k. If your app took a minute and a half to load, making this change would save almost one second.

I left this detail out from the later discussion points, as any other change to optimize for compiled size is at least an order of magnitude better. If you do decide to make use of this change, then the workaround above will solve this issue. We will make a fix for this in a later release, at least by 3.1.0.

2 May 2013, 10:57 AM
You are right. I switch back to the second version:

<inherits name='com.sencha.gxt.ui.GXT' />

But I need more than an hour to find out, why my tree was looking so bad. :-D

Andreas Samjeske
4 Dec 2014, 3:02 AM
I switched from classic Dev Mode to Super Dev Mode. Suddenly there are some files missing:


GWT 2.6.1
GXT 3.1.0


<module rename-to='foo'>
<inherits name='com.sencha.gxt.ui.GXT'/>
<inherits name='com.sencha.gxt.chart.Chart'/>
<stylesheet src="reset.css" />
<add-linker name="xsiframe"/>

Whats wrong here? How do I fix it?