Re: is it possible to debug GWT projects (breakpoints, step through code etc) ?

2024-06-28 Thread 'tim_mac...@yahoo.co.uk' via GWT Users
This might be useful  github.com/timmacp/AppEngineGwt/tree/main
Its based on github.com/tbroyer/gwt-maven-archetypes 
& Google Cloud Platform samples for App Engine with Java 11+
github.com/GoogleCloudPlatform/java-docs-samples/tree/main/appengine-java11/appengine-simple-jetty-main
 which 
shows how to have a separate jar module which run the WAR using the  java 
command.
As in the GWT archetype it uses Jetty Maven Plugin for the development 
server & it covers Eclipse debugging,
appengine-maven-plugin is only for appengine:deploy

On Friday, June 28, 2024 at 2:50:21 PM UTC+1 Daniel Webb wrote:

> Hi Thomas,
> Aha!! You are correct, thank you - I have added it to my POM and now the 
> breakpoints are getting triggered :-)
>
> Is there a way of limiting this configuration to a specific run 
> configuration, or sometning? The way I have it set up I think the flags are 
> passed every time?
>
> 
>
> com.google.cloud.tools
>
> appengine-maven-plugin
>
> 2.7.0
>
> 
>
> 
>
>  >-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 jvmFlag>
>
> 
>
> 
>
> 
>
> On Friday 28 June 2024 at 13:34:03 UTC+1 Thomas Broyer wrote:
>
>> You need to pass the -agentlib:… as  of the appengine plugin, as 
>> it will fork a new JVM
>>
>> https://cloud.google.com/appengine/docs/legacy/standard/java/maven-reference#appenginerun
>>
>> On Thursday, June 27, 2024 at 7:15:26 PM UTC+2 dw...@cobwebb.com wrote:
>>
>>> Hi,
>>>
>>> Can anyone help me get remote jdwp server debugging in Eclipse working? 
>>> I seem to be able to get a server running but it won't halt on breakpoints.
>>>
>>> I run as.. "Maven Build" with goals of 'clean install appengine:run' and 
>>> vm arguments of 
>>> '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000'
>>> [image: run debug.png]
>>> [image: run debug 2.png]
>>>
>>> The Console says "Listening for transport dt_socket at address: 8000"
>>>
>>> Then I "Debug as..." "Remote Java Application"...
>>> [image: remote debug 1.png]
>>>
>>> And the console starts up again with the 'clean install appengine:run' 
>>> finishing up with the usual:
>>> Started NetworkTrafficSelectChannelConnector {HTTP/1.1, 
>>> (http/1.1)}{localhost:8080}
>>>
>>> At which point I can browse to http://localhost:8080 but none of my 
>>> breakpoints will trigger.
>>>
>>> Please, what am I doing wrong? I've not done java remote debugging 
>>> before :-(
>>> Regards
>>> Daniel
>>>
>>>
>>> On Thursday 27 June 2024 at 16:21:17 UTC+1 Daniel Webb wrote:
>>>
 Thanks Ralph, So it's source map debugging in chrome for the client 
 side, jdwp remote debugging for the server side.
   
 On Tuesday 25 June 2024 at 14:09:20 UTC+1 Ralph Fiergolla wrote:

> Hi! Unless you want to invest time and effort in getting eclipse 
> plugins up and running, I would suggest using your browser's development 
> tools (Ctrl+Shift+I in Chrome/Edge) to debug the client side. Thanks to 
> source maps it will show your JAVA source code when debugging. 
> To debug the server side, you need to start your server with "-Xdebug 
> -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" and create 
> a 
> debug configuration to connect to port 8000 in Eclipse.
> Good luck
> Ralph
>
> On Mon, Jun 24, 2024 at 11:19 AM 'Daniel Webb' via GWT Users <
> google-we...@googlegroups.com> wrote:
>
>> Hi, 
>> Is it possible to debug GWT projects - setting breakpoints and 
>> stepping through code? This would be server and/or client debugging.
>>
>> We've just had our internal GWT based app updated and it now uses 
>> maven to run (clean install appengine:run). The eclipse plugin based 
>> debugging technique that I used to use no longer seems to work.
>>
>> Thanks for any advice, I really like GWT but I'm lost as to how it 
>> all works!
>> Daniel
>>
>> -- 
>> 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/253e328a-484c-4c19-aaf7-e489780c3c0bn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/c30f8481-2b25-4d9c-aebf-8f7d46b7d218n%40googlegroups.com.


module java.base does not "opens java.lang" to unnamed module

2024-06-21 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
SInce upgrading to Java 11,  throwing a new IllegalArgumentException in an 
RPC server-side implementation gives  InaccessibleObjectException. It can 
be stopped by using a VM argument --add-opens, but apparently this is not 
recommended.
Can anyone  clarify ?

-- 
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/1fa6bb9c-1cd3-47d1-843f-f164367d39f0n%40googlegroups.com.


Re: GWT, Java 17, jakarta.servlet, Eclipse, GWT plugin

2024-06-12 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
This might help: its a different solution to the issue Craig dealt with.
Its an extension of the gwt multi-module sample with an embedded Jetty,
for Java 11 without Spring.
https://github.com/timmacp/AppEngineGwt/tree/main

On Wednesday, June 12, 2024 at 9:03:01 AM UTC+1 Wejden Mrabti wrote:

> hello!
> @Craig it looks great what you have done!
> @bob I am working on same migration acutally, It looks that the embedded 
> Jetty in GWT DevMode has been deprecated in GWT 2.11 due to classloader 
> issues and other complexities. To avoid these problems, you can try  
> transition to a dedicated servlet container like Jetty or Tomcat for both 
> development and production. You can deploy your war file using Docker or a 
> Maven plugin. Ensure that your development environment is set up to deploy 
> to this dedicated servlet container instead of using the embedded Jetty. 
> You can check the updated GWT Getting Started Guide  (
> https://www.gwtproject.org/gettingstarted-v2.html )for detailed 
> instructions on setting up your project and development environment, making 
> the transition from Java 8 to Java 17 smoother.
>
> Le mercredi 12 juin 2024 à 02:27:57 UTC+2, Craig Mitchell a écrit :
>
>> I would recommend creating a new project with everything that you want to 
>> use, get it working how you like, then use that as a template on how you 
>> will upgrade your existing project.
>>
>> For my project that I needed to upgrade from Java 8 to Java 17 (because 
>> Google App Engine dropped support for Java 8).  I decided I would go 
>> "all-in" and get it onto the latest of everything.  So I needed to switch 
>> to use Maven, switch to use a client/server/shared structure, switch to use 
>> my own server (I went with Undertow), and switch to use Jakarta.  I also 
>> decided to go with Spring Boot (as Google App Engine had examples for 
>> that), so I used 
>> https://github.com/NaluKit/gwt-maven-springboot-archetype to create a 
>> sample project, and used that as a guide on how to upgrade my existing 
>> project.  Oh, and I also switched from Eclipse to IntelliJ.
>>
>> It was a big job and a lot of work, but now everything is running 
>> beautifully, so worth it in the long run.
>>
>> On Wednesday 12 June 2024 at 8:01:47 am UTC+10 Bob Lacatena wrote:
>>
>>> I am wrestling with a massive effort that has been one stumbling block 
>>> after another. The core task is to convert a sadly monolithic and archaic 
>>> app from Java 8 to Java 17.
>>>
>>> My current subtask (maybe necessary, maybe not) is to convert everything 
>>> to use jakarta.servlet rather than javax.servlet, but when I try to declare 
>>> an import of com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet, 
>>> Eclipse just keeps replacing it with the "original" (non-jakarta) path.
>>>
>>> I was hoping I could solve this by renaming the gwt-servlet-jakarta.jar 
>>> file as gwt-servlet.jar, and putting that in war/WEB-INF/lib, but it 
>>> doesn't change the Eclipse behavior, AND it originally generated an error 
>>> that the size of that jar did not match the SDK... but after a clean-build 
>>> that problem (at least) went away.
>>>
>>> But my underlying problem is that I have classes that need to extend the 
>>> RemoteServiceServlet, and access the associated ServletContext, 
>>> HttpServletRequest, SerializationException and other classes that must all 
>>> be the jakarta (not javax) versions. 
>>>
>>> I can go back to using javax (and I'm not at all certain that the 
>>> Eclipse embedded Jatty server will use jakarta instead of javax, so maybe 
>>> jakarta won't work locally anyway)... but then I have to solve a problem 
>>> where GWT dev mode (with javax) gives me:
>>>
>>> Error occurred during initialization of boot layer
>>> java.lang.module.FindException: Module gwt.user not found, required by 
>>> com.x.myapp
>>>
>>> Or do I have to move into a world where I stop using the so-convenient 
>>> embedded Jetty and deploy to and run an external server?
>>>
>>> Any advice on what to do (or, preferably, a deeper understanding of what 
>>> is happening) would be greatly appreciated.
>>>
>>

-- 
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/960a7bb5-7443-4e97-94e7-3c8b822f4afan%40googlegroups.com.


Re: Hello Noob question

2024-03-12 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
I am hoping to continue using this with upgrade to gwt 2.11.0 , 
gwt-maven-plugin 1.1.0 , java source level 11.
I checked it as far as calling
Polymer.startLoading()
Polymer.importHref( .. )
No errors so far.

in module.gwt.xml  I presume you have:
  

did you add the dependency in the -client pom file?

  com.vaadin.polymer
  vaadin-gwt-polymer-elements
  1.9.3.1
 

On Tuesday, March 12, 2024 at 7:28:15 AM UTC Vijay H wrote:

> Created a starter using the modular-webapp archetype, and am trying to 
> change the client module to use polymer elements and running into these 
> sort of errors. Before I debug too far wanted to check if this is something 
> that is doable or even recommended. This is for a class project. 
>
> > Loading inherited module 'com.mycompany.mywebapp.App'
> > [INFO]   Loading inherited module 'com.vaadin.polymer.Elements'
> > [INFO]  [ERROR] Unable to find 
> 'com/vaadin/polymer/Elements.gwt.xml' on your classpath; could be a typo, 
> or maybe you forgot to include a classpath entry for source?
>
>
> thanks
> Vijay 
>

-- 
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/20efcc19-88ce-477f-8976-821357bfb92dn%40googlegroups.com.


Re: Had a problem trying GWT 2.11.0

2024-02-05 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
I also found that out eventually.
Another thing: The server module needs /target /jetty_overlays  folder for 
running env-prod.
 

On Sunday, February 4, 2024 at 5:43:59 PM UTC jamal@gmail.com wrote:

> After generating a project skeleton using the latest gwt-maven-archetypes 
> , done the usual:
> - mvn gwt:codeserver -pl *-client -am
> - mvn jetty:run -pl *-server -am -Denv=dev
>
> The first command executed without problems, however the second one failed 
> to start jetty showing on terminal the following error: 
>
> [*ERROR*] *SAX Parse Issue @null line:1 col:59 : 
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 59; 
> cvc-elt.1.a: Cannot find the declaration of element 'Configure'.*
> [*INFO*] 
> **
> [*INFO*] 
> *Reactor Summary for gwt-gpt 1.0-SNAPSHOT:*[*INFO*] 
> [*INFO*] gwt-gpt  *SUCCESS* 
> [  5.841 s]
> [*INFO*] gwt-gpt-shared . *SUCCESS* 
> [  1.400 s]
> [*INFO*] gwt-gpt-server . *FAILURE* 
> [  0.703 s]
> [*INFO*] 
> **
> [*INFO*] 
> *BUILD FAILURE*[*INFO*] 
> **
> [*INFO*] Total time:  14.168 s
> [*INFO*] Finished at: 2024-02-04T16:51:35Z
> [*INFO*] 
> **
> After many searches I found that *context.xml* in *jettyconf* folder had 
> missing dtd schema. Adding that as follows jetty started with no error: 
> 
> * "http://www.eclipse.org/jetty/configure.dtd 
> ">*
> 
> 
> org.eclipse.jetty.servlet.Default.useFileMappedBuffer
> false
> 
> 
>
>
>

-- 
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/4b4f11f4-98c7-46cd-95ef-dcaf7c975f5en%40googlegroups.com.


Re: Deploy to Google App Engine (GAE)

2023-12-26 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
Maybe this thread is gettig a bit off-topic for gwt ? maybe more suitable 
for Stackoverflow
or
https://groups.google.com/g/google-appengine
& https://groups.google.com/g/google-cloud-dev
now superceded by
https://www.googlecloudcommunity.com/gc/Serverless/bd-p/cloud_serverless.

On Tuesday, December 26, 2023 at 12:21:05 AM UTC Craig Mitchell wrote:

> Odd, my message was deleted.  Maybe it was too boring.  :-D
>
> The highlights:
>
>- I'm not sure if you get a Jetty server bundled or not if you use the 
>legacy bundled services.  The documentation is a little ambiguous to me.
>- You do get a stand alone server "dev server" that you can deploy a 
>war to.  Great for final testing, but it's unclear if you'll be able to 
>debug on it.
>- Your static files worked because the legacy version allows a war 
>file, and you have the maven-war-plugin in your POM.
>- If I switch to SpringBoot, I'll move my static files to either 
>a /public or /static directory.
>
> Personally, I'm going to skip the legacy bundled services, and just use 
> the second-generation Java runtime with my own web server.
>
> Cheers!
>
> On Monday 25 December 2023 at 3:48:23 am UTC+11 tim_mac...@yahoo.co.uk 
> wrote:
>
>> Looks like Cloud CLI provides a dev server if  using the legacy bundled 
>> services (App Engine API JAR)?
>>  
>> https://cloud.google.com/appengine/docs/standard/java-gen2/services/access
>> If you are using the legacy bundled services, the second-generation Java 
>> runtimes provide the Jetty web-serving framework.
>>
>> https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences#framework_flexibility
>> The Google Cloud CLI for Java includes a local development server for 
>> testing your application on your computer. The local development server 
>> emulates the App Engine Java runtime environment and all of its services, 
>> including Datastore.
>>
>> https://cloud.google.com/appengine/docs/standard/tools/using-local-server?tab=java
>> What do you think ?
>>
>> Re. static files: in my setup appengine:deploy at base directory server 
>> project deploys  SNAPSHOT.war. 
>> Static files in \src\main\webapp end up in its root directory. 
>> This:  
>> https://stackoverflow.com/questions/71673962/while-running-as-a-jar-application-not-able-to-access-static-files-in-springboo
>> says in the case of a JAR-file, src/main/webapp has no special meaning 
>> and goes on about jar directories that work with Springboot.
>>
>>
>>

-- 
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/7a0e597d-da6d-4583-b504-9e8d18aa7e6bn%40googlegroups.com.


Re: Deploy to Google App Engine (GAE)

2023-12-24 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
Looks like Cloud CLI provides a dev server if  using the legacy bundled 
services (App Engine API JAR)?
 https://cloud.google.com/appengine/docs/standard/java-gen2/services/access
If you are using the legacy bundled services, the second-generation Java 
runtimes provide the Jetty web-serving framework.
https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/java-differences#framework_flexibility
The Google Cloud CLI for Java includes a local development server for 
testing your application on your computer. The local development server 
emulates the App Engine Java runtime environment and all of its services, 
including Datastore.
https://cloud.google.com/appengine/docs/standard/tools/using-local-server?tab=java
What do you think ?

Re. static files: in my setup appengine:deploy at base directory server 
project deploys  SNAPSHOT.war. 
Static files in \src\main\webapp end up in its root directory. 
This:  
https://stackoverflow.com/questions/71673962/while-running-as-a-jar-application-not-able-to-access-static-files-in-springboo
says in the case of a JAR-file, src/main/webapp has no special meaning and 
goes on about jar directories that work with Springboot.


-- 
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/3efb5967-695f-4939-9986-2a35353f9606n%40googlegroups.com.


Re: Deploy to Google App Engine (GAE)

2023-12-23 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
Afaik gwt:devmode is launching  a GWT Jetty, rather than the GAE Jetty.
The latter requires appengine:run 
with a launch profile env property & name
appengine:run -Denv=haslistener

As you say: for IDE debugging: we need a Remote Java Application & 
jvmFlags, discussed at length here:
https://stackoverflow.com/questions/138511/what-are-java-command-line-options-to-set-to-allow-jvm-to-be-remotely-debugged
someone says:
For Java 5 and above, run it with:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044
rather than
Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n
I havent tried this yet.

With this setup the dev GAE server uses the cloud datastore (& blobstore I 
think).
To fix, in the gloud CLI app run:
gcloud components install cloud-datastore-emulator
If you didnt install beta commands, it will prompt for that.
cloud-datastore-emulator 2.3.1
before launch of GAE server run:
gcloud beta emulators datastore start --project='prjname' 
--host-port=localhost:8081 
--data-dir=C:\Users\tim_m\eclipse-workspace\Snptn\Snptn-server\src\main\webapp

Set environment variable in the eclipse launch to attach this 
DATASTORE_EMULATOR environment 
Last time I looked: the local datastore viewer cant show objectify 
entities, only blobstore files.

Re  copying src/main/webapp files to the target folder: afaik that is done 
by 
maven-jar-plugin jar goal (jar:jar) which is invoked by calling package 
(phase)
 
Btw I often read that the tbroyer multi-project pattern is better because 
it keeps server & client dependencies separated, but its a more complex 
pattern.
Re the poms I attached here: 1 problem is inconsistencies in:






On Saturday, December 23, 2023 at 7:35:42 AM UTC Craig Mitchell wrote:

> Managed to get server debugging working by adding:
>
> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 jvmArg>
>
> to the gwt-maven-plugin.
>
> And then creating a Remote JVM Debug launcher in IntelliJ (on port 5005), 
> that I run after running gwt:devmode.
>
> I'm surprised IntelliJ can't just automatically attach to the running 
> server.  Is this what everyone does that uses gwt:devmode?
>
> On Saturday 23 December 2023 at 3:28:36 pm UTC+11 Craig Mitchell wrote:
>
>> Thanks Tim!  Looking at your POM files, I see I missed adding:
>>
>> > >${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/classes> outputDirectory>
>>
>> I also needed to:
>>
>>- Convert all my servlets to @WebServlet (as the GWT Jetty server 
>>didn't pick up my web.xml like the GAE server used to).
>>- Give the GWT plugin the JVM arg 
>>"--add-opens java.base/java.lang=ALL-UNNAMED" for execeptions to be 
>>returned to the client.
>>
>> Strangely, Maven isn't copying my src/main/webapp files to the target 
>> folder, so I'm doing that manually with the maven-resources-plugin.
>>
>> So now GWT starts, dev compiles (including source maps), and runs 
>> beautifully, including RPC calls.  Java17 runtime with a Java11 source 
>> level.  Happy days!  New POM attached.
>>
>> I've switched from using Eclipse to IntelliJ (because I no longer will be 
>> using any of the Eclipse plugins, and wanted a fresh start).  However, 
>> debugging my server never hits the breakpoints.
>>
>> Do you use IntelliJ, do we need any special params to enable debug?
>>
>> [image: debug.png]
>>
>> I'm yet to get Google App Engine to work.  When I try to access any of 
>> the GAE calls, I just get "No API environment is registered for this 
>> thread.".  I think I need to setup the enviroment somehow now I no longer 
>> have a GAE server.
>>
>> Cheers!
>>
>> On Friday 22 December 2023 at 4:41:07 am UTC+11 tim_mac...@yahoo.co.uk 
>> wrote:
>>
>>> These are my current poms, based on the tbroyer archetype.
>>> Probably best to look at the latter first if youre not familiar with it.
>>>
>>> The launch is configured in the server pom:
>>>
>>> 
>>>   env-dev-gae1
>>>   
>>>   
>>>   env
>>>   haslistener
>>> ...
>>>   
>>> 
>>>   ...
>>>
>>>   com.google.cloud.tools
>>>   appengine-maven-plugin
>>>
>>> A version of Jetty is attached by the appengine-maven-plugin config here 
>>> (afaik)
>>> The eclipse launch goal is: appengine:run -Denv=haslistener
>>>
>>> Re GWT 2.10 : it can use JRE 17 but can only compile Java 11 source, 
>>> iirc.
>>>
>>> Poms are a bit messy but should help if you want to take this approach
>>>
>>> On Thursday, December 21, 2023 at 11:36:51 AM UTC Craig Mitchell wrote:
>>>
 Forgot to mention.  My target is Java 17, but my source is Java 1.8.

 So:
 
 1.8
 17
 

 And:
 
 
 
 org.apache.maven.plugins
 maven-compiler-plugin
 3.11.0
 
 ${maven.compiler.source}
 ${maven.compiler.target}
 
 
 
 org.apache.maven.plugins
 maven-resources-plugin
 3.3.1
 
 
 

 I've a

Re: Deploy to Google App Engine (GAE)

2023-12-21 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
These are my current poms, based on the tbroyer archetype.
Probably best to look at the latter first if youre not familiar with it.

The launch is configured in the server pom:


  env-dev-gae1
  
  
  env
  haslistener
...
  

  ...
  com.google.cloud.tools
  appengine-maven-plugin

A version of Jetty is attached by the appengine-maven-plugin config here 
(afaik)
The eclipse launch goal is: appengine:run -Denv=haslistener

Re GWT 2.10 : it can use JRE 17 but can only compile Java 11 source, iirc.

Poms are a bit messy but should help if you want to take this approach

On Thursday, December 21, 2023 at 11:36:51 AM UTC Craig Mitchell wrote:

> Forgot to mention.  My target is Java 17, but my source is Java 1.8.
>
> So:
> 
> 1.8
> 17
> 
>
> And:
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.11.0
> 
> ${maven.compiler.source}
> ${maven.compiler.target}
> 
> 
> 
> org.apache.maven.plugins
> maven-resources-plugin
> 3.3.1
> 
> 
> 
>
> I've attached my current POM (which isn't working, so don't copy it 🙂), 
> but if you can see my mistake, please let me know.
>
> Thanks again!
> On Thursday 21 December 2023 at 10:27:01 pm UTC+11 Craig Mitchell wrote:
>
>> Hi Tim,
>>
>> I thought GWT 2.10.0 supported Java17.  From the release notes:   
>> https://www.gwtproject.org/release-notes.html#Release_Notes_2_10_0
>> *Tested support for running on Java 17, dropped remaining support for 
>> running on Java 7.*
>>
>> I'm also using appengine-maven-plugin 2.5.0.
>> 
>> com.google.cloud.tools
>> appengine-maven-plugin
>> 2.5.0
>> 
>> headtoheaddrifting
>> GCLOUD_CONFIG
>> 
>> 
>>
>> Along with GWT plugin:
>> 
>> net.ltgt.gwt.maven
>> gwt-maven-plugin
>> 1.1.0
>> true
>> 
>> team.drift.DriftTeam
>> dt
>> gwt-lib
>> ${project.build.directory}/gwt/launcherDir
>> ${project.build.directory}/drift-team-1.0-SNAPSHOT
>> 
>> index.html
>> 
>> 
>> 
>>
>> Running: "mvn gwt:devmode" I can get it to start the Jetty server and 
>> GWT code server.  It finds my project, but currently, when opening the 
>> browser it says:
>> HTTP ERROR 503 Service Unavailable
>> URI: /index.html
>> STATUS: 503
>> MESSAGE: Service Unavailable
>> SERVLET: -
>>
>> I put my web assets in  src/main/webapp  and I don't think it's seeing 
>> them.  Plus I don't think it's seeing my web.xml that's in 
>>  src/main/webapp/WEB-INF/web.xml
>>
>> Maybe they need to be copied to the target directory or somewhere, or the 
>> GWT plugin pointed to where they are somehow.  Not sure.  Any help is 
>> greatly appreaciated.
>>
>>
>> On Thursday 21 December 2023 at 4:06:46 am UTC+11 tim_mac...@yahoo.co.uk 
>> wrote:
>>
>>> I havent tried raising the Java level yet, its still  JavaSE-1.8. 
>>> Got as far as using latest versions:
>>> JDK 21
>>> gcloud CLI app & cloudSdkVersion  457.0.0 
>>> appengine-maven-plugin 2.5.0
>>>
>>> To get it to run, so far:
>>> 1 I had to remove all DOCTYPE declarations in xml files in the server 
>>> project (new restrictions on DTD)
>>> 2 appengine-maven-plugin 2.5.0 requires:
>>> 
>>> 
>>> --add-opens
>>> java.base/java.util=ALL-UNNAMED
>>> This stops 500 Server Error which I've not seen before:
>>> GCLOUD: java.lang.reflect.InaccessibleObjectException:
>>> Unable to make field accessible: module java.base does not "opens 
>>> java.util" to unnamed module @2c95ac9e
>>>
>>> So Craig, you say with Java17 on GAE, there isn't a web server included 
>>> anymore.
>>> So this has to be defined somewhere in  appengine-maven-plugin ?
>>> The minimum level to avoid being shut down on GAE standard is >8
>>> & 11 is the max for GWT, so that would seem do for now, why Java 17  ?
>>>
>>> On Wednesday, December 20, 2023 at 4:46:03 AM UTC Craig Mitchell wrote:
>>>
 No worries not posting the POMs Tim.

 The bit I'm struggling with, the old Java 8 version had its own GAE 
 server.  So I would run that, and a GWT Code Server.  Easy!

 *btw:* I'm talking about GAE Standard.  GAE Flexible you can do 
 whatever you want, but that's more work and more expensive.

 Now with the upgrade to Java17 on GAE, there isn't a web server 
 included anymore.  It's up to you to supply one.  I would assume when you 
 deploy it, it doesn't actually use your server, but what setup is GAE 
 expecting for the deploy?

 I see there is a SpringBoot GAE example, so it might be easier to use 
 that, and get GWT to work with SpringBoot.  Not sure.  Very interested to 
 hear what you're doing.

 Thanks!

 On Wednesday 20 December 2023 at 1:51:55 pm UTC+11 
 tim_mac...@yahoo.co.uk wrote:

> For some years I've been deploying GWT 2.8.2 to GAE with Maven & 
> Google Cloud Tools. 
> I now find GAE is not supporting Java 8 after January, so currently 
> upgrading (rather slowly). 
> There are 4 long P

Re: Deploy to Google App Engine (GAE)

2023-12-20 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
I havent tried raising the Java level yet, its still  JavaSE-1.8. 
Got as far as using latest versions:
JDK 21
gcloud CLI app & cloudSdkVersion  457.0.0 
appengine-maven-plugin 2.5.0

To get it to run, so far:
1 I had to remove all DOCTYPE declarations in xml files in the server 
project (new restrictions on DTD)
2 appengine-maven-plugin 2.5.0 requires:


--add-opens
java.base/java.util=ALL-UNNAMED
This stops 500 Server Error which I've not seen before:
GCLOUD: java.lang.reflect.InaccessibleObjectException:
Unable to make field accessible: module java.base does not "opens 
java.util" to unnamed module @2c95ac9e

So Craig, you say with Java17 on GAE, there isn't a web server included 
anymore.
So this has to be defined somewhere in  appengine-maven-plugin ?
The minimum level to avoid being shut down on GAE standard is >8
& 11 is the max for GWT, so that would seem do for now, why Java 17  ?

On Wednesday, December 20, 2023 at 4:46:03 AM UTC Craig Mitchell wrote:

> No worries not posting the POMs Tim.
>
> The bit I'm struggling with, the old Java 8 version had its own GAE 
> server.  So I would run that, and a GWT Code Server.  Easy!
>
> *btw:* I'm talking about GAE Standard.  GAE Flexible you can do whatever 
> you want, but that's more work and more expensive.
>
> Now with the upgrade to Java17 on GAE, there isn't a web server included 
> anymore.  It's up to you to supply one.  I would assume when you deploy it, 
> it doesn't actually use your server, but what setup is GAE expecting for 
> the deploy?
>
> I see there is a SpringBoot GAE example, so it might be easier to use 
> that, and get GWT to work with SpringBoot.  Not sure.  Very interested to 
> hear what you're doing.
>
> Thanks!
>
> On Wednesday 20 December 2023 at 1:51:55 pm UTC+11 tim_mac...@yahoo.co.uk 
> wrote:
>
>> For some years I've been deploying GWT 2.8.2 to GAE with Maven & Google 
>> Cloud Tools. 
>> I now find GAE is not supporting Java 8 after January, so currently 
>> upgrading (rather slowly). 
>> There are 4 long POM files,  probably better to mail them then post a 
>> distilled version here ?
>>
>> On Sunday, December 17, 2023 at 5:20:56 AM UTC Craig Mitchell wrote:
>>
>>> Hi,
>>>
>>> The instructions here 
>>> https://www.gwtproject.org/doc/latest/tutorial/appengine.html are no 
>>> longer valid, as the Google Plugin for Eclipse is now dead (Google no 
>>> longer supports Java 1.8, and the Google Plugin for Eclipse doesn't support 
>>> any Eclipse versions that support anything after Java 1.8).  Ref:  
>>> https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/3710
>>>
>>> The new approach with GAE is to use Maven or Gradle with Google Cloud 
>>> Tools.
>>>
>>> I've been struggling to work out how this is supposed to happen.  It 
>>> looks like we now have to provide our own Web Server for GAE, but can we 
>>> use the Jetty server that GWT uses for development?  I assume the deploy 
>>> build would not include the Jetty web server?
>>>
>>> If anyone has deployed a GWT app to GAE with Maven and the new Google 
>>> Cloud Tools, it would be great if you could give high level instructions on 
>>> how it's all supposed to fit together.
>>>
>>> An example Maven POM file with both the Google Cloud Tools, and GWT 
>>> would be even better.  🙂
>>>
>>> Thanks!
>>>
>>

-- 
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/f0436ca1-fe5c-424f-af21-719788552a78n%40googlegroups.com.


Re: Deploy to Google App Engine (GAE)

2023-12-19 Thread &#x27;tim_mac...@yahoo.co.uk&#x27; via GWT Users
For some years I've been deploying GWT 2.8.2 to GAE with Maven & Google 
Cloud Tools. 
I now find GAE is not supporting Java 8 after January, so currently 
upgrading (rather slowly). 
There are 4 long POM files,  probably better to mail them then post a 
distilled version here ?

On Sunday, December 17, 2023 at 5:20:56 AM UTC Craig Mitchell wrote:

> Hi,
>
> The instructions here 
> https://www.gwtproject.org/doc/latest/tutorial/appengine.html are no 
> longer valid, as the Google Plugin for Eclipse is now dead (Google no 
> longer supports Java 1.8, and the Google Plugin for Eclipse doesn't support 
> any Eclipse versions that support anything after Java 1.8).  Ref:  
> https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/3710
>
> The new approach with GAE is to use Maven or Gradle with Google Cloud 
> Tools.
>
> I've been struggling to work out how this is supposed to happen.  It looks 
> like we now have to provide our own Web Server for GAE, but can we use the 
> Jetty server that GWT uses for development?  I assume the deploy build 
> would not include the Jetty web server?
>
> If anyone has deployed a GWT app to GAE with Maven and the new Google 
> Cloud Tools, it would be great if you could give high level instructions on 
> how it's all supposed to fit together.
>
> An example Maven POM file with both the Google Cloud Tools, and GWT would 
> be even better.  🙂
>
> Thanks!
>

-- 
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/bc2df8e1-6a57-42c6-8f5b-447ee279dc4fn%40googlegroups.com.