Friday, April 26, 2024

Re: Seeking Advice on Legacy Application Migration Strategy

You might run into issues with such an old version of GXT when using a new GWT version - take a look at https://groups.google.com/g/google-web-toolkit/c/If897MPqvw0/m/bSWnmuz9BwAJ for a summary of how to update GXT 2.3.1a-gwt22.

With GWT updated to 2.9.0 or beyond, you will be able to run on Java 11 (see https://www.gwtproject.org/release-notes.html#Release_Notes_2_9_0).




On Friday, April 26, 2024 at 7:59:27 AM UTC-5 wejden...@gmail.com wrote:
Many thanks @frank Hossfeld, 
I am so excited to start it .. it is clear 
please feel free to share any references or links that can help me in that adventure .

thank you
wm

Le ven. 26 avr. 2024 à 11:50, 'Frank Hossfeld' via GWT Users <google-we...@googlegroups.com> a écrit :
GWT 2.8.2 is pretty old - nearly seven years - and i am not sure, if the GWT 2.8.2 will work with Java 11

Migrating to the latest version of GWT will give you some benefits. IIRC GWT 2.8.2 generates at least 5 JS-files where GWT 2.11.0 only generates 2. This will speed up the build. Also, there is a security issue in older GWT versions (in case you are using RPC). 

To do so, separate your code in client-, shared- and server-modules (as Craig already mentioned).  Take a look here: https://github.com/tbroyer/gwt-maven-archetypes or here https://github.com/NaluKit/gwt-maven-springboot-archetype. This should give you an idea, how your project look like after the separation. Once done, it should be possible to use different Java versions on the client and server side.

Once you have separate your code, you can update the GWT version. My first step would be to update to GWT 2.10.0. I would do this, because to GWT 2.10.0 works with the old javax stuff on the server side and give you the opportunity to patch GXT without updating the server stuff.  (IIRC you need to patch two classes). After the patch you can move to GWT 2.11.0 and Java 11 and fix the other issues by updating versions, etc.

Wejden Mrabti schrieb am Freitag, 26. April 2024 um 09:12:33 UTC+2:
thank you for your answer @craig Mitchell
if i want to continue hibernate 6 , how to do launch gwt application on java 11 ? 
is it possible to continue working like this ? what do you think?
Le vendredi 26 avril 2024 à 02:22:52 UTC+2, Craig Mitchell a écrit :
It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/a91eb3fa-af37-4c37-bc61-010bbd151763n%40googlegroups.com.


--
Best Regards,
Wejden MRABTI

Ingénieur étude et développement

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/6c9f0417-4999-433e-8c97-0dfadf5ee1c1n%40googlegroups.com.

Re: Seeking Advice on Legacy Application Migration Strategy

Many thanks @frank Hossfeld, 
I am so excited to start it .. it is clear 
please feel free to share any references or links that can help me in that adventure .

thank you
wm

Le ven. 26 avr. 2024 à 11:50, 'Frank Hossfeld' via GWT Users <google-web-toolkit@googlegroups.com> a écrit :
GWT 2.8.2 is pretty old - nearly seven years - and i am not sure, if the GWT 2.8.2 will work with Java 11

Migrating to the latest version of GWT will give you some benefits. IIRC GWT 2.8.2 generates at least 5 JS-files where GWT 2.11.0 only generates 2. This will speed up the build. Also, there is a security issue in older GWT versions (in case you are using RPC). 

To do so, separate your code in client-, shared- and server-modules (as Craig already mentioned).  Take a look here: https://github.com/tbroyer/gwt-maven-archetypes or here https://github.com/NaluKit/gwt-maven-springboot-archetype. This should give you an idea, how your project look like after the separation. Once done, it should be possible to use different Java versions on the client and server side.

Once you have separate your code, you can update the GWT version. My first step would be to update to GWT 2.10.0. I would do this, because to GWT 2.10.0 works with the old javax stuff on the server side and give you the opportunity to patch GXT without updating the server stuff.  (IIRC you need to patch two classes). After the patch you can move to GWT 2.11.0 and Java 11 and fix the other issues by updating versions, etc.

Wejden Mrabti schrieb am Freitag, 26. April 2024 um 09:12:33 UTC+2:
thank you for your answer @craig Mitchell
if i want to continue hibernate 6 , how to do launch gwt application on java 11 ? 
is it possible to continue working like this ? what do you think?
Le vendredi 26 avril 2024 à 02:22:52 UTC+2, Craig Mitchell a écrit :
It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/a91eb3fa-af37-4c37-bc61-010bbd151763n%40googlegroups.com.


--
Best Regards,
Wejden MRABTI

Ingénieur étude et développement

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CADMk%2BV%2BKpb89x9QN2%3DqXoaK3MDrtMN%2BMss%2BJ7CQ1YrevYr8q1w%40mail.gmail.com.

Re: Seeking Advice on Legacy Application Migration Strategy

GWT 2.8.2 is pretty old - nearly seven years - and i am not sure, if the GWT 2.8.2 will work with Java 11

Migrating to the latest version of GWT will give you some benefits. IIRC GWT 2.8.2 generates at least 5 JS-files where GWT 2.11.0 only generates 2. This will speed up the build. Also, there is a security issue in older GWT versions (in case you are using RPC). 

To do so, separate your code in client-, shared- and server-modules (as Craig already mentioned).  Take a look here: https://github.com/tbroyer/gwt-maven-archetypes or here https://github.com/NaluKit/gwt-maven-springboot-archetype. This should give you an idea, how your project look like after the separation. Once done, it should be possible to use different Java versions on the client and server side.

Once you have separate your code, you can update the GWT version. My first step would be to update to GWT 2.10.0. I would do this, because to GWT 2.10.0 works with the old javax stuff on the server side and give you the opportunity to patch GXT without updating the server stuff.  (IIRC you need to patch two classes). After the patch you can move to GWT 2.11.0 and Java 11 and fix the other issues by updating versions, etc.

Wejden Mrabti schrieb am Freitag, 26. April 2024 um 09:12:33 UTC+2:
thank you for your answer @craig Mitchell
if i want to continue hibernate 6 , how to do launch gwt application on java 11 ? 
is it possible to continue working like this ? what do you think?
Le vendredi 26 avril 2024 à 02:22:52 UTC+2, Craig Mitchell a écrit :
It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/a91eb3fa-af37-4c37-bc61-010bbd151763n%40googlegroups.com.

Re: Seeking Advice on Legacy Application Migration Strategy

thank you for your answer @craig Mitchell
if i want to continue hibernate 6 , how to do launch gwt application on java 11 ? 
is it possible to continue working like this ? what do you think?
Le vendredi 26 avril 2024 à 02:22:52 UTC+2, Craig Mitchell a écrit :
It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/5e426237-abc7-4ead-bb46-7963e9891d00n%40googlegroups.com.

Thursday, April 25, 2024

Re: Seeking Advice on Legacy Application Migration Strategy

It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/e72ddd8b-24f3-41dd-b4fa-52d2f860f07cn%40googlegroups.com.

Seeking Advice on Legacy Application Migration Strategy

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/dea97a11-0e1d-471a-8de6-9b92a79f0187n%40googlegroups.com.

Friday, April 19, 2024

Learn more about our updated Terms of Service

vaughnjjoan@gmail.com

We're updating our Terms of Service on May 22, 2024, so we wanted to let you know ahead of time.

These changes won't affect the way you use our services, but they should help make it easier for you to understand what to expect from Google — and what we expect from you — as you use our services.

You can see the new terms here. We also summarized the changes at the bottom of this email.

What do I need to do?

  • If you're under the age required to manage your own Google Account:
    • We sent this email to your parent or guardian so that they can help you understand our updates better.
    • Please discuss this email with your parent or guardian to decide if you need to do anything different with your account.
  • If you're a parent or guardian, and you allow your child to use the services:
    • Please review the updates to our terms with your child and help them decide whether they need to make any changes to their account.
    • Please remember that these terms apply to you and you're responsible for your child's activity on the services.
  • If you're the administrator of a Google Workspace corporate or educational account and you've enabled your users to access Google Additional Services:
    • Our new Terms of Service won't affect the Google Workspace agreement between Google and your organization. These new terms will only apply to those users to whom you've given access to Google Additional Services. You can always manage whether your users have access to Google Additional Services, and which ones, in your Admin console.
  • If you're a Google Workspace reseller whose customers have enabled their users to access Google Additional Services:
    • Our new Terms of Service won't affect your Google Workspace agreement with your customers. These new terms will only apply to your customers' users who've been given access to Google Additional Services. Your customers can always manage whether their users have access to Google Additional Services, and which ones, in their Admin console.
  • If you're any other user of the services:
    • Please read this email to understand our updated terms and your options for further action.
    • If you agree to the new terms, no further action is needed.

What's changing?

You can review the new Google Terms of Service here. At a glance, here's what this update covers:

  • Generative AI terms. We're moving our existing Generative AI Additional Terms to our main Terms of Service and adding other AI-related clarifications. For example – we won't claim ownership over original content generated by our AI-powered services.
  • More clarity on abusive activity. We're providing more examples and details about abuse and interference with our services that isn't allowed.
  • More details on limitations of liability. For users outside the US, we're adding clarifications to our limitations of liability and indemnity sections to avoid any misunderstandings in light of local laws or customs.
  • More clarity on disputes. We're clarifying that if you violate our terms, our remedies aren't limited to suspension or termination of your access to the services, but may include other remedies under applicable law. If problems or disputes arise between us about these terms, you'll have the opportunity to describe the issues and address them.
  • Updates to reflect how our services work. We're adding language about how our services work, and updating certain Google service brand names that have changed over time.
  • For users based in the European Economic Area (EEA) only:

If you don't agree to the new terms, you should remove your content and stop using the services. You can also end your relationship with us at any time, without penalty, by closing your Google Account.

Thank you for using Google services!

© 2024 Google Ireland Ltd, Gordon House, Barrow Street, Dublin 4, Ireland.

You have received this email to update you about important changes to Google's Terms of Service.

Monday, April 15, 2024

Re: Help to undrerstand how to use domino-jackson and the annotation JSONMapper

Are you certain, that the annotation processor had ran?
I have not digged into domino-jackson, but I think, the @JsonMapper annotation triggers a annotation processor. The generated classes will be found under  'target/generated-sources/annotatins'

Marco Tenti (IoProgrammo88) schrieb am Montag, 15. April 2024 um 09:16:49 UTC+2:
The problem i cannot find the generate class "Person_MapperImpl" is under the target folder somewhere ?

Il giorno venerdì 12 aprile 2024 alle 18:25:30 UTC+2 Thomas Broyer ha scritto:
Aren't you supposed to directly use the generated class rather than using GWT.create() ? (unless you also added a <replace-with> in your gwt.xml)
On Friday, April 12, 2024 at 1:20:27 PM UTC+2 tenti...@gmail.com wrote:
I'm upgrading a old project and i want to replace the old gwt-jackson (https://dominokit.com/solutions/domino-jackson/v1)  with the domino-jackson project (https://github.com/DominoKit/domino-jackson).

It should be a simple transiction, but i cannot understand how to let the GWT compilation "see" the implementations classes of the ObjectMapper interface.

Here the "old" code from gwt-jackson

public static interface AltriMetadatiDTOMapper extends com.github.nmorel.gwtjackson.client.ObjectMapper<Map<String,List<MetadatoDTOGWT>>> {} 

 ... 

 AltriMetadatiDTOMapper altriMetadatiDTOMapper = GWT.create(AltriMetadatiDTOMapper.class); String jsonAltriMetadati = altriMetadatiDTOMapper.write(object);

Here the "new" code from domino-jackson

@org.dominokit.jackson.annotation.JSONMapper public interface AltriMetadatiDTOMapper extends org.dominokit.jackson.ObjectMapper<Map<String,List<MetadatoDTOGWT>>> {}

 ... 

 AltriMetadatiDTOMapper altriMetadatiDTOMapper = GWT.create(AltriMetadatiDTOMappe.class); String jsonAltriMetadati = altriMetadatiDTOMapper.write(object);

but it give to me this error

[ERROR] Errors in 'xxx.java' [INFO] [ERROR] Line 662: Rebind result 'xxx.AltriMetadatiDTOMapper' must be a class

Did anyone know what i'm doing wrong ?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/b1089cf5-e4fc-4032-a588-b6bbb73a94dfn%40googlegroups.com.

Re: Help to undrerstand how to use domino-jackson and the annotation JSONMapper

Are you certain, that the annotation processor already run?
I have not digged into domino-jackson, but I think, the @JsonMapper annotation triggers a annotation processor. The generated classes will be found under  'target/generated-sources/annotatins'


Marco Tenti (IoProgrammo88) schrieb am Montag, 15. April 2024 um 09:16:49 UTC+2:
The problem i cannot find the generate class "Person_MapperImpl" is under the target folder somewhere ?

Il giorno venerdì 12 aprile 2024 alle 18:25:30 UTC+2 Thomas Broyer ha scritto:
Aren't you supposed to directly use the generated class rather than using GWT.create() ? (unless you also added a <replace-with> in your gwt.xml)
On Friday, April 12, 2024 at 1:20:27 PM UTC+2 tenti...@gmail.com wrote:
I'm upgrading a old project and i want to replace the old gwt-jackson (https://dominokit.com/solutions/domino-jackson/v1)  with the domino-jackson project (https://github.com/DominoKit/domino-jackson).

It should be a simple transiction, but i cannot understand how to let the GWT compilation "see" the implementations classes of the ObjectMapper interface.

Here the "old" code from gwt-jackson

public static interface AltriMetadatiDTOMapper extends com.github.nmorel.gwtjackson.client.ObjectMapper<Map<String,List<MetadatoDTOGWT>>> {} 

 ... 

 AltriMetadatiDTOMapper altriMetadatiDTOMapper = GWT.create(AltriMetadatiDTOMapper.class); String jsonAltriMetadati = altriMetadatiDTOMapper.write(object);

Here the "new" code from domino-jackson

@org.dominokit.jackson.annotation.JSONMapper public interface AltriMetadatiDTOMapper extends org.dominokit.jackson.ObjectMapper<Map<String,List<MetadatoDTOGWT>>> {}

 ... 

 AltriMetadatiDTOMapper altriMetadatiDTOMapper = GWT.create(AltriMetadatiDTOMappe.class); String jsonAltriMetadati = altriMetadatiDTOMapper.write(object);

but it give to me this error

[ERROR] Errors in 'xxx.java' [INFO] [ERROR] Line 662: Rebind result 'xxx.AltriMetadatiDTOMapper' must be a class

Did anyone know what i'm doing wrong ?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/bd148277-b238-46d0-8448-8d3c5f4009bbn%40googlegroups.com.

Re: Really need help getting CodeServer to run with Java 11 and GWT 2.10

Note sure if this will gelp you much - we're a Gradle user, and don't use intellij. But the basic principles are the same.

When we migrated to the latest GWT we also updated our top level gradle build file to have a gwtSuperDev task which does all the heavy lifting for us:

    task gwtSuperDev(dependsOn: 'build') {
        // probably a nicer way of getting these (e.g through project sourcepaths)
        def gwtapi_src = file('tas/gwtapi/src')
        def webui_src = file('webui/src')

        doLast {
            def compilerArgs = [
                        "-strict", "-noincremental", "-noprecompile",
                        "-src", "${gwtapi_src}/",
                        "-src", "${webui_src}/",
                        "com.ascert.webui.vt.VtWebUi-dev"
                        ]

            javaexec {
                main = 'com.google.gwt.dev.codeserver.CodeServer'
                // Leverage the Gradle create classpaths for gwtapi and webui subprojects
                // Make sure GWT build libs are at the front to ensure the vanilla GWT jetty classes are used by codeserver
                classpath += configurations.gwtBuild
                // These classpaths will duplicate some of the above, but doing this way ensures our custom jetty does not get
                // picked up by GWT codeserver, which causes class inconsistencies.
                classpath += project(':proj:webui').configurations.compileClasspath
                classpath += project(':proj:tas:gwtapi').configurations.compileClasspath

                maxHeapSize = "1000m"

                args = compilerArgs.flatten()
            }
        }
    }

Our 2 main source trees are defined by gwtapi_src and webui_src. The com.ascert.webui.vt.VtWebUi-dev is our dev GWT XML file name. It's slightly different to our prod one as it has debug flags on and only creates a single large permutation.

That's really the main part. We also have the source modules on the classpath as :proj:webui and :proj:gwtapi - for reasons as per the comments.

The only other crucial part is the configurations.gwtBuild. This is a gradle configuration with all the JARs needed for codeserver (gwt_dev, gwt_user, various js lib jars such as GXT etc.). It's really just a convenient way of handling classpath JARs and nothing more. If/when we update the versions of any of those, the above automatically pulls in the updated dependency versions.

There's really nothing that special about CodeServer apart from making sure all your own sources and JARs are on the classpath, plus the standard GWT ones and any 3rd party libs you use. Although the above is for Gradle, the same principles and approach ought to apply for MVN or any other build tool.

Good luck!

-Rob


On Monday 15 April 2024 at 10:13:19 UTC+1 Mathias wrote:
Hi Thomas

unfortunately, I'm still stuck. I thought I'd attack the Lombok dependency first, since that's a third-party it depends on. I don't suppose you've ever been exposed to that? 
I tried setting the 
<classpathScope>compile</classpathScope> to the "configuration" setting of the plugin def in pluginmanagement of the root pom. That didn't help. (neither compile+runtime)

In the intellij GWT-plugin I got it working while running by setting the argument "-javaagent:/...path..../lombok-1.16.14.jar=ECJ , not sure if that could change anything. I mean this breaks at compile so I don't know.

I have gone through the configuration line-by line with both your archetype project and the NaluKit Marco tipped me about. I can't see any relevant difference. I don't have <type>gwt-lib</type> on any dependency, but neither does any of the other projects I look at.

I also tried adding lombok dependency to the plugin, it didn't help either.

I am basically stuck, this is not great. Would you have time to look at the plugin config if I pasted it?

On Friday 12 April 2024 at 11:20:01 UTC+2 Thomas Broyer wrote:
On Friday, April 12, 2024 at 7:50:42 AM UTC+2 Mathias wrote:
-My dependencies should be ok since i can build it with the plugin, so i'm a bit at a loss as to how make this work.

Dependencies for gwt:compile and gwt:codeserver aren't the same: https://tbroyer.github.io/gwt-maven-plugin/codeserver.html
You might have to either adjust the <scope> of dependencies (e.g. from provided to compile) or adjust the gwt:codeserver's classpathScope (e.g. from runtime to compile+runtime or compile)
 
as a final aside:
The "neither a gwt-lib or jar" warning messages in the error log below - i still get it if i add the gwt-lib type to the dependency, and the archetype project prints the same error when created.

Note that it's an info, not a warning 😉

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/ec616909-c88d-4c00-b164-3f1b7795bd86n%40googlegroups.com.

Re: Really need help getting CodeServer to run with Java 11 and GWT 2.10

Hi Thomas

unfortunately, I'm still stuck. I thought I'd attack the Lombok dependency first, since that's a third-party it depends on. I don't suppose you've ever been exposed to that? 
I tried setting the 
<classpathScope>compile</classpathScope> to the "configuration" setting of the plugin def in pluginmanagement of the root pom. That didn't help. (neither compile+runtime)

In the intellij GWT-plugin I got it working while running by setting the argument "-javaagent:/...path..../lombok-1.16.14.jar=ECJ , not sure if that could change anything. I mean this breaks at compile so I don't know.

I have gone through the configuration line-by line with both your archetype project and the NaluKit Marco tipped me about. I can't see any relevant difference. I don't have <type>gwt-lib</type> on any dependency, but neither does any of the other projects I look at.

I also tried adding lombok dependency to the plugin, it didn't help either.

I am basically stuck, this is not great. Would you have time to look at the plugin config if I pasted it?

On Friday 12 April 2024 at 11:20:01 UTC+2 Thomas Broyer wrote:
On Friday, April 12, 2024 at 7:50:42 AM UTC+2 Mathias wrote:
-My dependencies should be ok since i can build it with the plugin, so i'm a bit at a loss as to how make this work.

Dependencies for gwt:compile and gwt:codeserver aren't the same: https://tbroyer.github.io/gwt-maven-plugin/codeserver.html
You might have to either adjust the <scope> of dependencies (e.g. from provided to compile) or adjust the gwt:codeserver's classpathScope (e.g. from runtime to compile+runtime or compile)
 
as a final aside:
The "neither a gwt-lib or jar" warning messages in the error log below - i still get it if i add the gwt-lib type to the dependency, and the archetype project prints the same error when created.

Note that it's an info, not a warning 😉

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/7ae59c63-c4a1-44a2-8d96-f1734a52708cn%40googlegroups.com.

Re: NoClassDefFoundError on a particular class while running gwt:codeserver

Hi everyone,

@Tbroyer : I ended up change the scope of my hibernate dependencies to runtime and now it is working fine.
@Jens, just by changing the scope to runtime, with the version I specified. it is working.

thanks all for the tips.


Mnamo Ijumaa, 5 Aprili 2024 saa 10:06:46 UTC-3 Thomas Broyer aliandika:
On Thursday, April 4, 2024 at 9:29:21 PM UTC+2 dja...@gmail.com wrote:
Hi,

I can't seem to be able to point out what dependency I am missing while trying to run my gwt application in Devmode with gwt:codeserver.
I can  build the program, compile it and deploy it without a problem. However when I am trying to run it in devmode I am having this error :
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl

I have included all dependencies related to hibernate in my pom.xml with the right versions of dependency I believe. 
What am I missing?

If it builds but does not "run" then it's likely a dependency scoping issue: https://tbroyer.github.io/gwt-maven-plugin/codeserver.html
Your Hibernate dependencies have <scope>provided</scope> so I would bet on that.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/87200c4c-5ad6-4c11-9462-3f586321051fn%40googlegroups.com.

Re: Problems moving JsInterop from GWT 2.7 to 2.8

" I also solved the problem of List and Map with an own Interface, which is an ArrayList/HashMap on serverside and an own implemented native List/Map on gwt side" can you share the solution ?

Il giorno venerdì 29 settembre 2017 alle 14:00:12 UTC+2 Ignacio Baca Moreno-Torres ha scritto:
We have been using this technique for more than a year and it works perfectly. We call it "Java Notation Object", hehe and you should understand the limitations, which more or less you are currently fulfilling. Just a few changes...

The most important, yes, you should use @JsType(isNative=true,namespace=GLOBAL,name="Object"), so you are actually ignoring any kind of typing, so this is more a "scheme" of where to find things than an actual typed object. This is pretty important! This is pretty similar to JSON but in Java, and these classes are not actually Java classes, are just a scheme. All these limitations are the common intersection of the feature between Java and JS.

You can do some tricks to use collections but we end up removing all of them and using arrays instead. But, to make it easy to work with, we added some @JsOverlay to return or set the Collection. For example if you have "String[] roles" you can add "@JsOverlay getRoleSet() { return Stream.of(roles).collecto(toSet()); }". Overlays are ok bc there are just like extension method or static method, so no behavior is added to the object.

This work perfectly on both sides, but there is a small annoying difference between GWT and Java, in java new Foo() will initialize primitive types and in GWT (js) will not. So we never use constructor directly, in the kind of classes we always add a static factory method and we initialize any non-nullable field, even primitives! So in java you are actually creating the object of the specified type, but in JS you are just calling "new Object()", but it is ok, bc where are using a scheme, no a type. And we never use instanceof on these schemes! This will work on the Java side, but I strongly discourage, you should not need to do that.

Finally, we never use getter and setter, don't make sense, you "cannot use inheritance" (you can use with some ticks too, for example using some int or string field as the type indicator and using, for example, the visitor pattern to traverse, this is what actually people need to do in JS so, no magic just the common intersection of features between java and json), almost everything is like final and you must not add behavior, so it is much explicit and easier to just make all field public.

I think the first you should do is removing getters and setters, and add @JsType(native,Object) to all your types, this refactor can be done almost instantly in your IDE (inline method). Then stop using Collection might not be so easy to refactor. So you might continue using it either using overlays or creating a custom jsinterop-compatible type. In this case, I recommend to not to use the whole java.util API bc it will force you to export the whole API and use generateJsInteropExports. If you are really interested or need help there just ask, but just try out avoiding maps, and using arrays. Anyways, the "Map/List own interface" should work too, just neet to make it work.

On Fri, Sep 29, 2017 at 12:53 PM Thomas Broyer <t.br...@gmail.com> wrote:


On Friday, September 29, 2017 at 11:09:42 AM UTC+2, Jürgen Beringer wrote:
Hey,

currently  I tried the 2. time to move our application from gwt 2.7 to gwt 2.8, but I have big problems with the changes of JsInterop.

The application contains a serverside java part, running in a jetty and the client part, build with gwt, so I can reuse many software on server and client side. (It is the main part of the website  www.spreadshirt.com )
To use also the same data classes (containing only fields with getter and setter, no other methods) on both sides, I used JsInterop and it works very well with gwt 2.7 and exchanged the data as json.

Example Data class:

@JsType
public class MyObject {
   
private String id;
   
   
@JsProperty
   
public String getId() {
       
return id;
   
}
   
@JsProperty
   
public void setId(String id) {
       
this.id = id;
   
}
}


The class can be used on server side like any normal java class with any REST Framework. On gwt side I was able to convert a transmitted json to the class with:


MyObject myObject = getJsTypeObject(JsonUtils.safeEval(jsonString));
//use getter and setter to access fields

public static native <T> T getJsTypeObject(JavaScriptObject result)/*-{
    return result;
}-*/
;


And to create Objects on gwt side and send them to the server as json:

MyObject myObject = new MyObject();
myObject
.setId("1");
String jsonString = stringify(myObject);


public static final native String stringify(Object result) /*-{
    return JSON.stringify(result);
}-*/
;


I also solved the problem of List and Map with an own Interface, which is an ArrayList/HashMap on serverside and an own implemented native List/Map on gwt side.

The application has more than 100 such Objects which are heavily used on server and client side in many methods which are also be used on both sides. So implementing them twice for server and client side would be a big overhead.
Now is my question, how can I convert this gwt 2.7 code to gwt 2.8 (mainly to be able to use Java8 syntax in future). I tried multiple variants, but it seems for me, JsInterop in gwt 2.8 is not planned for such usecases which were possible in gwt 2.7 withou any problems.
I can either use a native Javascript Object in gwt (native=true) or a in GWT created Object in Javascript. But I see no solution to do both with the same Type.

I get 2 Problems
  • Casting issues: I can't use native=true because I also want to create such Objects on gwt side, so on every assignment (jsonString to typed variable) I get a cast exception and at least in superdev mode I can't deactivate the cast exceptions
If you never do "instanceof" (or expect cast exceptions) on client-side, you could probably use isNative=true,namespace=GLOBAL,name="Object"; that way, all your objects are plain old JS objects (no specific class/constructor is generated in JS), which is actually exactly what you'd expect from JSON.parse().
  • field name problems: The jsonString of the last example is {"id_g_$3":"1"} and not {"id":"1"} because the JsProperty for getter and setter works only fine with native objects. If I add JsProperty to the field itself, I can't do have JsProperty for the getter and setter, so I have to add JsIgnore to them. But then when I work with native Objects I can't use the getter and setter on gwt side. I would need JsProperty on getter, setter and the field itself, but this is also not allowed.

The "id_g_$3" is probably because you don't -generateJsInteropExports; contrary to 2.7, in 2.8, the "don't obfuscate @JsProperty/@JsMethod names" only applies when you -generateJsInteropExports.
But if you switch to isNative=true,namespace=GLOBAL,name="Object", you don't even need it.

--
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-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/86e08739-184f-45fa-82e1-0c9965f65e2en%40googlegroups.com.