-
Notifications
You must be signed in to change notification settings - Fork 6
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
GWT-Guava - fails with java.lang.IllegalArgumentException: non-public interface is not defined by the given loader see ticket 28 for fixes #20
Comments
I've looked into it and found out the following:
Given that, I don't see any way how this could work at all as dev-mode starts a "code-server" that always has a different class-loader. tl;dr; Guava-GWT seems not to be working with GWT and dev-mode at the same time, imho this is an issue of GWT and not gwt-spring-boot-starter. I'll close this, if somebody has an idea how it could be fix I can happily reopen the issue. |
See ticket # 28 for the fix-set and other feature implementations |
where can I find that? |
#28 has the attached zip file of all the code/spring-stuff... |
Got it, thanks, I'll take a look! |
Hi all, I am having the exact same issue. Is there a way around this? This only seem to happen with gwt-spring-boot-starter, I have not seen this issue before when using gwt maven dev mode. |
I ended up living / running off a customized local build - see
#28 for the zip
file containing the code
…On Fri, Feb 2, 2024 at 3:42 AM sblommers ***@***.***> wrote:
Hi all, I am having the exact same issue. Is there a way around this? This
only seem to happen with gwt-spring-boot-starter, I have not seen this
issue before when using gwt maven dev mode.
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF4PC46P7ODZSPU5N6XHUWTYRS7HXAVCNFSM6AAAAAAR7DGTVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRTGU2DANRWGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @RobertMolenda thanks for your response. I tried your zip but immediately got other problems with the paths file:// is not allowed (new File throws an exception) so maybe something with urls not being correct in my situation. But I didn't see the error above. Sure this is about GWT-Guava and not something else? Edit: yes I see that as soon as pulling in Guava-GWT it errors. |
I can email you a current zip file of my working project, and as a final
work around and just to get it going - I also removed all Guava from the UI
side of the project - and have the following notes in my pom:
<guava.version>31.1-jre</guava.version> <!-- ok for server side as long
attributes are not shared into GWT -->
<guavagwt.version>31.1-jre</guavagwt.version> <!-- GWT Guava breaks DEBUG
-->
…On Fri, Feb 2, 2024 at 7:48 AM sblommers ***@***.***> wrote:
Hi @RobertMolenda <https://github.com/RobertMolenda> thanks for your
response. I tried your zip but immediately got other problems with the
paths file:// is not allowed (new File throws an exception) so maybe
something with urls not being correct in my situation. But I didn't see the
error above. Sure this is about GWT-Guava and not something else?
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF4PC46JM5UJMFVTDB7GI3LYRT4D5AVCNFSM6AAAAAAR7DGTVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUGAZTGNJSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @RobertMolenda thank you for helping out. I'm also removing Guava from UI side, this will take some time for us because we use it in around 20 different gwt modules. It would have been so sweet if it just worked but somehow GWT and Guava have forever been cursed. |
Hi @RobertMolenda it looks like I'm stuck again but now it seems with other libraries as well. I am sorry for asking are you willing to share your latest code with me? my email is [email protected]? |
Hi @RobertMolenda @werthdavid I have been working on this issue the past two days and I can clearly see there is some problem with classloaders. My quess is that you should just use the class-loader that is currently being used and adapt that one to your needs. There is also the special
In
And just after that using the known code and use the internal
This situation can be adapted to all combinations of classloaders. I'll try and make a usable codebase for the different scenarios. I am able to test for Java8 and Java11 at the moment with and without the Thanks @RobertMolenda for your help to get a minimal version working with Guava and other stuff sensitive to being on different classloaders. |
If you find a solution feel free to open a PR |
Adding GWT-Guava to the example project causes execution/debug failure in eclipse.
I simply added
pom.xml
Application.gwt.xml
This is a JDK11 project so added '--add-opens java.base/jdk.internal.loader=ALL-UNNAMED' to the VM Parameters.
The project runs/debugs fine without the guava import.
I've tried Guava versions 20.0 -> 22.0 and the 24.x-jre -> 31.1-jre versions with the same failure
Stack Trace:
The text was updated successfully, but these errors were encountered: