Sunday, April 19, 2020

OutputStreamWriter - The method getBytes(String) in the type EmulatedCharset is not applicable for the arguments (char[], int, int)

Hi all,
I've just created a new GitHub ticket: https://github.com/gwtproject/gwt/issues/9682

But maybe it's better to discuss it here so here is a copy:

GWT version: HEAD-SNAPSHOT

Hi, since today I get the following compilation error in my Jenkins-like environment (Github Actions):

[INFO] --- gwt-maven-plugin:1.0.0:compile (default-compile) @ learnkeeper-client ---
[INFO] Compiling module com.learnkeeper.App
[INFO] Tracing compile failure path for type 'java.io.OutputStreamWriter'
[INFO] [ERROR] Errors in 'jar:file:/Users/boucfr01/.m2/repository/com/google/gwt/gwt-user/HEAD-SNAPSHOT/gwt-user-HEAD-SNAPSHOT.jar!/com/google/gwt/emul/java/io/OutputStreamWriter.java'
[INFO] [ERROR] Line 59: The method getBytes(String) in the type EmulatedCharset is not applicable for the arguments (char[], int, int)
[INFO] [ERROR] Aborting compile due to errors in some input files
[INFO] [ERROR] Error saving compilation unit to cache file: /Users/boucfr01/Private/Programming/LearnKeeper/learnkeeper-client/target/gwt-unitCache/gwt-unitCache-8eaa4a3840f6593db9b9513ecf167e7513615408-FF35F588CF7564DE259004F02565B00E-000001719137B04D

[INFO] java.io.IOException: Stream Closed
[INFO] at java.io.RandomAccessFile.seek0(Native Method)
[INFO] at java.io.RandomAccessFile.seek(RandomAccessFile.java:557)
[INFO] at com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:161)
[INFO] at com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:73)
[INFO] at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1154)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at java.util.ArrayList.writeObject(ArrayList.java:766)
[INFO] at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1154)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at com.google.gwt.dev.javac.CachedCompilationUnit.writeObject(CachedCompilationUnit.java:231)
[INFO] at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1154)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at com.google.gwt.dev.javac.PersistentUnitCacheDir$OpenFile.writeUnit(PersistentUnitCacheDir.java:373)
[INFO] at com.google.gwt.dev.javac.PersistentUnitCacheDir.writeUnit(PersistentUnitCacheDir.java:194)
[INFO] at com.google.gwt.dev.javac.PersistentUnitCache$BackgroundService$6.run(PersistentUnitCache.java:444)
[INFO] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] at java.lang.Thread.run(Thread.java:748)

So it occurs when running my GWTTestSuite that is part of my build process.
I guess, it's related to the recent change on GWT head: ba037e1

My Github Actions uses JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.252/x64
I can also reproduce it in local (openjdk version "1.8.0_252").

--
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/2fc91436-644f-48fe-a5bc-e6eb0d866097%40googlegroups.com.

No comments:

Post a Comment