Hi,
    I am trying to do a simple constant lookup. com.google.gwt.i18n.client.
Constants is what I need to use.

I created the interface

public interface PhotoConstants extends Constants{

String appName();
}

I am calling is in GWT Entry Point code as follows

PhotoConstants constants = (PhotoConstants)GWT.create(PhotoConstants.class);
Window.alert(constants.upnpAppName());

I created a PhotoConstants.properties file in war/ directory.


However I get the following Exception.

This maybe because I dont have the properties file in the correct location??
The documentation does not say anything about it though...


12:57:20.298 [ERROR] [phototrial] No resource found for key 'upnpAppName'
com.google.gwt.i18n.rebind.AbstractResource$MissingResourceException: No
resource found for key 'upnpAppName'
    at
com.google.gwt.i18n.rebind.AbstractResource$ResourceList.getRequiredStringExt(AbstractResource.java:246)
    at
com.google.gwt.i18n.rebind.SimpleValueMethodCreator.createMethodFor(SimpleValueMethodCreator.java:95)
    at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.delegateToCreator(AbstractLocalizableImplCreator.java:313)
    at
com.google.gwt.i18n.rebind.ConstantsImplCreator.emitMethodBody(ConstantsImplCreator.java:163)
    at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.genMethod(AbstractGeneratorClassCreator.java:265)
    at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitMethods(AbstractGeneratorClassCreator.java:233)
    at
com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitClass(AbstractGeneratorClassCreator.java:116)
    at
com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.generateConstantOrMessageClass(AbstractLocalizableImplCreator.java:133)
    at
com.google.gwt.i18n.rebind.LocalizableGenerator.generate(LocalizableGenerator.java:121)
    at
com.google.gwt.i18n.rebind.LocalizableGenerator.generate(LocalizableGenerator.java:98)
    at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:418)
    at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:38)
    at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:108)
    at
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:54)
    at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:154)
    at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:119)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:531)
    at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:414)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
    at com.google.gwt.core.client.GWT.create(GWT.java:98)
    at
com.ashish.phototrial.client.PhotoTrial.onModuleLoad(PhotoTrial.java:57)
    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 com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
    at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
    at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
    at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    at java.lang.Thread.run(Unknown Source)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to