Thursday, September 1, 2022

Re: Security Vulnerabilities with GWT 2.10



On Thursday, September 1, 2022 at 11:57:07 AM UTC+2 priyako...@gmail.com wrote:
Thanks for response.

There is one more CVE has been reported for gwt-dev jar for htmlUnit component. Details of CVE are as below -
CVE - CVE-2022-29546
severity  - 7.5 
Description - HtmlUnit NekoHtml Parser before 2.61.0 suffers from a denial of service vulnerability. Crafted input associated with the parsing of Processing Instruction (PI) data leads to heap memory consumption.

Are there any plans to mitigate above vulnerablity?
As we know that gwt-dev.jar is used for development purpose( in our application, we remove gwt-dev.jar post compilation) , still are there any attack surfaces exists?

It depends whether you a) use GWTTestCase b) run them with the HtmlUnit runner c) those tests load external resources not under your control (that could contain the processing instruction triggering the OOME)

--
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/fac4e58a-26cb-49df-a2a0-2f0ec8d87d6dn%40googlegroups.com.

Re: Security Vulnerabilities with GWT 2.10

Thanks for response.

There is one more CVE has been reported for gwt-dev jar for htmlUnit component. Details of CVE are as below -
CVE - CVE-2022-29546
severity  - 7.5 
Description - HtmlUnit NekoHtml Parser before 2.61.0 suffers from a denial of service vulnerability. Crafted input associated with the parsing of Processing Instruction (PI) data leads to heap memory consumption.

Are there any plans to mitigate above vulnerablity?
As we know that gwt-dev.jar is used for development purpose( in our application, we remove gwt-dev.jar post compilation) , still are there any attack surfaces exists?

On Saturday, 30 July 2022 at 03:15:45 UTC+5:30 t.br...@gmail.com wrote:
On Friday, July 29, 2022 at 1:27:36 PM UTC+2 priyako...@gmail.com wrote:
Hi All,

Below Security Vulnerabilities in gwt-dev.jar in latest GWT 2.10 release have been reported by Dependency checker tool - 

gwt-dev_vulnerablities.PNG
Given above vulnerabilities -
1. Are those security issues addressed in latest 2.10.0 release?
2. If no, is there a plan to include them in any future release say 3.x?
3. As we know that gwt-dev.jar is used for development purpose( in our application, we remove gwt-dev.jar post compilation) , still are there any attack surfaces exists?

IIRC, GSON is used to load sourcemaps when deobfuscating stacktraces (it might also be used for generating source maps at build time, I don't remember) ; sourcemaps are bundled with your application so they can hardly be considered "untrusted data".
James (mime4j) is a transitive dependency of HTMLUnit, used for testing. It's not clear whether the mime4j component of James is vulnerable (I'd say no), but it's only used for unit tests where I'd say you shouldn't load any untrusted data.
Jetty as used in GWT won't do HTTP/2.

So, the only possible attack surface would be untrusted URLs loaded during tests.

--
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/846a98bc-8022-42bc-a5ab-fac3de4ed377n%40googlegroups.com.

Thursday, August 25, 2022

Re: Migrating to ltgt gwt-maven-plugin causes compile problem with HibernateValidation

No, didn't set gwtSdkFirstInClasspath and the default seems to be false. Anyways, the old mojo was working and the new version compiles now. Distracted by lots of BAU today and yet to actually test it.

On Wednesday, August 24, 2022 at 11:48:55 PM UTC+8 t.br...@gmail.com wrote:
Did you maybe have gwtSdkFirstInClasspath set to true? That would have put gwt-user and gwt-dev and all their dependencies into the classpath before your own dependencies, putting javax.validation 1.0.0.GA before javax.validation 1.1.0.Final and therefore shadowing it (I'd expect Hibernate Validator 5 to them break, but I have no idea how it's being used).

On Wednesday, August 24, 2022 at 3:06:29 PM UTC+2 Thomas wrote:
Thanks Thomas. That's working now. 
Over the years I've updated the dependencies and interestingly the mojo gwt-maven-plugin worked fine with these dependencies. 

On Wednesday, August 24, 2022 at 4:53:05 PM UTC+8 t.br...@gmail.com wrote:
GWT does not support javax.validation 1.1.0, only 1.0.0.
Because you're building a gwt-app, which only contains client-side code by definition, I see no reason for having javax.validation 1.1.0 (and Hibernate Validator 5, as well as gwt-servlet which is a subset of gwt-user). Stick to javax.validation 1.0.0.GA and Hibernate Validator 4.1.0.Final (https://www.gwtproject.org/doc/latest/DevGuideValidation.html#SetupInstructions)

On Wednesday, August 24, 2022 at 4:42:59 AM UTC+2 Thomas wrote:
Hi all,

I'm in the progress of modularising a GWT app and migrating it to use the newer ltgt gwt-maven-plugin. I have a GWT module which compiles correctly using the old gwt-maven-plugin, but fails with the following errors using the new gwt-maven-plugin:

[INFO] --- gwt-maven-plugin:1.0.1:compile (default-compile) @ gwt-portal ---
[INFO] Compiling module com.inspectivity.portal.Portal
[INFO]    Tracing compile failure path for type 'com.inspectivity.portal.client.validation.CustomValidatorFactory'
[INFO]       [ERROR] Errors in 'file:/Users/thomas/dev-private/inspectivity-modules/gwt-portal/src/main/java/com/inspectivity/portal/client/validation/CustomValidatorFactory.java'
[INFO]          [ERROR] Line 31: The method getParameterNameProvider() of type CustomValidatorFactory must override or implement a supertype method
[INFO]          [ERROR] Line 36: The method close() of type CustomValidatorFactory must override or implement a supertype method
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.PathImpl'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ConstraintViolationImpl_CustomFieldSerializer'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ConstraintViolationImpl_CustomFieldSerializer.java'
[INFO]          [ERROR] Line 100: The method instantiate(SerializationStreamReader) from the type ConstraintViolationImpl_CustomFieldSerializer refers to the missing type ConstraintViolationImpl
[INFO]          [ERROR] Line 37: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 73: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.deserializeInstance(SerializationStreamReader, ConstraintViolationImpl)
[INFO]          [ERROR] Line 33: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.serializeInstance(SerializationStreamWriter, ConstraintViolationImpl)
[INFO]          [ERROR] Line 41: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 105: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 88: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 53: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 98: ConstraintViolationImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ValidationSupport'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ValidationSupport.java'
[INFO]          [ERROR] Line 43: ConstraintViolationImpl cannot be resolved to a type
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    [ERROR] Aborting compile due to errors in some input files

I'm using GWT 2.8.2 and here's a fragment of my POM for the module:

<?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 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.inspectivity</groupId>
        <artifactId>inspectivity</artifactId>
        <version>...</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>gwt-portal</artifactId>
    <packaging>gwt-app</packaging>

    <name>gwt-portal</name>

    <properties>
        <app.version>${project.parent.version}</app.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <webappDirectory>${project.build.directory}/web-exploded</webappDirectory>
    </properties>

    <dependencies>
        ....
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
            <classifier>sources</classifier>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <moduleName>com.inspectivity.portal.Portal</moduleName>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>



Thanks a lot for any hint!

Cheers,
Thomas

--
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/5bda7259-c092-4fb0-b8af-ad48ceef74c8n%40googlegroups.com.

Wednesday, August 24, 2022

Re: Migrating to ltgt gwt-maven-plugin causes compile problem with HibernateValidation

Thanks Thomas. That's working now. 
Over the years I've updated the dependencies and interestingly the mojo gwt-maven-plugin worked fine with these dependencies. 

On Wednesday, August 24, 2022 at 4:53:05 PM UTC+8 t.br...@gmail.com wrote:
GWT does not support javax.validation 1.1.0, only 1.0.0.
Because you're building a gwt-app, which only contains client-side code by definition, I see no reason for having javax.validation 1.1.0 (and Hibernate Validator 5, as well as gwt-servlet which is a subset of gwt-user). Stick to javax.validation 1.0.0.GA and Hibernate Validator 4.1.0.Final (https://www.gwtproject.org/doc/latest/DevGuideValidation.html#SetupInstructions)

On Wednesday, August 24, 2022 at 4:42:59 AM UTC+2 Thomas wrote:
Hi all,

I'm in the progress of modularising a GWT app and migrating it to use the newer ltgt gwt-maven-plugin. I have a GWT module which compiles correctly using the old gwt-maven-plugin, but fails with the following errors using the new gwt-maven-plugin:

[INFO] --- gwt-maven-plugin:1.0.1:compile (default-compile) @ gwt-portal ---
[INFO] Compiling module com.inspectivity.portal.Portal
[INFO]    Tracing compile failure path for type 'com.inspectivity.portal.client.validation.CustomValidatorFactory'
[INFO]       [ERROR] Errors in 'file:/Users/thomas/dev-private/inspectivity-modules/gwt-portal/src/main/java/com/inspectivity/portal/client/validation/CustomValidatorFactory.java'
[INFO]          [ERROR] Line 31: The method getParameterNameProvider() of type CustomValidatorFactory must override or implement a supertype method
[INFO]          [ERROR] Line 36: The method close() of type CustomValidatorFactory must override or implement a supertype method
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.PathImpl'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ConstraintViolationImpl_CustomFieldSerializer'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ConstraintViolationImpl_CustomFieldSerializer.java'
[INFO]          [ERROR] Line 100: The method instantiate(SerializationStreamReader) from the type ConstraintViolationImpl_CustomFieldSerializer refers to the missing type ConstraintViolationImpl
[INFO]          [ERROR] Line 37: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 73: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.deserializeInstance(SerializationStreamReader, ConstraintViolationImpl)
[INFO]          [ERROR] Line 33: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.serializeInstance(SerializationStreamWriter, ConstraintViolationImpl)
[INFO]          [ERROR] Line 41: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 105: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 88: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 53: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 98: ConstraintViolationImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ValidationSupport'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ValidationSupport.java'
[INFO]          [ERROR] Line 43: ConstraintViolationImpl cannot be resolved to a type
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    [ERROR] Aborting compile due to errors in some input files

I'm using GWT 2.8.2 and here's a fragment of my POM for the module:

<?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 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.inspectivity</groupId>
        <artifactId>inspectivity</artifactId>
        <version>...</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>gwt-portal</artifactId>
    <packaging>gwt-app</packaging>

    <name>gwt-portal</name>

    <properties>
        <app.version>${project.parent.version}</app.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <webappDirectory>${project.build.directory}/web-exploded</webappDirectory>
    </properties>

    <dependencies>
        ....
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
            <classifier>sources</classifier>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <moduleName>com.inspectivity.portal.Portal</moduleName>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>



Thanks a lot for any hint!

Cheers,
Thomas

--
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/036e6a65-fad9-4747-86d2-09f6a233e246n%40googlegroups.com.

Re: Migrating to ltgt gwt-maven-plugin causes compile problem with HibernateValidation

Thanks @eliasbalasis - that helped me. 
I was referencing the wrong versions of hibernate-validator and javax.validation. These need to be 4.1.0.Final and 1.0.0.GA respectively. 
I have no clue however how that was working with the old/mojo gwt-maven-plugin.

On Wednesday, August 24, 2022 at 3:24:53 PM UTC+8 eliasbalasis@gmail.com wrote:
This looks like a classpath issue, from which I have suffered in the past but eventually managed to control.

I suggest using Maven dependency control to force the correct implementation of the offending classes, particularly if you are running with "GWT Eclipse Plugin" which doesn't respect inherited Maven dependency exclusions/overrides etc.

If you are using "GWT Eclipse Plugin", even though it is becoming outdated, there is still a way to control the classpath.
study https://github.com/eliasbalasis/eclipse-gwt-recipe for single-classpath for "Single CLASSPATH stream" traces.

I hope this helps you.

On Wednesday, 24 August 2022 at 03:42:59 UTC+1 Thomas wrote:
Hi all,

I'm in the progress of modularising a GWT app and migrating it to use the newer ltgt gwt-maven-plugin. I have a GWT module which compiles correctly using the old gwt-maven-plugin, but fails with the following errors using the new gwt-maven-plugin:

[INFO] --- gwt-maven-plugin:1.0.1:compile (default-compile) @ gwt-portal ---
[INFO] Compiling module com.inspectivity.portal.Portal
[INFO]    Tracing compile failure path for type 'com.inspectivity.portal.client.validation.CustomValidatorFactory'
[INFO]       [ERROR] Errors in 'file:/Users/thomas/dev-private/inspectivity-modules/gwt-portal/src/main/java/com/inspectivity/portal/client/validation/CustomValidatorFactory.java'
[INFO]          [ERROR] Line 31: The method getParameterNameProvider() of type CustomValidatorFactory must override or implement a supertype method
[INFO]          [ERROR] Line 36: The method close() of type CustomValidatorFactory must override or implement a supertype method
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.PathImpl'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ConstraintViolationImpl_CustomFieldSerializer'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ConstraintViolationImpl_CustomFieldSerializer.java'
[INFO]          [ERROR] Line 100: The method instantiate(SerializationStreamReader) from the type ConstraintViolationImpl_CustomFieldSerializer refers to the missing type ConstraintViolationImpl
[INFO]          [ERROR] Line 37: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 73: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.deserializeInstance(SerializationStreamReader, ConstraintViolationImpl)
[INFO]          [ERROR] Line 33: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.serializeInstance(SerializationStreamWriter, ConstraintViolationImpl)
[INFO]          [ERROR] Line 41: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 105: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 88: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 53: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 98: ConstraintViolationImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ValidationSupport'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ValidationSupport.java'
[INFO]          [ERROR] Line 43: ConstraintViolationImpl cannot be resolved to a type
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    [ERROR] Aborting compile due to errors in some input files

I'm using GWT 2.8.2 and here's a fragment of my POM for the module:

<?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 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.inspectivity</groupId>
        <artifactId>inspectivity</artifactId>
        <version>...</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>gwt-portal</artifactId>
    <packaging>gwt-app</packaging>

    <name>gwt-portal</name>

    <properties>
        <app.version>${project.parent.version}</app.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <webappDirectory>${project.build.directory}/web-exploded</webappDirectory>
    </properties>

    <dependencies>
        ....
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
            <classifier>sources</classifier>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <moduleName>com.inspectivity.portal.Portal</moduleName>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>



Thanks a lot for any hint!

Cheers,
Thomas

--
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/983cae01-18c9-4cdc-971d-13f8c974b713n%40googlegroups.com.

Tuesday, August 23, 2022

Migrating to ltgt gwt-maven-plugin causes compile problem with HibernateValidation

Hi all,

I'm in the progress of modularising a GWT app and migrating it to use the newer ltgt gwt-maven-plugin. I have a GWT module which compiles correctly using the old gwt-maven-plugin, but fails with the following errors using the new gwt-maven-plugin:

[INFO] --- gwt-maven-plugin:1.0.1:compile (default-compile) @ gwt-portal ---
[INFO] Compiling module com.inspectivity.portal.Portal
[INFO]    Tracing compile failure path for type 'com.inspectivity.portal.client.validation.CustomValidatorFactory'
[INFO]       [ERROR] Errors in 'file:/Users/thomas/dev-private/inspectivity-modules/gwt-portal/src/main/java/com/inspectivity/portal/client/validation/CustomValidatorFactory.java'
[INFO]          [ERROR] Line 31: The method getParameterNameProvider() of type CustomValidatorFactory must override or implement a supertype method
[INFO]          [ERROR] Line 36: The method close() of type CustomValidatorFactory must override or implement a supertype method
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.PathImpl'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ConstraintViolationImpl_CustomFieldSerializer'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ConstraintViolationImpl_CustomFieldSerializer.java'
[INFO]          [ERROR] Line 100: The method instantiate(SerializationStreamReader) from the type ConstraintViolationImpl_CustomFieldSerializer refers to the missing type ConstraintViolationImpl
[INFO]          [ERROR] Line 37: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 73: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.deserializeInstance(SerializationStreamReader, ConstraintViolationImpl)
[INFO]          [ERROR] Line 33: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 32: The type ConstraintViolationImpl_CustomFieldSerializer must implement the inherited abstract method CustomFieldSerializer<ConstraintViolationImpl>.serializeInstance(SerializationStreamWriter, ConstraintViolationImpl)
[INFO]          [ERROR] Line 41: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 105: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 88: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 53: ConstraintViolationImpl cannot be resolved to a type
[INFO]          [ERROR] Line 98: ConstraintViolationImpl cannot be resolved to a type
[INFO]    Tracing compile failure path for type 'org.hibernate.validator.engine.ValidationSupport'
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/engine/ValidationSupport.java'
[INFO]          [ERROR] Line 43: ConstraintViolationImpl cannot be resolved to a type
[INFO]       [ERROR] Errors in 'jar:file:/Users/thomas/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[INFO]          [ERROR] Line 72: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 84: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 131: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 202: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 95: NodeImpl cannot be resolved to a type
[INFO]          [ERROR] Line 127: NodeImpl cannot be resolved to a type
[INFO]    [ERROR] Aborting compile due to errors in some input files

I'm using GWT 2.8.2 and here's a fragment of my POM for the module:

<?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 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.inspectivity</groupId>
        <artifactId>inspectivity</artifactId>
        <version>...</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>gwt-portal</artifactId>
    <packaging>gwt-app</packaging>

    <name>gwt-portal</name>

    <properties>
        <app.version>${project.parent.version}</app.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <webappDirectory>${project.build.directory}/web-exploded</webappDirectory>
    </properties>

    <dependencies>
        ....
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.5.Final</version>
            <classifier>sources</classifier>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.1.0.Final</version>
        </dependency>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <moduleName>com.inspectivity.portal.Portal</moduleName>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>



Thanks a lot for any hint!

Cheers,
Thomas

--
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/03ed382d-6ce7-4ca0-8862-e9bc5c84cf06n%40googlegroups.com.

Saturday, August 20, 2022

java.lang.NoClassDefFoundError was not included in the set of types which can be serialized

I get an error when launching a GWT app, gwt 2.8.1 / jdk 8

java.lang.NoClassDefFoundError was not included in the set of types which can be serialized by this Seriaiazation policy or its Class object could not be loaded. For security purposes, this type will not be serialized. : instance = java.lang.NoClassDefFoundError: com/google/gwt/core/client/GWTBridge
(please check the image below for full logs)

First I can't make this class serializable as seen on others posts.
Second I don't have the GWTBridge in that package, it is inside com.google.gwt.core.shared



logsgwt.jpg

--
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/683cfa48-083c-4e17-9cd2-b883e5019bbfn%40googlegroups.com.