4

I'm getting this error at runtime when I try to use getClass.getPackage().getImplementationVersion(), in my FooterViewImpl class, to show my project's version number (from the pom.xml file) on the web page. I think the error is from the gwt java-to-javascript compiler.

[ERROR] [OnlineGlom] - Line 52: The method getPackage() is undefined for the type Class<capture#1-of ? extends FooterViewImpl>

java.lang.RuntimeException: Deferred binding failed for 'org.glom.web.client.ClientFactory' (did you forget to inherit a required module?)

Should I expect this to work?

1 Answer 1

3

No.

getPackage() is not emulated by GWT: https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation. The motto of GWT is to do the maximum at compile-time rather than runtime.

2
  • Thanks. Do you have any suggestion for how to get that information from the pom.xml file at compile time?
    – murrayc
    Apr 21, 2012 at 16:29
  • 2
    Call getImplementationVersion from a GWT generator? Apr 22, 2012 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.