Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Unable to override 'datetimeAdapter' with a custom implementation #58

Closed
MartinSchwarzbauer opened this issue May 27, 2021 · 7 comments
Assignees

Comments

@MartinSchwarzbauer
Copy link

MartinSchwarzbauer commented May 27, 2021

Hi!

I am using latest charba version 4.0 for gwt (master)!
In development mode charts are working perfectly! Then i compile the GWT source without any error and warnings => but when webpage is loaded in browser i always get the following error:
Unable to override 'datetimeAdapter' with a custom implementation

webserver-0.js:60520 Uncaught Error: Class$S47: Unable to override 'datetimeAdapter' with a custom implementation
    at IllegalArgumentException_0._.createError (webserver-0.js:60520)
    at IllegalArgumentException_0._.initializeBackingError (webserver-0.js:60531)
    at IllegalArgumentException_0.Exception_0 (webserver-0.js:60551)
    at IllegalArgumentException_0.RuntimeException_0 (webserver-0.js:60561)
    at new IllegalArgumentException_0 (webserver-0.js:89099)
    at LuxonAdapterResource.AbstractInjectableResource (webserver-0.js:97405)
    at LuxonAdapterResource.AbstractInjectableResource_0 (webserver-0.js:97414)
    at new LuxonAdapterResource (webserver-0.js:109756)
    at new EmbeddedResources (webserver-0.js:109736)
    at $clinit_EmbeddedResources (webserver-0.js:109708)
    at enable_0 (webserver-0.js:94470)
    at Array.init (webserver-0.js:69737)
    at initializeModules (webserver-0.js:1906)
    at apply_0 (webserver-0.js:60738)
    at entry0 (webserver-0.js:60771)
    at webserver-0.js:60761
    at gwtOnLoad_0 (webserver-0.js:1919)
    at webserver-0.js:109870

I tried 'Charba.enable' and 'DeferredCharba.enable(...)' and both give me the same error!

@MartinSchwarzbauer MartinSchwarzbauer changed the title Unable to override 'datetimeAdapter' with a custom implementation Exception: Unable to override 'datetimeAdapter' with a custom implementation May 27, 2021
@stockiNail
Copy link
Contributor

@MartinSchwarzbauer Can you provide the code when you are invoking Charba.enable or DeferredCharba.enable?

@stockiNail stockiNail self-assigned this May 27, 2021
@MartinSchwarzbauer
Copy link
Author

I think i've found the difference from showcase source to my source:

I compiled my GWT source with the following option:
'-XdisableClassMetadata'

When i remove this option. the charts are working!

@stockiNail
Copy link
Contributor

@MartinSchwarzbauer FINE!!!! Very good!

Be aware that we have finished version 4.0 and we are waiting for the Datalabels plugin in order to release it.
Really thank you for testing and using it!

@MartinSchwarzbauer
Copy link
Author

I started using Charba yesterday ... and because of upcoming changes in the API i decided to test and use latest version :)!

@stockiNail
Copy link
Contributor

I started using Charba yesterday ... and because of upcoming changes in the API i decided to test and use latest version :)!

Thank you!

I committed today some updates... Some class names are changed (but maybe you are not using them). I hope it could not be a issue for your development.

@stockiNail
Copy link
Contributor

'-XdisableClassMetadata'

This options disables some java.lang.Class methods (e.g. getName()).

Charba uses getName and other methods of Class.

Thanks @MartinSchwarzbauer

stockiNail added a commit that referenced this issue Aug 12, 2021
@stockiNail
Copy link
Contributor

@MartinSchwarzbauer FYI we changed some internals of Charba in order to use it even if you are using -XdisableClassMetadata GWT compiler option.
The implementation has been merged in the current master branch and will be be available in next version, 4.2.

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants