Thursday, April 11, 2024

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

I really could use some help getting my project up for development after moving to gwt 2.10 and Java 11.
I can unfortunately nolonger use the GWT intellij plugin i've loved and used for 12 years apparently, and i'm struggling a bit to get the codeserver running for my project.

CURRENT STATUS:
My project is over 12 years, but i migrated it from the old gwt mojo plugin to the new tbroyer one last year.
It builds into a war fine and deploys on tomcat. Prior to the migration to GWT 2.10 (with new Jetty) and Java 11, i could run it with the GWT Intellij plugin, which I've loved and used for those same 12 years. 
But now the plugin unfortunately doesn't work, and from what I can tell due to the JettyLauncher, (I get lots of classnotfounds for for example javax.sql.DataSource)  it's kind of impossible to make it run? So I thought I'd try what people have been saying, move to the manual thing with server and code server, even though it's a more cumbersome setup.

As part of trying to get this show on the road, i created an archetype project and got codeserver and server running according to the new v2 tutorial. This works fine.

PROBLEM:
Basically i can't get the codeserver to run. My project is pretty large so my "webclient" module that contains my gwt client has a bunch of dependencies on my own child modules, and a couple of third-party ones such as Lombok.


When i try the codeserver with this command (from the tutorial)
 mvn gwt:codeserver -pl webclient -am

,where the webclient is the module containing the gwt code and entry point, standing in the root dir of my project,
,i get page up and page down filled with missing dependencies from stuff and "did you forget to inherit"-errors. (see error extract at the bottom)

-I'm not sure if this has something to do with the "workdir", the directory i stand in when i try to start the codeserver as described above, some dependency declaration i'm missing or something else.

-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.

-Help would be much appreciated, right now i can't develop and rolling our project back to 2.8 and Java 8 wouldn't be great and take time. Man how I wish that the intellij plugin had just kept working.

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.

Extract from the error log:

[INFO] Ignoring com.myproject:generalcommons:jar:1.0-SNAPSHOT; neither a gwt-lib or jar:sources; Did you forget to use <type>gwt-lib</type> in the dependency declaration?
[INFO] Ignoring com.myproject:webshared:jar:1.0-SNAPSHOT; neither a gwt-lib or jar:sources; Did you forget to use <type>gwt-lib</type> in the dependency declaration?
[INFO] Ignoring com.myproject:webmaps:jar:1.0-SNAPSHOT; neither a gwt-lib or jar:sources; Did you forget to use <type>gwt-lib</type> in the dependency declaration?
[INFO] Ignoring com.myproject:webshared:jar:1.0-SNAPSHOT; neither a gwt-lib or jar:sources; Did you forget to use <type>gwt-lib</type> in the dependency declaration?
[INFO] Turning off precompile in incremental mode.
[INFO] Super Dev Mode starting up
[INFO]    workDir: /Users/mathias/.projects/myproject/target/gwt/codeserver
[INFO]    [WARN] Deactivated PrecompressLinker
[INFO] 19:00:51.710 [main] INFO org.eclipse.jetty.util.log - Logging initialized @778ms to org.eclipse.jetty.util.log.Slf4jLog
[INFO] 19:00:51.714 [main] DEBUG org.eclipse.jetty.http.PreEncodedHttpField - HttpField encoders loaded: [org.eclipse.jetty.http.Http1FieldPreEncoder]
[INFO]    Loading Java files in com.myproject.client.
[INFO]    Tracing compile failure path for type 'com.myproject.client.domain.group.GroupDragDropLayout'
[INFO]       [ERROR] Errors in 'file:/Users/mathias/.projects/myproject/webgwtcommons/src/main/java/com/myproject/client/domain/group/GroupDragDropLayout.java'
[INFO]          [ERROR] Line 18: The import lombok cannot be resolved
[INFO]          [ERROR] Line 7: The import com.myproject.common cannot be resolved
[INFO]          [ERROR] Line 32: Getter cannot be resolved to a type
[INFO]          [ERROR] Line 114: CSConstants cannot be resolved to a variable
[INFO]    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.ConstraintFinderImpl'
[INFO]       [ERROR] Errors in 'jar:file:/Users/mathias/.m2/repository/org/gwtproject/gwt-user/2.10.0/gwt-user-2.10.0.jar!/com/google/gwt/validation/client/impl/ConstraintFinderImpl.java'
[INFO]          [ERROR] Line 38: No source code is available for type javax.validation.metadata.ElementDescriptor.ConstraintFinder; did you forget to inherit a required module?
[INFO]          [ERROR] Line 70: No source code is available for type javax.validation.metadata.ConstraintDescriptor<T>; did you forget to inherit a required module?
[INFO]          [ERROR] Line 99: No source code is available for type javax.validation.groups.Default; did you forget to inherit a required module?
[INFO]          [ERROR] Line 88: No source code is available for type javax.validation.metadata.Scope; did you forget to inherit a required module?
[INFO]       [ERROR] Errors in 'jar:file:/Users/mathias/.m2/repository/org/gwtproject/gwt-user/2.10.0/gwt-user-2.10.0.jar!/com/google/gwt/validation/client/impl/metadata/BeanMetadata.java'

--
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/6e506cf5-c02f-4647-974e-da2ad6728727n%40googlegroups.com.

No comments:

Post a Comment