Code Monkey home page Code Monkey logo

Comments (16)

niloc132 avatar niloc132 commented on July 17, 2024 1

The problem is that Gin doesn't support Jakarta, and is unmaintained, so will likely not get a new update. Someone at Google would need to initiate this, or at least support it.

There is no requirement to stop using javax packages and switch to jakarta when using Java 17.

from gwt.

tbroyer avatar tbroyer commented on July 17, 2024

Guice 7 moved to jakarta.inject, you need to use Guice 6 or earlier with GIN to stay on javax.inject.

https://github.com/google/guice/wiki/Guice700#jee-jakarta-transition

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

I am using Guice 7 as noted in my steps to reproduce

from gwt.

tbroyer avatar tbroyer commented on July 17, 2024

…which is the problem. Downgrade to Guice 6 and it should work 🤞

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

Shouldn't I be using Jakarta since I'm upgrading to JDK 17?

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

That solved that, now
filterRegex(FILTER_STRING).through(AuthFilter.class); is giving

C:\SVNWorkspace\life-uiSpring\src\main\java\com\mutualofomaha\nbs\ui\utils\AppServletModule.java:63: error: no suitable method found for through(Class)
filterRegex(FILTER_STRING).through(AuthFilter.class);
^
method FilterKeyBindingBuilder.through(Class<? extends Filter>) is not applicable
(argument mismatch; Class cannot be converted to Class<? extends Filter>)
method FilterKeyBindingBuilder.through(Key<? extends Filter>) is not applicable
(argument mismatch; Class cannot be converted to Key<? extends Filter>)
method FilterKeyBindingBuilder.through(Filter) is not applicable
(argument mismatch; Class cannot be converted to Filter)

Is there a library I missed?

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

Actually, I think that is due to more jakarta's that need to change

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

I am now running into this

Computing all possible rebind results for 'com.mutualofomaha.nbs.ui.client.AppGinjector'
Rebinding com.mutualofomaha.nbs.ui.client.AppGinjector
Invoking generator com.google.gwt.inject.rebind.GinjectorGenerator
[WARN] Class jdk.internal.reflect.ConstructorAccessorImpl is used in Gin, but not available in GWT client code.
[ERROR] Errors in 'com/google/gwt/user/client/DOM.java'
[ERROR] Line 65: Rebind result 'com.google.gwt.user.client.impl.DOMImpl' cannot be abstract
[ERROR] Errors in 'com/google/gwt/dom/client/DOMImpl.java'
[ERROR] Line 23: Rebind result 'com.google.gwt.dom.client.DOMImpl' cannot be abstract

Their are libraries from google.gwt listed
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.inject.client.GinModules;
import com.google.gwt.inject.client.Ginjector;
import com.google.gwt.place.shared.PlaceController;

Also seeing this error after a lot of warnings about a private that will not be serialized because it is final

[ERROR] Errors in 'com/google/gwt/user/cellview/client/CellBasedWidgetImpl.java'
[ERROR] Line 50: Rebind result 'com.google.gwt.user.cellview.client.CellBasedWidgetImpl' cannot be abstract
[ERROR] Error saving compilation unit to cache file: C:\SVNWorkspace\life-uiSpring\build\gwt\cache\gwt-unitCache\gwt-unitCache-9832889f3ba33ea6127df852fe9b558bb4d30c80-C90BB3B791D3293DB8D5BA1AB0A974D4-0000018E99C16293
java.io.IOException: Stream Closed
at java.base/java.io.RandomAccessFile.read0(Native Method)
at java.base/java.io.RandomAccessFile.read(RandomAccessFile.java:365)
at java.base/java.io.RandomAccessFile.readInt(RandomAccessFile.java:838)
at com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:162)
at com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:73)
at jdk.internal.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1201)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1526)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1448)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1191)
at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1582)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1539)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1448)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1191)
at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
at java.base/java.util.ArrayList.writeObject(ArrayList.java:866)
at java.base/jdk.internal.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1201)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1526)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1448)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1191)
at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
at com.google.gwt.dev.javac.CachedCompilationUnit.writeObject(CachedCompilationUnit.java:231)
at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1201)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1526)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1448)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1191)
at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
at com.google.gwt.dev.javac.PersistentUnitCacheDir$OpenFile.writeUnit(PersistentUnitCacheDir.java:373)
at com.google.gwt.dev.javac.PersistentUnitCacheDir.writeUnit(PersistentUnitCacheDir.java:194)
at com.google.gwt.dev.javac.PersistentUnitCache$BackgroundService$4.run(PersistentUnitCache.java:413)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

Are any of these causing my issues?

from gwt.

jnehlmeier avatar jnehlmeier commented on July 17, 2024

@dgeiselmanMOO It is not clear to me what your current goal is? Do you simply want to upgrade to JDK 17 or are you also trying to move everything to Jakarta? Also is your GWT client code in the same project as your server side code?

The above errors you are seeing usually mean that calls to GWT.create(<some interface or abstract class>) failed. Either because there was no generator / rebind rule defined in a *.gwt.xml file or the generator threw an exception. Usually the log shows the root cause.

Generally you are not required to use Jakarta just to use Java 17. However more and more libraries/projects will use Jakarta in the future. Because you are using GIN, which only supports javax.inject, it would be wise to split your project into a GWT/UI project and a server project. Then both projects can evolve independently and the GWT/UI project can use GIN 2.1.2 + Guice 6.0.0 with javax.inject while the server might use Guice 7 and Jakarta.

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

Right now the goal is to figure out where the errors are occuring so I can fix them. I'm past the Javax/Jakarta issue and the errors I'm getting with the DOMImpl and CellBasedWidgetImpl are both in strict and when I compile without strict. I'll check for the GWT.create are there any others I need to hunt for?

from gwt.

jnehlmeier avatar jnehlmeier commented on July 17, 2024
[ERROR] Errors in 'com/google/gwt/user/client/DOM.java'
[ERROR] Line 65: Rebind result 'com.google.gwt.user.client.impl.DOMImpl' cannot be abstract
[ERROR] Errors in 'com/google/gwt/dom/client/DOMImpl.java'
[ERROR] Line 23: Rebind result 'com.google.gwt.dom.client.DOMImpl' cannot be abstract

This error for example is pure GWT internal. Basically DOM internally calls GWT.create(DOMImpl.classs) because some browsers behave differently with regard to DOM operations GWT uses. I think the root cause might be that your project uses user.agent values that GWT does not support anymore. The only valid values right now are safari (Safari / Chrome based browsers) and gecko1_8 (Firefox / IE 11).

So you should check:

  • in your 3rd party GWT libraries check if they are nasty and provide their own com.google.gwt....DOM/DOMImpl implementation to override the one provided by GWT. That is almost always bad.
  • Check if your app and 3rd party libraries use a user.agent property that is not supported anymore by GWT SDK. GWT 2.10 dropped support for ie8, ie9, ie10 values for user.agent.

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

Ok, so

<extend-property name="user.agent" values="ie8" />
<extend-property name="user.agent" values="gecko1_8" />
<extend-property name="user.agent" values="safari" />
<extend-property name="user.agent" values="ie9" fallback-value="ie8" />

Should only have Safari and Chrome and get rid of ie and gecko?

from gwt.

jnehlmeier avatar jnehlmeier commented on July 17, 2024

No, search for ie8, ie9, ie10 in your *.gwt.xml files and the ones of your 3rd party dependencies.

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

All I have now is safari, do I need gecko1_8?

from gwt.

jnehlmeier avatar jnehlmeier commented on July 17, 2024

If your application should support FireFox and IE 11 then you also need gecko1_8.

from gwt.

dgeiselmanMOO avatar dgeiselmanMOO commented on July 17, 2024

Ok, that took care of my issues. Thank you for the help

from gwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.