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

80 views
Skip to first unread message

Freddy Boucher

unread,
Apr 19, 2020, 3:07:33 AM4/19/20
to GWT Users
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").

Reply all
Reply to author
Forward
0 new messages