Hi,

looking at your build logs it seems you have executed

ant clean dist -Dgwt.tools=/home/aarmugam/GWT_Source_code/gwt-2.4.0/tools/ 
-Dgwt.version=2.4.0
ant clean dist-dev 
-Dgwt.tools=/home/aarmugam/GWT_Source_code/gwt-2.4.0/tools/ 
-Dgwt.version=2.4.0

In both cases you have set the system property "gwt.tools" to 
"gwt-2.4.0/tools". Given the full path it looks a bit unusual so I want to 
verify that you actually did the correct thing. To build GWT you need to 
checkout two repositories: https://github.com/gwtproject/gwt 
and https://github.com/gwtproject/tools. But the system property 
"gwt.tools" is a bit confusing because the project 
https://github.com/gwtproject/gwt also has a folder "tools", see 
https://github.com/gwtproject/gwt/tree/main/tools . The system property 
 should point to the checked out project 
https://github.com/gwtproject/tools and not to the subfolder "tools" of the 
checked out project https://github.com/gwtproject/gwt.

You don't need to set the system property at all, if you checkout both 
projects next to each other, because by default the GWT build script uses 
"../tools" as value. So the easiest way is to have a folder layout like

GWT_Source_code
|--- gwt-2.4.0 (checkout of https://github.com/gwtproject/gwt)
     |--- here is also a different tools folder as part of GWT
|--- tools (checkout of https://github.com/gwtproject/tools)

So maybe verify that you have not accidentally mixed up both these tools 
folders.

-- J.

Anjana A schrieb am Dienstag, 16. Januar 2024 um 14:55:45 UTC+1:

> Colin,
>
> As mentioned earlier due to some unavoidable constraints we are unable to 
> upgrade GWT to its latest version and so we are trying out this option. I 
> have attached the GWT.2.4.0 ant build logs and GWT error related build 
> logs. I am not sure if this gonna work but just wanted to give a try and if 
> it works it will be helpful.  Thank you very much!
>
>
> Regards,
> Anjana
>
> On Tuesday, January 16, 2024 at 6:17:08 PM UTC+5:30 Colin Alworth wrote:
>
> Unfortunately, there isn't enough information to help you without redoing 
> the work you've done - most of your log looks like the jvm's own internal 
> logging, which doesn't tell me anything right away at least.
>
> What commands exactly did you use to build, and what changes did you make, 
> how did you validate that the jars you created were able to be used at all, 
> how did you ensure that the changes you made would solve the problems you 
> are after? Can you share the full build log - for certain "Unable to find 
> ..." is not the first line of logging that GWT itself emitted.
>
> In the event you are cherry-picking specific GWT commits since 2.4, to add 
> support for newer JVMs (which is to say changes that are known to add 
> support for newer JDKs), why not simply update to a newer GWT version? 
> Wouldn't it be better to use a version built and tested for what you 
> intend, than to make a custom fork of a 12 year old version?
>
> Quick testing locally shows at least that 2.8.2 will run on Java 17 for 
> the Hello sample app, which is still pretty old, having been published in 
> 2017. In the event you aren't able to update to latest, what about just 
> updating to something not quite as old, but validated to work on Java9+?
>
> On Tuesday, January 16, 2024 at 6:26:19 AM UTC-6 anjana....@gmail.com 
> wrote:
>
> Hi Colin,
>
> Thanks for the response!
> As an initial step I am try to build the GWT SDK jars from source code by 
> following the instructions provided in this link - 
> https://github.com/gwtproject/gwt?tab=readme-ov-file
>
> With few corrections in GWT.2.4.0 source code was able to build jars 
> successfully with JDK 17 and also tried with JDK.1.8 (no code change made) 
> by using command ant clean dist-dev with -Dgwt.tools  from CLI as mentioned 
> in the above link.  But when I use these generated jars(gwt-dev.jar, 
> gwt-user.jar, gwt-servlet.jar, gwt-servlet-deps.jar, 
> requestfactory-apt.jar, requestfactory-client.jar, 
> requestfactory-server.jar, requestfactory-client+src.jar, 
>  requestfactory-server+src.jar, requestfactory-client-src.jar, 
>  requestfactory-server-src.jar) into my application, I am getting below 
> error-
>
> Error trace-
>
>      [java] [1.574s][info][class,load] 
> com.google.gwt.dev.javac.CompilationProblemReporter source:  
>
>     [java] [1.575s][info][class,load] 
> java.lang.invoke.LambdaForm$MH/0x00007fe964144000 source: 
> __JVM_LookupDefineClass__
>
>      [java] [1.575s][info][class,load] 
> java.lang.invoke.LambdaForm$MH/0x00007fe964144400 source: 
> __JVM_LookupDefineClass__
>      [java] [1.576s][info][class,load] 
> java.lang.invoke.LambdaForm$MH/0x00007fe964144800 source: 
> __JVM_LookupDefineClass__
>      [java] [1.576s][info][class,load] 
> java.lang.invoke.LambdaForm$MH/0x00007fe964144c00 source: 
> __JVM_LookupDefineClass__
>      [java]    
> *[ERROR] Unable to find type 'java.lang.Object'*     [java] 
> [1.577s][info][class,load] com.google.gwt.dev.util.Messages source:
>
>      [java]       *[ERROR] Hint: Check that your module inherits 
> 'com.google.gwt.core.Core' either directly or indirectly (most often by 
> inheriting module 'com.google.gwt.user.User')*
>      [java] [1.578s][info][class,load] 
> java.util.IdentityHashMap$KeyIterator source: shared objects file
>      [java] [1.578s][info][class,load] java.io.RandomAccessFile$1 source: 
> shared objects file
>      [java] [1.579s][info][class,load] 
> java.util.prefs.FileSystemPreferences$10 source: jrt:/java.prefs
>      [java] [1.579s][info][class,load] 
> java.util.prefs.FileSystemPreferences$12 source: jrt:/java.prefs
>      [java] [1.579s][info][class,load] 
> java.util.prefs.FileSystemPreferences$11 source: jrt:/java.prefs
>
>
> I checked many blogs on the similar error where it was mentioned the root 
> cause for this issue was because of classpath mistake.  I am running my 
> application ant build from CLI and also I have verified that all the 
> required jars are present in classpath. Could you please guide me here to 
> tackle this issue? Please note I am  also *facing  same issue when I 
> build jars with JDK.1.8 without any code change in GWT.2.4.0 source code*.
>
> GWT.2.4.0 source code downloaded from -
>  https://github.com/gwtproject/gwt/releases/tag/2.4.0 
> <https://github.com/gwtproject/gwt/releases/tag/2.4.0>
> tools - https://github.com/gwtproject/tools/ 
> <https://github.com/gwtproject/tools/>
>
> Thanks in advance!
>
> Regards,
> Anjana 
>
> On Wednesday, January 3, 2024 at 10:25:25 PM UTC+5:30 Colin Alworth wrote:
>
> (I wrote a longer reply, but Google Groups ate it and never posted it, so 
> apologies for brevity here):
>
> Without more information, it is hard to give a specific answer - are you 
> just hoping to update the Java version and make no changes to the 
> application? It might be that nothing at all needs to be done. If you're 
> using GWT-RPC, you might have no changes to make at all, or you might need 
> an --add-opens jvm arg for a few specific classes (fix to be released in 
> GWT 2.11). 
>
> On the other hand, if you're running the compiler or dev mode on Java 17, 
> other changes are likely needed, due to dependencies that have changed with 
> the Java update.
>
> GWT 2.4.0 was released just over 12 years ago, and was intended to run on 
> Java 6 - even Java 8 will only be ten years old in about two months.
>
> On Wednesday, January 3, 2024 at 8:40:28 AM UTC-6 anjana....@gmail.com 
> wrote:
>
> Hi Team,
>
> Due to some business constraints our application is still running on old 
> GWT.2.4.0 and now we wanted to upgrade java version of our application to 
> JDK 17.  is it possible to run GWT.2.4.0 on an application which uses JDK 
> 17? if yes, can you please guide me with the helpful  resources for the 
> same?
>
> Thanks,
> Anjana
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/70a12658-e9ac-4e61-a1e8-9c6619406717n%40googlegroups.com.

Reply via email to