GWT compilation issue with jdk 17

288 views
Skip to first unread message

NIKITAH

unread,
Jul 20, 2023, 5:41:38 AM7/20/23
to GWT Users
Hi , 

I am trying to compile GWT with JDK17.
As per https://www.gwtproject.org/release-notes.html#Release_Notes_2_10_0 , I came to know that GWT2.10.0 is compatible with JDK17 and hence I updated the same in my project .

Now, facing issue with gwtp-dispatch-rest-1.4.jar like : 
[ERROR] Line 24: The import javax.ws.rs.core.HttpHeaders cannot be resolved
[ERROR] Line 95: HttpHeaders cannot be resolved to a variable

Can someone please help and let me know which version of gwtp-dispatch-rest-*.jar is compatible with JDK 17 .

Thanks in advance .

NIKITAH

unread,
Jul 21, 2023, 5:52:55 AM7/21/23
to GWT Users

Just FYI , I've already tried with  gwtp-dispatch-rest-1.6.jar and facing the same issue  " The import javax.ws.rs.core.HttpHeaders cannot be resolved" .
As , we are aware in jdk17 we are using Jakarta API means  HttPheaders is now moved to jakarta.ws.rs.core.HttpHeaders . 
So , wanted to know if there is any gwtp-dispatch-rest jar with JDK 17.

Thomas Broyer

unread,
Jul 21, 2023, 6:28:59 AM7/21/23
to GWT Users
Two things:

  • using JDK 17 doesn't mean you have to use Jakarta EE 9+, Java EE 8 / Jakarta EE 8 should still work just fine. You may have also changed your server to a Jakarta EE 9+ version, but that's (almost) independent from using JDK 17
  • GWTP is long dead; at least one year before the Javax/Jakarta mess was even announced (except for one never-released commit in Sept. 2018)
Legacy projects should stay on "legacy" Java EE (or Jakarta EE 8), or migrate away from legacy/abandoned libs and frameworks that lock them to Java EE.

NIKITAH

unread,
Jul 21, 2023, 6:51:32 AM7/21/23
to GWT Users
Yes , we are using  jakartaee-api : 9.0.0 . So can you please suggest which version of gwtp-dispatch-rest-*.jar will be compatible with Jakarta 9.0 ?

Thomas Broyer

unread,
Jul 21, 2023, 8:55:36 AM7/21/23
to GWT Users
On Friday, July 21, 2023 at 12:51:32 PM UTC+2 NIKITAH wrote:
Yes , we are using  jakartaee-api : 9.0.0 . So can you please suggest which version of gwtp-dispatch-rest-*.jar will be compatible with Jakarta 9.0 ?

None!

Repeating myself here: 
  • GWTP is long dead; at least one year before the Javax/Jakarta mess was even announced (except for one never-released commit in Sept. 2018)
Legacy projects should stay on "legacy" Java EE (or Jakarta EE 8), or migrate away from legacy/abandoned libs and frameworks that lock them to Java EE.

Now paraphrasing myself, you have to either:
  • stay on Jakarta EE 8 (or earlier Java EE)
  • rewrite the whole thing to remove GWTP
  • transform GWTP to Jakarta EE 9+ with the help of tools like Eclipse Transformer

NIKITAH

unread,
Jul 21, 2023, 9:03:56 AM7/21/23
to GWT Users
Thank you Thomas for your guidance .

Colin Alworth

unread,
Jul 21, 2023, 10:44:12 AM7/21/23
to GWT Users
There is community work underway to update GWT-RPC itself to use jakarta.servlet packages, and the same idea could be applied to gwtplatform. Unfortunately, the gwtplatform.com domain is still owned, so any fork could not take over the groupid, but would need to pick a new one, which might cause some irritation when upgrading. I do see that the domain is scheduled to expire next year, but that probably isn't long enough to wait. It might be possible to contact the former owners to get permission for this work to be published as well. If you take that route, I'd be interested in being involved.

I've used the eclipse transformer before, and personally found it to be more trouble that it is worth.
Reply all
Reply to author
Forward
0 new messages