On Friday, March 7, 2014 5:48:41 PM UTC+1, Tom wrote:
>
> Ok, I want to manage Constants at Server level, so
> com.mattbertolini.hermes.Hermes is a solution.
>
> Please see all my steps:
>
> 1- I downloaded hermes-1.2.0.jar & import into correct Library of eclipse
> (no problem)
>
> 2- Create MyConstantsWithLookup.java at client package
>
> import com.google.gwt.i18n.client.ConstantsWithLookup;
>
> public interface MyConstantsWithLookup extends ConstantsWithLookup {
> String myMsg();
> }
>
> 3- create MyConstantsWithLookup.properties file in the same client
> package. The file has this line:
>
> myMsg=Deleted
>
> 4- In ServerData.java in Server package
>
> MyConstantsWithLookup my = Hermes.get(MyConstantsWithLookup.class, "");
> String extra=my.myMsg();
>
> When tested in eclipse it works fine but I got Warnign message in eclipse:
>
> [WARN] Server class 'com.ibm.icu.util.ULocale' could not be found in the web
> app, but was found on the system classpath
> [WARN] Adding classpath entry
> 'file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt-2.5.0/gwt-dev.jar'
> to the web app classpath for this session
> For additional info see:
> file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt-2.5.0/doc/helpInfo/webAppClassPath.html
>
>
> I am not sure what this warning'd about? is it serious?
>
> The code was running ok but why eclipse generated this warning?
>
Hermes' README tells you you need ICU 4.6. It happens gwt-dev.jar contains
ICU (because that's what's used by GWT to generate the client-side code for
I18N, and thus what Hermes uses to replicate the functionality on the
server side), and DevMode tells you that you're missing ICU in your
WEB-INF/lib (which means your app won't run when deployed to a web server)
but it can temporarily help you by adding gwt-dev.jar to the classpath (as
if it were within the WEB-INF/lib, which is a very very bad idea and can
cause all sorts of breakages).
The idea behind this warning is to warn you in case you added a JAR to your
classpath (e.g. build path in Eclipse) but didn't put it in the
WEB-INF/lib. It happens that in your case you didn't put anything anywhere,
but the classes you're trying to use (via Hermes) happen to be in GWT
already.
So, yes, it's a serious warning. Download ICU 4.6 and put it in your
WEB-INF/lib (oh, and update to GWT 2.6, GWT 2.5 is more than 1 year old
already!)
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.