I have been using GWT for over couple of months now and find it
extremely good. However I ran into this strange issue lately when I
was trying to use 118N Constants in my application. I have one file
which is definied as
<code>
package uk.co.shopzilla.sem.vajra.client.action;
import com.google.gwt.i18n.client.Constants;
public interface ActionConstants extends Constants {
String bidOverriderQuery();
}
</code>
and I invoke it as "ActionConstants constants = (ActionConstants)
GWT.create(ActionConstants.class)"; I have inherited my module from
I18N and I have included my ActionConstants.properties in the same
directory. And I dont have any issues when I compile this on my
windows machine. However I need to make a build on my server which is
a 64-bit linux machine. And i get the following error
<error>
/home/svasudevan/jboss/java/jre/bin/java -classpath /home/svasudevan/
vajra/webui/vajraui-source/target/classes:/home/svasudevan/gwt-
linux-1.4.10/gwt-dev-linux.jar:/home/svasudevan/gwt-linux-1.4.10/gwt-
dev-mac.jar:/home/svasudevan/gwt-linux-1.4.10/gwt-dev-windows.jar:/
home/svasudevan/gwt-linux-1.4.10/gwt-user.jar:/home/svasudevan/vajra/
webui/vajraui-source/src/main/resources:/home/svasudevan/vajra/webui/
vajraui-source/src/main/java com.google.gwt.dev.GWTCompiler -logLevel
WARN -style OBF -out /home/svasudevan/vajra/webui/vajraui-source/
target/VajraUI uk.co.shopzilla.sem.vajra.VajraUI
Computing all possible rebind results for
'uk.co.shopzilla.sem.vajra.client.action.ActionConstants'
Rebinding uk.co.shopzilla.sem.vajra.client.action.ActionConstants
Assimilating generated source
Computing all possible rebind results for
'com.google.gwt.i18n.client.constants.DateTimeConstants'
Rebinding
com.google.gwt.i18n.client.constants.DateTimeConstants
Assimilating generated source
Computing all possible rebind results for
'com.google.gwt.user.client.ui.DisclosurePanelImages'
Rebinding
com.google.gwt.user.client.ui.DisclosurePanelImages
Invoking <generate-with
class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/>
Adding image 'com/google/gwt/user/client/ui/
disclosurePanelClosed.png'
[ERROR] Unable to read image resource
[ERROR] Errors in '/home/svasudevan/gwt-linux-1.4.10/
gwt-user/com/google/gwt/user/client/ui/DisclosurePanel.java'
[ERROR] Line 165: Failed to resolve
'com.google.gwt.user.client.ui.DisclosurePanelImages' via deferred
binding
[ERROR] Cannot proceed due to previous errors
[ERROR] Build failed
</error>
I am using GWT 1.4 RC 1 on both of my environments.
The earliest help will be appreciated highly.
thanks
Shankar
I've been working on it a bit more since my last email. I've isolated
it to part of the code that reads the png file. It appears to throw
an IOException while loading the file. Unfortunately, I cannot get
the current version of GWT in their SVN to build, so getting the
actual error out of the IOException has been elusive thus far.
I'm not sure about the classformat - I thought about that too until I
figured out it was an IOException. There is a somewhat unrelated bug
that the gwt people reference in one part of their code about Java
being a bit picky about the PNG format. I haven't been able to figure
whether this is the case here, but once I can compile I'll know for
sure.
Once I was able to output the exception, it was immediately apparent.
It turns out that when gwt wished to convert the png file, it
attempted to write to the /tmp directory on server and as a normal
user I did not have permissions to write there. GWT had the very
helpful (!!!sarcasm here!!!) feature of swallowing the exception.
Perhaps this is a nice cautionary tale - don't swallow exceptions.
The Solution - GET PERMISSIONS ON THE /tmp DIRECTORY
The Lesson - DO NOT SWALLOW EXCEPTIONS. DO NOT BELIEVE THE COMPILER
thanks
Shankar
On Aug 23, 2:51 pm, Shanks <vasudevan.shan...@gmail.com> wrote:
> Hi all,
>
> I have been using GWT for over couple of months now and find it
> extremely good. However I ran into this strange issue lately when I
> was trying to use 118N Constants in my application. I have one file
> which is definied as
>
> <code>
> package uk.co.shopzilla.sem.vajra.client.action;
> import com.google.gwt.i18n.client.Constants;
>
> public interface ActionConstants extends Constants {
> String bidOverriderQuery();}
>
> </code>
>
> and I invoke it as "ActionConstants constants = (ActionConstants)
> GWT.create(ActionConstants.class)"; I have inherited my module fromI18Nand I have included my ActionConstants.properties in the same