Thursday, June 30, 2022

Re: java.lang.ClassNotFoundException: javax.sql.DataSource when using GWT 2.9.0 + Java 11 combination

Didn't legacy devmode also only work with JDK 8?

On Wednesday, June 29, 2022 at 10:46:30 PM UTC+2 Jens wrote:
Without being able to see the project setup this is tough to answer.

However regardless of the exception you are seeing: Classic/Legacy DevMode will not work with GWT 2.9.0 correctly, because GWT 2.9.0 already uses JsInterop internally in its Java SDK emulation (e.g. java.util.Date uses it). JsInterop is not supported by classic/legacy DevMode. With GWT 2.9.0 you have to use SuperDevMode to have a functional Java SDK emulation during development.

-- J.

abhiy...@gmail.com schrieb am Mittwoch, 29. Juni 2022 um 21:58:40 UTC+2:
Hi Team,

I am trying to start classic DEV mode in eclipse through GWT eclipse plugin .
I am using GWT 2.9.0 + Java 11 combination.
I am getting below error. Can you help me in resolving the below error:

[b]Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:478) ~[gwt-dev-2.9.0.jar:?]
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441) 

--
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/6d3569b5-b7f0-4c2e-918c-c342b6803441n%40googlegroups.com.

Wednesday, June 29, 2022

Re: java.lang.ClassNotFoundException: javax.sql.DataSource when using GWT 2.9.0 + Java 11 combination

Thanks Jens for your quick help. I appreciate it.

On Thursday, June 30, 2022 at 2:16:30 AM UTC+5:30 Jens wrote:
Without being able to see the project setup this is tough to answer.

However regardless of the exception you are seeing: Classic/Legacy DevMode will not work with GWT 2.9.0 correctly, because GWT 2.9.0 already uses JsInterop internally in its Java SDK emulation (e.g. java.util.Date uses it). JsInterop is not supported by classic/legacy DevMode. With GWT 2.9.0 you have to use SuperDevMode to have a functional Java SDK emulation during development.

-- J.

abhiy...@gmail.com schrieb am Mittwoch, 29. Juni 2022 um 21:58:40 UTC+2:
Hi Team,

I am trying to start classic DEV mode in eclipse through GWT eclipse plugin .
I am using GWT 2.9.0 + Java 11 combination.
I am getting below error. Can you help me in resolving the below error:

[b]Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:478) ~[gwt-dev-2.9.0.jar:?]
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441) 

--
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/71767855-e935-4aa2-be51-2caee7cdd724n%40googlegroups.com.

Re: 'Throwable.HasJavaThrowable' has invalid name '?'.

Yeah as Michael already said, I strongly encourage you to use "-strict" GWT compiler / DevMode parameter in all of your GWT projects and fix all GWT compile errors you are then seeing. We should have make that parameter the default setting long time ago. I really don't see any benefit of not using it.

The error you are seeing indicates that you have an old GWT 2.8.0 on your class path which is used for compilation. GWT 2.8.0 does not know anything about "*" or "?" as native JsInterop type names and thus disallows them. Both names have been implemented in GWT 2.8.1+ and have a special meaning. 

See: https://github.com/gwtproject/gwt/commit/d458a94f2810ab8e340b76bcf17fbbe0a72b188f

So use -strict to see GWT compilation errors that need to be fixed and check your classpath so that you really only have one GWT SDK version.

-- J.

mmo schrieb am Mittwoch, 29. Juni 2022 um 19:10:09 UTC+2:
When compiling one of our GWT-based projects with the new GWT 2.10.0 I get:

...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhstregisterjp-web ---
[INFO] Compiling module ch.zh.ksta.zhstregisterjp.ZHStRegisterJPWebDevelopment
[INFO]    Ignored 5 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to DEBUG or WARN to see all errors.
[INFO]    Ignored 14 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO]    Errors in com/google/gwt/emul/java/lang/Throwable.java
[INFO]       [ERROR] Line 344: 'Throwable.HasJavaThrowable' has invalid name '?'.

Pardon me?

Any hint or direction what I could do or search for here to get over this?

--
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/e565539a-8bd1-432b-8619-f7657404a1efn%40googlegroups.com.

Re: java.lang.ClassNotFoundException: javax.sql.DataSource when using GWT 2.9.0 + Java 11 combination

Without being able to see the project setup this is tough to answer.

However regardless of the exception you are seeing: Classic/Legacy DevMode will not work with GWT 2.9.0 correctly, because GWT 2.9.0 already uses JsInterop internally in its Java SDK emulation (e.g. java.util.Date uses it). JsInterop is not supported by classic/legacy DevMode. With GWT 2.9.0 you have to use SuperDevMode to have a functional Java SDK emulation during development.

-- J.

abhiy...@gmail.com schrieb am Mittwoch, 29. Juni 2022 um 21:58:40 UTC+2:
Hi Team,

I am trying to start classic DEV mode in eclipse through GWT eclipse plugin .
I am using GWT 2.9.0 + Java 11 combination.
I am getting below error. Can you help me in resolving the below error:

[b]Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:478) ~[gwt-dev-2.9.0.jar:?]
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441) 

--
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/d3be9c50-7af5-460a-a9ec-da38e6c2452bn%40googlegroups.com.

Re: 'Throwable.HasJavaThrowable' has invalid name '?'.

I see the following in your stack trace.

It would probably help to track the issue down if you set the GWT compile to strict.

On 6/29/22 13:10, mmo wrote:
Ignored 5 units with compilation errors in first pass.

Re: java.lang.IllegalArgumentException at org.objectweb.asm.ClassVisitor.

As an experiment I removed an old exclusion of com.google.gwt:gwt-dev that some job-ancestor of mine had specified (see the commented part in my pom.xml snippet below):

            ...
            <!-- MVP component -->
            <dependency>
                <groupId>com.gwtplatform</groupId>
                <artifactId>gwtp-mvp-client</artifactId>
                <version>1.6</version>
                <!--
                <exclusions>
                    <exclusion>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                    </exclusion>
                </exclusions>
                -->
            </dependency>
            ...

 and now I don't get the mentioned compiler error anymore but instead I end in the same odd
     'Throwable.HasJavaThrowable' has invalid name '?'
exception that I describe in my other thread. So, both, project migrations are now stuck in the same issue ... 

:-( 

On Wednesday, June 29, 2022 at 7:16:10 PM UTC+2 mmo wrote:
The compilation of the other application I am trying to migrate to GWT 2.10.0 fails this stacktrace:

...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhquest-web ---
[INFO] Compiling module ch.zh.ksta.zhquest.ZHQuestWebDevelopment
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[INFO]  at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[INFO]  at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:349)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)
[INFO]  at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:210)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:192)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:143)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:132)
[INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:110)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:113)


Any hint on this would also be highly appreciated.

Michael

--
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/69257efa-3ca8-4f91-90be-adf598100193n%40googlegroups.com.

Re: What are legal "user.agent=" values?


But only to now getting stuck with: 
...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhquest-web ---
[INFO] Compiling module ch.zh.ksta.zhquest.ZHQuestWebDevelopment
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)


Now you have conflicting versions of ASM in your class path. The IllegalArgumentException within ASM's ClassVisitor class constructor is usually thrown when you have a class file compiled with a newer Java version than ASM supports. So I guess you have a relatively old ASM version on classpath. GWT itself depends on ASM 9.2 (see: https://mvnrepository.com/artifact/org.gwtproject/gwt-dev/2.10.0 ). ASM 9.2 supports java up to version 18.

-- J.

--
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/e71dc5da-fce6-47b4-b47a-c0c86d7b33e9n%40googlegroups.com.