Saturday, December 28, 2024

RE: Compile multiple modules in one project

> if each HTML page has its own layout as you already have it, but all load "games/games.nocache.js",

> and the entrypoint there tests the name of the HTML page that loaded it to decide what to do next,

> the rest of the code and module could be shared.

 

You are correct.  I tried it and it is working.  Thanks for the advice!

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

RE: Compile multiple modules in one project

> if each HTML page has its own layout as you already have it, but all load "games/games.nocache.js", and

> the entrypoint there tests the name of the HTML page that loaded it to decide what to do next, the rest of the

> code and module could be shared

 

Maybe you are right.  I am going to test it.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

Re: Compile multiple modules in one project

I am not sure that will work.  Different puzzles might have completely different layouts.

For example, I am designing my Diagonal Slitherlink puzzle to be completely contained
in the GWT UI, but I am envisioning the TripleCross puzzles to have the clues in the HTML
below the UI.


I cannot think of how that would influence this - if each HTML page has its own layout as you already have it, but all load "games/games.nocache.js", and the entrypoint there tests the name of the HTML page that loaded it to decide what to do next, the rest of the code and module could be shared. If the layout instead were in the entrypoint code, then the "branches" of the switch case would initialize the layout based on which page it was on. Either way, not an impediment to this strategy.

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/299c6a6c-ccb9-424f-ad6a-b028c7bb87a8n%40googlegroups.com.

RE: Compile multiple modules in one project

> If you're asking my advice, add a switch/case to your entrypoint based on window.location.pathname,

> and keep a single entrypoint

 

I am not sure that will work.  Different puzzles might have completely different layouts.

For example, I am designing my Diagonal Slitherlink puzzle to be completely contained
in the GWT UI, but I am envisioning the TripleCross puzzles to have the clues in the HTML
below the UI.

 

> Producing a single war from multiple maven modules is straightforward

 

I will look into that.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

Re: Compile multiple modules in one project

If you're asking my advice, add a switch/case to your entrypoint based on window.location.pathname, and keep a single entrypoint - will pay off for caching, for compile time, for encouraging code reuse, will produce a single war in a simple `mvn verify` command.

If you want to use the @execution syntax that's fine, but it is definitely not going to be familiar to other developers, and makes it more complex to do things like run tests, etc. The conventions exist because Maven tries to view all kinds of project through the same lens. It does tend to make inventing your own project structure tricky - the other thread you linked has advice on using Gradle or the like if you do want to build your own graph of tasks to perform.

Producing a single war from multiple maven modules is straightforward - make a "webapp" project with packaging=war, and depend on each of the other wars. See https://maven.apache.org/plugins/maven-war-plugin/overlays.html for a discussion of this.

On Saturday, December 28, 2024 at 12:01:35 PM UTC-6 ne...@propfinancing.com wrote:

I was able to get it working by setting the goals in my run configuration to:

clean compile gwt:compile@DiagonalSlitherlink gwt:compile@DiagonalSlitherlink2 war:war

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/35550c77-b2db-4631-b75a-b2f68fa02d44n%40googlegroups.com.

RE: Compile multiple modules in one project

I was able to get it working by setting the goals in my run configuration to:

clean compile gwt:compile@DiagonalSlitherlink gwt:compile@DiagonalSlitherlink2 war:war

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

RE: Compile multiple modules in one project

> did you remove gwt-app as the packaging?

 

I want the project packaged into a single war file which I upload
to my server.

 

I am not knowledgeable enough about Maven and GWT to understand
most of your emails but I am working through them.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

RE: Compile multiple modules in one project

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.4</version>
<relativePath/>
</parent>
<groupId>com.3dmathpuzzles</groupId>
<artifactId>3DMathPuzzlesWeb</artifactId>
<version>2.1.0</version>
<name>3DMathPuzzlesWeb</name>
<description>Web site for 3DMathPuzzles.com</description>
<properties>
<gwt_ver>2.12.1</gwt_ver>
<jme3_group>org.jmonkeyengine</jme3_group>
<jme3_ver>3.6.1-stable</jme3_ver>
<pflib_ver>6.0.0</pflib_ver>
</properties>
<dependencies>
<dependency>
<groupId>com.isomorphic.smartgwt.lgpl</groupId>
<artifactId>smartgwt-lgpl</artifactId>
<version>13.1-p20241221</version>
</dependency>
<dependency>
<groupId>com.propfinancing</groupId>
<artifactId>pflib</artifactId>
<version>${pflib_ver}</version>
</dependency>
<dependency>
<groupId>com.propfinancing</groupId>
<artifactId>pflib</artifactId>
<version>${pflib_ver}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>com.simsilica</groupId>
<artifactId>lemur</artifactId>
<version>1.16.0</version>
</dependency>
<dependency>
<groupId>com.simsilica</groupId>
<artifactId>sio2</artifactId>
<version>1.8.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt_ver}</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt_ver}</version>
</dependency>
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-servlet-jakarta</artifactId>
<version>${gwt_ver}</version>
</dependency>
<dependency>
<groupId>${jme3_group}</groupId>
<artifactId>jme3-core</artifactId>
<version>${jme3_ver}</version>
</dependency>
<dependency>
<groupId>${jme3_group}</groupId>
<artifactId>jme3-desktop</artifactId>
<version>${jme3_ver}</version>
</dependency>
<dependency>
<groupId>${jme3_group}</groupId>
<artifactId>jme3-lwjgl3</artifactId>
<version>${jme3_ver}</version>
</dependency>
<dependency>
<groupId>${jme3_group}</groupId>
<artifactId>jme3-jogg</artifactId>
<version>${jme3_ver}</version>
</dependency>
<dependency>
<groupId>${jme3_group}</groupId>
<artifactId>jme3-plugins</artifactId>
<version>${jme3_ver}</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.4</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>DiagonalSlitherlink</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>
<moduleName>com._3dmathpuzzles.gwt.DiagonalSlitherlink</moduleName>
</configuration>
</execution>
<execution>
<id>DiagonalSlitherlink2</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>
<moduleName>com._3dmathpuzzles.gwt.DiagonalSlitherlink2</moduleName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
<finalName>3dmp</finalName>
</build>
<packaging>war</packaging>
</project>

> I can't see what you've edited to fix it - do you now have three entries for <moduleName>? Or did you remove gwt-app as the packaging?

 

I am attaching my full pom.xml file.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

Re: Compile multiple modules in one project

I can't see what you've edited to fix it - do you now have three entries for <moduleName>? Or did you remove gwt-app as the packaging?

There are many ways to achieve what you're after, depending on what tradeoffs you want. The simplest option in terms of build configuration and fastest option in terms of compilation is to keep a single module, and edit the EntryPoint to test the URL of the page that loaded, and delegate accordingly to two different "sub entrypoints". Odds are very high that this will reduce downloaded code size if users often will load both pages with the same browser cache, since there will likely be a fair amount of shared code between the two pages.

If there is little to no overlap between the pages, that at least suggests that there will be minimal caching benefits in splitting the modules. In that case, both to avoid overlap and to easily use gwt-app packaging to give you the configuration you want, the next best option is to have three pom files - a parent, and two children, where each child has its own src/main/module.gwt.xml and its own src/main/java full of sources. This has the advantage of using configuration and features of maven that you already understand. Note that if both modules share some library code, a shared cache can still be beneficial.

Last main option is to continue as you're doing - make sure you've removed gwt-app as the packaging, and explicitly control the goal wiring in all ways. 

Technically, the GWT compiler can take more than one module as input, so you don't need to invoke the compiler twice in a single module as you're doing - but as I mentioned the gwt-maven-plugin is intended to encourage a 1:1 mapping from maven module to gwt module. If you want to invoke the compiler only once to save some build time, you could set up an exec:java goal that directly calls the compiler with a handwritten argument list. I would strongly encourage one of the two earlier options.

On Saturday, December 28, 2024 at 10:45:10 AM UTC-6 ne...@propfinancing.com wrote:

> Only one of your <execution>s defines <moduleName>, and the error is letting you know that

> at least one execution doesn't define a moduleName.

 

Oops. I was editing the file and accidentally deleted that. I fixed it, but I am still getting
the error.

 

> What are you trying to achieve with this?

 

I am trying to create a war file which has two GWT endpoints in it.

I would like to access them by these URLs:

 

https://dev.3dmathpuzzles.com/3dmp/DiagonalSlitherlink.html

 

and

 

https://dev.3dmathpuzzles.com/3dmp/DiagonalSlitherlink2.html

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/b3a24205-2977-47be-97bc-a7a812209b9bn%40googlegroups.com.

RE: Compile multiple modules in one project

> Only one of your <execution>s defines <moduleName>, and the error is letting you know that

> at least one execution doesn't define a moduleName.

 

Oops. I was editing the file and accidentally deleted that. I fixed it, but I am still getting
the error.

 

> What are you trying to achieve with this?

 

I am trying to create a war file which has two GWT endpoints in it.

I would like to access them by these URLs:

 

https://dev.3dmathpuzzles.com/3dmp/DiagonalSlitherlink.html

 

and

 

https://dev.3dmathpuzzles.com/3dmp/DiagonalSlitherlink2.html

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

Re: Compile multiple modules in one project

Note that you've defined more than one gwt:compile execution into a single maven module. The maven plugin you're using is capable of this, but not really designed for it - please consider splitting into multiple maven modules (1:1 with the gwt modules they seek to compile).

Only one of your <execution>s defines <moduleName>, and the error is letting you know that at least one execution doesn't define a moduleName.

As it happens, you have three executions as your project is configured: DiagonalSlitherlink, DiagonalSlitherlink2, and "default-cli" the default execution. All three are required to have a moduleName to be able to run. 

I believe that dropping the "gwt-app" packaging will opt you out of the default wiring that the plugin assumes, and get rid of default-cli, but you also may have some additional setup to do to make the project work once you've removed all the default wiring.

What are you trying to achieve with this?

On Saturday, December 28, 2024 at 10:25:00 AM UTC-6 ne...@propfinancing.com wrote:
I am trying to follow this example:
https://groups.google.com/g/google-web-toolkit/c/sjh6AGfeCKQ/m/Dp2fNL6HAQA
J

So, I put this into my pom.xml:
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>DiagonalSlitherlink</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>
</configuration>
</execution>
<execution>
<id>DiagonalSlitherlink2</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>

<moduleName>com._3dmathpuzzles.gwt.DiagonalSlitherlink2</moduleName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

But I get this error from Maven:

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.3dmathpuzzles:3DMathPuzzlesWeb
>-----------------
[INFO] Building 3DMathPuzzlesWeb 2.1.0
[INFO] from pom.xml
[INFO] --------------------------------[ war
]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ 3DMathPuzzlesWeb ---
[INFO] Deleting C:\OneDrive\Dev\3DMathPuzzlesWeb\target
[INFO]
[INFO] --- resources:3.3.0:resources (default-resources) @
3DMathPuzzlesWeb ---
[INFO] Copying 0 resource
[INFO] Copying 52 resources
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ 3DMathPuzzlesWeb
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 65 source files to
C:\OneDrive\Dev\3DMathPuzzlesWeb\target\classes
[INFO]
[INFO] --- gwt:1.1.0:compile (default-cli) @ 3DMathPuzzlesWeb ---
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4.939 s
[INFO] Finished at: 2024-12-28T10:24:00-06:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
net.ltgt.gwt.maven:gwt-maven-plugin:1.1.0:compile (default-cli) on project
3DMathPuzzlesWeb: The parameters 'moduleName' for goal
net.ltgt.gwt.maven:gwt-maven-plugin:1.1.0:compile are missing or invalid
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException


Thank you,
Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/70ea2e33-11c7-447b-8c4d-dcd8d83cbe47n%40googlegroups.com.

Compile multiple modules in one project

I am trying to follow this example:
https://groups.google.com/g/google-web-toolkit/c/sjh6AGfeCKQ/m/Dp2fNL6HAQA
J

So, I put this into my pom.xml:
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>DiagonalSlitherlink</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>
</configuration>
</execution>
<execution>
<id>DiagonalSlitherlink2</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>

<moduleName>com._3dmathpuzzles.gwt.DiagonalSlitherlink2</moduleName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

But I get this error from Maven:

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.3dmathpuzzles:3DMathPuzzlesWeb
>-----------------
[INFO] Building 3DMathPuzzlesWeb 2.1.0
[INFO] from pom.xml
[INFO] --------------------------------[ war
]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ 3DMathPuzzlesWeb ---
[INFO] Deleting C:\OneDrive\Dev\3DMathPuzzlesWeb\target
[INFO]
[INFO] --- resources:3.3.0:resources (default-resources) @
3DMathPuzzlesWeb ---
[INFO] Copying 0 resource
[INFO] Copying 52 resources
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ 3DMathPuzzlesWeb
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 65 source files to
C:\OneDrive\Dev\3DMathPuzzlesWeb\target\classes
[INFO]
[INFO] --- gwt:1.1.0:compile (default-cli) @ 3DMathPuzzlesWeb ---
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4.939 s
[INFO] Finished at: 2024-12-28T10:24:00-06:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
net.ltgt.gwt.maven:gwt-maven-plugin:1.1.0:compile (default-cli) on project
3DMathPuzzlesWeb: The parameters 'moduleName' for goal
net.ltgt.gwt.maven:gwt-maven-plugin:1.1.0:compile are missing or invalid
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException


Thank you,
Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/0178583776ad02ca447d870d69bcfcdc%40mail.gmail.com.

Friday, December 20, 2024

Re: Digest for google-web-toolkit@googlegroups.com - 12 updates in 3 topics

> make sure to clear the cache first

Sounds like you haven't setup your caching correctly.  Mine always works perfectly, never have to clear the cache in dev, or when doing a server update.  Here's my Filter:

/**
 * Tell the browser not to cache the .nocache files, by changing the expires time in the HTTP header.
 */
@Component
@Order(1)
public class ServletFilter implements Filter {
private static final String NO_CACHE = ".nocache.js";

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
String requestURI = ((HttpServletRequest)request).getRequestURI();

// Don't cache the nocache
if (requestURI.endsWith(NO_CACHE)) {
setNoCache((HttpServletResponse)response);
}

// Request HTTPS
((HttpServletResponse)response).setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains");

chain.doFilter(request, response);
}

private void setNoCache(HttpServletResponse httpResponse) {
long currentTime = new Date().getTime();
httpResponse.setDateHeader("Last-Modified", currentTime);
httpResponse.setDateHeader("Expires", currentTime - 86400000L);
httpResponse.setHeader("Pragma", "no-cache");
httpResponse.setHeader("Cache-Control", "no-store");
}
}

On Friday, 20 December 2024 at 4:40:22 pm UTC+11 Leon wrote:
One thing that is also quite relevant when developing a GWT application is to realize that all GWT generated code lives in the browser and that browser caching can be a problem. Whenever you do a GWT compile and want to check the result in the browser, make sure to clear the cache first because the old code will very likely not be reloaded.
I always have the developer mode in the browser open when developing and never click reload, but always 'empty cache and hard reload'. You will need it a lot.
The same goes for server updates. Best to do them late in the day or early in the morning, so users can't have stale code in their browsers. 
Either that, or learn them to do the hard reload (but you can also try and learn dogs to fly, that might have the same level of success).

Neil, I think you are trying to learn GWT in the hardest way possible. 
GWT is a way to develop a UI using java, but it is not run as java, and at runtime will not have the same possibilities as java. 
So it has its limitations when compared to what you can do with java on the server.
When you've developed something for standard java to work, based on all available libraries and known server possibilities, which you want to port to GWT is like trying to port a sportscar into a tractor. It's not impossible, but it is quite the challenge.

On Thu, Dec 19, 2024 at 9:56 PM <google-we...@googlegroups.com> wrote:
Neil Aggarwal <ne...@propfinancing.com>: Dec 18 10:45PM -0600

I am getting this error on the server:
Type 'com.propfinancing.puzzle.slitherlink.Line' was not included in the
set of types which can be
serialized by this SerializationPolicy or its Class object could not be
loaded. For security purposes,
this type will not be serialized.: instance = Line 0
 
And looking in the .gwt.rpc file, it is not listed there.
 
Interestingly, I see this:
com.propfinancing.puzzle.slitherlink.Line$STATUS
which is an Enum in that class so the GWT compiler obviously processed the
class.
 
I did not get any warnings or error messages from the GWT compiler as to
why it
decided it did not like the class so now I have to guess what it did not
like.
 
Is there a way to improve the messaging to the user to help understand
what happened?
 
Thank you,
Neil
 
--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!
Craig Mitchell <ma...@craig-mitchell.com>: Dec 18 11:08PM -0800

At a guess, the inner enum needs to be told it can be serialised. Ie:
 
import com.google.gwt.user.client.rpc.IsSerializable;
 
enum STATUS implements IsSerializable { ... }
 
On Thursday, 19 December 2024 at 3:46:31 pm UTC+11 Neil Aggarwal wrote:
 
Colin Alworth <co...@colinalworth.com>: Dec 19 06:19AM -0800

Enums never need to be marked as serializable - unlike records, the Enum
type itself is always serializable, and GWT-RPC assumes the same. From
https://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes
 
A type is serializable and can be used in a service interface if one of the
following is true:
...
* The type is an enumeration. Enumeration constants are serialized as a
name only; none of the field values are serialized.
 
 
That error message is indeed what is used when the standard serialization
policy is read from disk, so you've resolved that earlier issue. Can you
confirm that the policy file does include Line (that is, it is correctly
reachable from the remote service instance)? If not, the GWT-RPC generator
(run when the compiler is invoked) might not have seen a clear path to how
this type could be used. Common reasons for that include declaring a field
as being of type Object, which in your head means that any type could be
assigned, but GWT-RPC doesn't want to mark every possibly class as
potentially serializable (both for security reasons and to avoid generating
serialization code for your client for every possible type).
 
On Thursday, December 19, 2024 at 1:08:53 AM UTC-6 ma...@craig-mitchell.com
wrote:
 
Neil Aggarwal <ne...@propfinancing.com>: Dec 19 10:11AM -0600

> Enumeration constants are serialized as a name only; none of the field
values are serialized.
 
 
 
What are the consequences of not having the values?
 
Reading on the Internet, it means I can't use valueOf() and ordinal().
 
But, does it work normally otherwise?
 
Can I assign a constant value to a field, read that value, and compare the
value to one of the
constants?
 
 
 
> Can you confirm that the policy file does include Line
 
 
 
It does not have Line in it:
 
 
 
@FinalFields, true
 
*com*._3dmathpuzzles.play.client.GetPuzzleService, false, false, false,
false, _, 4203465842
 
*com*._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle, true,
true, false, false,
*com*._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle/2547295082,
2547295082
 
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true,
true, true, true,
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533,
3936916533
 
com.google.gwt.user.client.rpc.RpcTokenException, true, true, false, false,
com.google.gwt.user.client.rpc.RpcTokenException/2345075298, 2345075298
 
com.google.gwt.user.client.rpc.XsrfToken, false, false, true, true,
com.google.gwt.user.client.rpc.XsrfToken/4254043109, 4254043109
 
com.propfinancing.puzzle.Puzzle, true, false, false, false,
com.propfinancing.puzzle.Puzzle/1723715424, 1723715424
 
com.propfinancing.puzzle.slitherlink.Box, true, true, false, false,
com.propfinancing.puzzle.slitherlink.Box/1302152982, 1302152982
 
com.propfinancing.puzzle.slitherlink.Box$STATE, true, true, false, false,
com.propfinancing.puzzle.slitherlink.Box$STATE/1639054469, 1639054469
 
com.propfinancing.puzzle.slitherlink.BoxWithDiagonals, true, true, false,
false, com.propfinancing.puzzle.slitherlink.BoxWithDiagonals/2774485663,
2774485663
 
com.propfinancing.puzzle.slitherlink.Component, true, false, false, false,
com.propfinancing.puzzle.slitherlink.Component/4011233562, 4011233562
 
com.propfinancing.puzzle.slitherlink.Line$STATUS, true, true, false, false,
com.propfinancing.puzzle.slitherlink.Line$STATUS/1640439993, 1640439993
 
com.propfinancing.puzzle.slitherlink.NumberedBox, true, true, false, false,
com.propfinancing.puzzle.slitherlink.NumberedBox/1782628205, 1782628205
 
com.propfinancing.puzzle.slitherlink.Puzzle, true, false, false, false,
com.propfinancing.puzzle.slitherlink.Puzzle/2584703185, 2584703185
 
com.propfinancing.puzzle.slitherlink.RectangularPuzzle, true, false, false,
false, com.propfinancing.puzzle.slitherlink.RectangularPuzzle/3177548746,
3177548746
 
com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle, true,
false, false, false,
com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle/3793384887,
3793384887
 
java.lang.Exception, true, false, true, false,
java.lang.Exception/1920171873, 1920171873
 
java.lang.RuntimeException, true, false, true, false,
java.lang.RuntimeException/515124647, 515124647
 
java.lang.String, true, true, true, true, java.lang.String/2004016611,
2004016611
 
java.lang.Throwable, true, false, true, false,
java.lang.Throwable/2953622131, 2953622131
 
java.util.ArrayList, true, true, false, false,
java.util.ArrayList/4159755760, 4159755760
 
java.util.HashMap, true, true, false, false, java.util.HashMap/1797211028,
1797211028
 
java.util.LinkedHashMap, true, true, false, false,
java.util.LinkedHashMap/3008245022, 3008245022
 
 
 
> the GWT-RPC generator (run when the compiler is invoked) might not have
seen a clear path to how this type could be used
 
 
 
Unfortunately, it is silent about the reason.
 
I am hoping we can improve it help the developer instead of leaving me to
make guesses.
 
 
 
Thank you,
 
Neil
 
 
 
--
 
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
 
We offer 30 year loans on single family houses!
Leon <leon.p...@gmail.com>: Dec 19 07:50AM +0100

Hi Neil,
 
If you hardcode an url in your GWT calls, it will be tied to that specific
url. Local testing will not be possible (outside of hacking your own hosts
file) and if you modify your servername you'll need to update your source
code.
 
The webserver is the perfect place to forward your request to the tomcat
instance.
For apache webserver you can do this with the mod_proxy module. Nginx has
the same with proxy_forward (or something similar, don't know by heart).
 
rg,
 
Leon.
 
Vassilis Virvilis <vas...@gmail.com>: Dec 19 09:15AM +0200

I agree with Leon and I can only add that there is also libapache2-mod-jk
to directly proxy from apache to tomcat. The elevator's pitch is about
speed but I think that is also simpler to understand and setup.
 
 
--
Vassilis Virvilis
Neil Aggarwal <ne...@propfinancing.com>: Dec 18 03:48PM -0600

I wrote a very simple class:
 
 
 
*package* com._3dmathpuzzles.slitherlink;
 
 
 
*import* java.io.Serializable;
 
 
 
*public* *class* TestPuzzle *implements* Serializable {
 
*private* *static* *final* *long* *serialVersionUID* = 1L;
 
 
 
/** Constructor */
 
*public* TestPuzzle() {
 
*super*();
 
}
 
}
 
 
 
And updated my RPC call to use it and I still get this:
 
 
 
Exception while dispatching incoming RPC call
 
com.google.gwt.user.client.rpc.SerializationException:
 
Type 'com._3dmathpuzzles.slitherlink.TestPuzzle' was not assignable to
 
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.
 
For security purposes, this type will not be serialized.: instance =
 
com._3dmathpuzzles.slitherlink.TestPuzzle@40a58058
 
 
 
I am not sure what to do about this. My class implements Serializable
and has a no-arg constructor.
 
 
 
Thank you,
 
Neil
 
 
 
--
 
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
 
We offer 30 year loans on single family houses!
Colin Alworth <co...@colinalworth.com>: Dec 18 01:57PM -0800

You're triggering the LegacySerializationPolicy... we should make that
clearer when it happens.
 
This occurs when your <hash>.gwt.rpc policy file wasn't present on the
server (or wasnt at the expected path). Legacy serialization is much more
strict in what it will accept.
 
Generated policy files ensure that the server and client agree on what can
be serialized. This file is generated into the same directory as your
.nocache.js file, and should be available on the server if running in
production. If running with super dev mode and a separate server, you can
direct the server to download the current policy file from SDM by
specifying system property gwt.codeserver.port with the localhost port to
the SDM server. Be sure to reload the server application or hot reload
classes if they change, so that the server side classes match the client
(and the client's policy file).
 
On Wednesday, December 18, 2024 at 3:48:49 PM UTC-6 ne...@propfinancing.com
wrote:
 
Neil Aggarwal <ne...@propfinancing.com>: Dec 18 04:44PM -0600


> This occurs when your <hash>.gwt.rpc policy file wasn't present on the
> server (or wasnt at the expected path). Legacy serialization is much more
> strict in what it will accept.
 
I saw a warning about that in the log but not know what it meant.
I am serving the client side files from Apache and the server side files
from Tomcat so they are separate.
 
Where does the server side code expect the .gwt.rpc file to be?
 
Colin Alworth <co...@colinalworth.com>: Dec 18 06:11PM -0800

The server expects the client to tell it where the file should be, and the
client reports that the file should be in the same directory as its
.nocache.js file - we call that the "base directory" of a gwt application.
 
RemoteServiceServlet.getSerializationPolicy is responsible for looking this
up, based on the incoming request, and the expected name of the generated
file (according to the client). If using SDM and a port provided as I
mentioned, this method will defer to getCodeServerPolicyUrl() if no policy
file was found on the server itself. Otherwise, you'll see the warning you
mentioned.

On Wednesday, December 18, 2024 at 4:45:23 PM UTC-6 ne...@propfinancing.com
wrote:
 
Neil Aggarwal <ne...@propfinancing.com>: Dec 18 10:06PM -0600

I see this in the log:
 
 
 
com._3dmathpuzzles.play.server.GetPuzzleServiceImpl: ERROR: The module path
requested, /play/DiagonalSlitherlink/, is not in the same web application
as this servlet, /3dmp. Your module may not be properly configured or your
client and server code maybe out of date.
 
 
 
Looking at the source code for RemoteServiceServlet, I see that it wants
the module path to start with the
webapp context, but it does not match in my setup.
 
 
 
Is there a way to override the behavior, maybe load it manually or
something?
 
 
 
I see a method putCachedSerializationPolicy but it is private.
 
 
 
Thank you,
 
Neil
 
 
 
--
 
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
 
We offer 30 year loans on single family houses!
Neil Aggarwal <ne...@propfinancing.com>: Dec 18 10:21PM -0600

> The server expects the client to tell it where the file should be, and
the client reports that the file should
 
> be in the same directory as its .nocache.js file
 
> we call that the "base directory" of a gwt application.
 
 
 
I decided to stop fighting with GWT and moved the module from Apache
to Tomcat. The test RPC started working once I did that.
 
 
 
I changed the code to try to retrieve my DiagonalSlitherlink puzzle, but it
it is giving me an error. I am investigating.
 
 
 
Thanks for the help!
 
 
 
Neil
 
 
 
--
 
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
 
We offer 30 year loans on single family houses!
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to google-web-tool...@googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/7718ca69-c56a-43fa-861a-6c47147c85b9n%40googlegroups.com.

RE: Class not included in the set of types for RPC

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.3dmathpuzzles:3DMathPuzzlesWeb >-----------------
[INFO] Building 3DMathPuzzlesWeb 2.1.0
[INFO] from pom.xml
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ 3DMathPuzzlesWeb ---
[INFO] Deleting C:\OneDrive\Dev\3DMathPuzzlesWeb\target
[INFO]
[INFO] --- resources:3.3.0:resources (default-resources) @ 3DMathPuzzlesWeb ---
[INFO] Copying 0 resource
[INFO] Copying 52 resources
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ 3DMathPuzzlesWeb ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 25 source files to C:\OneDrive\Dev\3DMathPuzzlesWeb\target\classes
[INFO]
[INFO] --- gwt:1.1.0:compile (default-cli) @ 3DMathPuzzlesWeb ---
[INFO] Compiling module com._3dmathpuzzles.play.DiagonalSlitherlink
[INFO] Compiling 2 permutations
[INFO] Compiling permutation 0...
[INFO] Compiling permutation 1...
[INFO] Compile of permutations succeeded
[INFO] Compilation succeeded -- 12.411s
[INFO] Linking into C:\OneDrive\Dev\3DMathPuzzlesWeb\target\3dmp\DiagonalSlitherlink
[INFO] Link succeeded
[INFO] Linking succeeded -- 0.645s
[INFO]
[INFO] --- war:3.3.2:war (default-cli) @ 3DMathPuzzlesWeb ---
[INFO] Packaging webapp
[INFO] Assembling webapp [3DMathPuzzlesWeb] in [C:\OneDrive\Dev\3DMathPuzzlesWeb\target\3dmp]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\OneDrive\Dev\3DMathPuzzlesWeb\src\main\webapp]
[INFO] Building war: C:\OneDrive\Dev\3DMathPuzzlesWeb\target\3dmp.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.273 s
[INFO] Finished at: 2024-12-20T09:31:15-06:00
[INFO] ------------------------------------------------------------------------

> Are you sure you have no compiler errors, and -failOnError (or -strict) is set?

 

No compiler errors.  I changed Vector3f back to non-serializable and ran the
build.  I am attaching the full output from Maven.

 

I have failOnError in my pom.xml:

                                             <plugin>

                                                            <groupId>net.ltgt.gwt.maven</groupId>

                                                            <artifactId>gwt-maven-plugin</artifactId>

                                                            <version>1.1.0</version>

                                                            <extensions>true</extensions>

                                                            <configuration>

                                                                           <failOnError>true</failOnError>

                                                                           <logLevel>INFO</logLevel>

                                                              <moduleName>com._3dmathpuzzles.play.DiagonalSlitherlink</moduleName>

                                                                           <systemProperties>

                                                                           <gwt.persistentunitcachedir>${project.build.directory}/gwt</gwt.persistentunitcachedir>

                                                                           </systemProperties>

                                                            </configuration>

                                             </plugin>                        

 

> We can't see the code you won't share

 

I am willing to share, but my library is HUGE.  It would not be useful to share it with you
until I pared it down to a test case.  Luckily, it looks like that is not going to be necessary.

 

> this is effectively "black box" testing from our part

 

Understood.  That is why I was trying to pare it down to a test case which would illustrate
what happened in a smaller subset of code.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

RE: Class not included in the set of types for RPC

> What about the Point class? Line and Point are missing in the policy file so I guess

> Point might be the issue (or something that Point references)

 

That was it!

 

Point referenced my own super-source version of Vector3f.

I forgot not mark Vector3f as Serializable.

 

Since it is super-source, it is not valid as-is so I excluded it from my
compile of my library.

 

The GWT compiler did not give me any errors or warnings so I did not

realize to look there.

 

I really think the RPC generator should not be silent here.

Puzzle references Point.  Puzzle was processed and present in the .gwt.rpc file

but Point was not processed.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

Re: Class not included in the set of types for RPC

Are you sure you have no compiler errors, and -failOnError (or -strict) is set?

We can't see the code you won't share, so I can only make up scenarios for what might be wrong, as this is effectively "black box" testing from our part. Here's a scenario:

Your RemoteService type doesn't mention Box or Line directly, but Component
Component has other valid subtypes other than Box
Line doesn't actually compile at this time (or: some field that Line references doesn't compile, preventing it from compiling, etc).
But since there are other valid Component types that the compiler can see, GWT-RPC is satisfied that at least one Component subtype can be serialized.

If you remove Line from Box, suddenly Box can itself be compiled, so it can be serialized.

The same above can be true for "serialized" instead of "compiled" - if Line isn't actually able to be compiled and you didn't accurately share Line - for example, is Point serializable? I dont see it on the policy file examples either... do the other non-serializable types reference it or Line?

On Thursday, December 19, 2024 at 11:47:08 PM UTC-6 ne...@propfinancing.com wrote:

This is very interesting.  I added Line as a private member to Box:

  /** Testing a line instance */

  private Line line;

 

And an accessor:

  /** Test method for GWT */

  public Line getLine() {

    return line;

  }

 

Now, Box is not generated in the .gwt.rpc file (Box Box$STATE is still there).

 

If I mark those two items with @GwtIncompatible, Box appears again.

 

Thank you,

Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

 

From: Neil Aggarwal <ne...@propfinancing.com>
Sent: Thursday, December 19, 2024 10:45 PM
To: 'google-we...@googlegroups.com' <google-we...@googlegroups.com>
Subject: RE: Class not included in the set of types for RPC

 

> Can you share the full contents of Line and Box? Or at least their class hierarchy and fields - methods are not important.

 

I am attaching pared-down versions of Component, Box, and Line.

I am also attaching the generated .gwt.rpc

 

> Something has definitely changed since your last email - "Line$STATUS" was present before,

> but isn't now. Was that a deliberate change?

 

Yes. I have been paring down my classes to see if I can find out what the GWT Compiler

does not like so no luck so far.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/47545995-bbb7-4a33-8c8b-082433c833e3n%40googlegroups.com.

Re: Class not included in the set of types for RPC

What about the Point class? Line and Point are missing in the policy file so I guess Point might be the issue (or something that Point references)

-- J.

Neil Aggarwal schrieb am Freitag, 20. Dezember 2024 um 06:47:08 UTC+1:

This is very interesting.  I added Line as a private member to Box:

  /** Testing a line instance */

  private Line line;

 

And an accessor:

  /** Test method for GWT */

  public Line getLine() {

    return line;

  }

 

Now, Box is not generated in the .gwt.rpc file (Box Box$STATE is still there).

 

If I mark those two items with @GwtIncompatible, Box appears again.

 

Thank you,

Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

 

From: Neil Aggarwal <ne...@propfinancing.com>
Sent: Thursday, December 19, 2024 10:45 PM
To: 'google-we...@googlegroups.com' <google-we...@googlegroups.com>
Subject: RE: Class not included in the set of types for RPC

 

> Can you share the full contents of Line and Box? Or at least their class hierarchy and fields - methods are not important.

 

I am attaching pared-down versions of Component, Box, and Line.

I am also attaching the generated .gwt.rpc

 

> Something has definitely changed since your last email - "Line$STATUS" was present before,

> but isn't now. Was that a deliberate change?

 

Yes. I have been paring down my classes to see if I can find out what the GWT Compiler

does not like so no luck so far.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

--
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 visit https://groups.google.com/d/msgid/google-web-toolkit/d5332547-da0a-414f-90f9-0a28fda03727n%40googlegroups.com.

Thursday, December 19, 2024

RE: Digest for google-web-toolkit@googlegroups.com - 12 updates in 3 topics

> I think you are trying to learn GWT in the hardest way possible.

 

I am sure that is true, but I have never been one to shy away from

challenges.

 

As I see it, I can:

  1. Continue trying to use my existing Java code with
    its intricate hierarchy and use of external libraries.
  2. Don't use my existing code.  Instead, write a parallel

set of code just for use with GWT.

 

According to the people on this list, #1 should work.  If it will work,

I prefer that solution to avoid having duplicated code (That's one of

the reasons why I am using Java and GWT in the first place).  Of

course, "should" assumes a lot so nothing is guaranteed.

 

Using GwtIncompatible and super-source, I have been able
to get my code through the GWT compiler.  But now, the RPC

generator is giving me trouble.  I am not sure yet what is causing

that. 

 

As I see it, it could be one of:

  1. Due to my lack of knowledge, my code is structured in a way

that violates some GWT requirement.

  1. My code is stressing GWT and I hit some bug in the system.

 

I think it will be useful to know which.  If it is (a), then I will either
need to re-structure my code or stop the current effort and go to
solution #2 above.  If it is (b), fixing that makes GWT better.

 

I am still willing to continue this path if the people on this list
are still willing to help me.  So far, I have received amazing support
and would like to thank everyone for that.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

RE: Class not included in the set of types for RPC

This is very interesting.  I added Line as a private member to Box:

  /** Testing a line instance */

  private Line line;

 

And an accessor:

  /** Test method for GWT */

  public Line getLine() {

    return line;

  }

 

Now, Box is not generated in the .gwt.rpc file (Box Box$STATE is still there).

 

If I mark those two items with @GwtIncompatible, Box appears again.

 

Thank you,

Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

 

From: Neil Aggarwal <neil@propfinancing.com>
Sent: Thursday, December 19, 2024 10:45 PM
To: 'google-web-toolkit@googlegroups.com' <google-web-toolkit@googlegroups.com>
Subject: RE: Class not included in the set of types for RPC

 

> Can you share the full contents of Line and Box? Or at least their class hierarchy and fields - methods are not important.

 

I am attaching pared-down versions of Component, Box, and Line.

I am also attaching the generated .gwt.rpc

 

> Something has definitely changed since your last email - "Line$STATUS" was present before,

> but isn't now. Was that a deliberate change?

 

Yes. I have been paring down my classes to see if I can find out what the GWT Compiler

does not like so no luck so far.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!