I should elaborate, the main issue I'm running into is having to do with 
upgrading to Spring 6 / Jakarta Servlet 6. I'm trying to use either Tomcat 
10.1 or Jetty 11 to launch the container service with Gradle tasks and the 
org.docstr.gwt:1.1.30 plugins and org.gretty:4.1.6 plugins with GWT 2.12.1. 
I've tried many different combinations of configurations and plugins, but 
ultimately run into this error every time: 
java.lang.NoClassDefFoundError: 
org/eclipse/jetty/server/handler/ContextHandler$Context
On Wednesday, March 12, 2025 at 3:01:50 PM UTC-5 Dyllan Sowers wrote:

> Thanks for the suggestion, Michael. Do you know of any examples of anyone 
> successfully doing this? I've found one older example but have been running 
> into issues trying to port it over to a more recent Jetty plugin and Gradle 
> version. 
> https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests-gwt/build.gradle
>  
> On Tuesday, March 11, 2025 at 1:09:36 PM UTC-5 Michael Conrad wrote:
>
>> You might want to look into using Gradle Gretty plugin for the container 
>> service in combination with starting up SuperDevMode via command line.
>>
>> On 3/11/25 12:41, Dyllan Sowers wrote:
>>
>> Does anyone have an example of how to setup the embedded server with dev 
>> mode, or even better, super dev mode? I'm upgrading a large Gradle-based 
>> enterprise application from Spring 5 to Spring 6 and migrated from javax to 
>> jakarta and have had constant issues from Jetty's compatibility problems. 
>>
>> Any pointers would be a tremendous help. I'm currently trying to use 
>> tomcat-catalina-10.1 as the embedded server but have not been able to get 
>> it to start properly. 
>>
>> On Monday, June 17, 2024 at 9:09:58 PM UTC-5 Craig Mitchell wrote:
>>
>>> It's when you see crazy long command lines like that, you start to 
>>> appreaciate Maven (or Gradle).  The same command in Maven is "mvn 
>>> gwt:codeserver -pl *-client" (yes, I know you see still need to setup 
>>> the launcherDir, warDir, etc in the pom.xml files, but that seems much 
>>> easier than one huge command line).
>>>
>>> On Tuesday 18 June 2024 at 2:17:26 am UTC+10 Jens wrote:
>>>
>>>> > If using maven... [I'm not]... If not, please give us more detail 
>>>> about what you are using (or intend to use).
>>>> After further investigation, much of my issues around this seem to be 
>>>> that the. appropriate java command to run the web app (or Jetty itself) is 
>>>> not being assembled correctly by either Eclipse, the GWT plugin, or both. 
>>>>  There are various options that are needed and are not properly set.  That 
>>>> said, even if I do/can get that working, I don't think that's the right 
>>>> approach.  As you're going to deprecate the embedded Jetty server, I 
>>>> should 
>>>> do whatever is needed there to run my own external server(s).  That's 
>>>> what's unclear to me.  There are ancient references to it in the 
>>>> documentation at gwt.project.org, but I'm unclear on what is really 
>>>> needed.  Do I need to set up and run a code server with my own Jetty or 
>>>> Tomcat local installation?  If so, how is that set up?  Or do I need to 
>>>> run 
>>>> my own app server (again, either Jetty or Tomcat).  The web app setup is 
>>>> obvious (I think... or are there special runtime parameters to direct it 
>>>> to 
>>>> the proper code server port?).  Forgive my ignorance on this, but if this 
>>>> is the path forward for GWT in general, I'd really like to see some clear 
>>>> documentation on how to set this up or at least what it is going to look 
>>>> like (in general, no specifics, obviously it should involve thinking and 
>>>> work on my part). Last note: I am assuming the code server will be easier 
>>>> to get working with Java 17 modules because it will (in my case) have less 
>>>> jar dependencies, as it only needs them for shared and client code.  That 
>>>> said... I might need to run both externally to get it all sorted out. 
>>>>  Again, my own thinking on this isn't that clear because I'm not in the 
>>>> weeds enough on what the plugin is really doing and how things work under 
>>>> the hood.
>>>>
>>>> To give a shorter, more direct answer: I want to develop code in 
>>>> Eclipse in Java 17, and be able to run the code server and web app any way 
>>>> possible, so that GWT code compiles/recompiles as needed, and the web app 
>>>> can be accessed in the browser, and I can do iterative test-code-test-code 
>>>> development on a daily basis.
>>>>
>>>>
>>>> Traditionally GWT SDK only had the class com.google.gwt.dev.DevMode. It 
>>>> is responsible to launch classic dev mode (the one that does require an 
>>>> obsolete browser plugin) or SuperDevMode together with an embedded servlet 
>>>> container, by default Jetty. SuperDevMode is implemented in class 
>>>> com.google.gwt.dev.codeserver.CodeServer and DevMode basically calls this 
>>>> class if you request it to launch SuperDevMode (which is the default 
>>>> behavior). Class DevMode has a parameter "-noserver" which skips starting 
>>>> Jetty and assumes you have your own server and deployment running. Because 
>>>> we advocate running your own servlet container, e.g. Jetty/Tomcat/..., it 
>>>> is enough to just launch CodeServer yourself. However you could also 
>>>> continue to use class DevMode and replace the embedded Jetty with your own 
>>>> implementation using DevMode -server 
>>>> your.impl.of.ServletContainerLauncher. 
>>>> Your own implementation could then be based on Jetty 12 for example (and 
>>>> possibly jakarta)
>>>>
>>>> Personally I use Gradle and have a task that just launches CodeServer 
>>>> by executing a command line. I am pretty sure you could also write a 
>>>> similar ANT task using your current ANT setup. The command line looks like 
>>>>
>>>> com.google.gwt.dev.codeserver.CodeServer -sourceLevel 11 -strict 
>>>> -failOnError - bindAddress 0.0.0.0 -port 9876 -style PRETTY 
>>>> -XmethodNameDisplayMode ABBREVIATED -workDir 
>>>> /client-project/build/gwt/work 
>>>> -launcherDir /client-project/build/gwt/war -src 
>>>> /shared-project/src/main/java -src /shared-project/src/main/resources 
>>>> com.example.MyGwtModule
>>>>
>>>> The classpath should contain gwt-user/gwt-dev/gwt-codeserver, all 
>>>> compile-time dependencies you need for GWT compilation as well as classes 
>>>> + 
>>>> sources + resources related to your GWT UI and DTOs. You would need to use 
>>>> ANT fileset/dirset/files to include/exclude only the files of your single 
>>>> project that are relevant for GWT compilation. Once you have that set of 
>>>> files figured out you can run GWT CodeServer in isolation via ANT with its 
>>>> own GWT focused classpath and you should not have any trouble with other 
>>>> dependencies that you need on the server only.
>>>>
>>>> Once you have that running, you need to decide how you want to run a 
>>>> servlet container. Personaly I use Docker + docker-compose + Jetty image + 
>>>> shell script.
>>>>
>>>>  
>>>>
>>> -- 
>> 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 [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/google-web-toolkit/e391c8f6-c957-481a-bd83-8f9cf1803353n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit/e391c8f6-c957-481a-bd83-8f9cf1803353n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> &#8203;
>>
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit/279d54a8-834b-40c5-8f0e-3bc23ee54a7bn%40googlegroups.com.

Reply via email to