Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#2457 closed defect (fixed)

error: incompatible types: char cannot be converted to String

Reported by: echelon Owned by:
Priority: major Milestone: 0.9.39
Component: apps/jetty Version: 0.9.38
Keywords: Cc: mhatta
Parent Tickets:

Description (last modified by zzz)

tried to build on openjdk11 debian buster, I get:

     [exec]     [javac] warning: [options] bootstrap class path not set in conjunction with -source 8
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:27: warning: [deprecation] PathMap in org.eclipse.jetty.http has been deprecated
     [exec]     [javac] import org.eclipse.jetty.http.PathMap;
     [exec]     [javac]                              ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:83: warning: [deprecation] PathMap in org.eclipse.jetty.http has been deprecated
     [exec]     [javac]     private transient PathMap<String> _ignorePathMap;
     [exec]     [javac]                       ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:378: error: method write in interface Writer cannot be applied to given types;
     [exec]     [javac]                     _writer.write(_copy,0,l);
     [exec]     [javac]                            ^
     [exec]     [javac]   required: String
     [exec]     [javac]   found: char[],int,int
     [exec]     [javac]   reason: actual and formal argument lists differ in length
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:379: error: cannot find symbol
     [exec]     [javac]                     _writer.flush();
     [exec]     [javac]                            ^
     [exec]     [javac]   symbol:   method flush()
     [exec]     [javac]   location: variable _writer of type Writer
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:392: error: method write in interface Writer cannot be applied to given types;
     [exec]     [javac]                     _writer.write(_copy,0,l);
     [exec]     [javac]                            ^
     [exec]     [javac]   required: String
     [exec]     [javac]   found: char[],int,int
     [exec]     [javac]   reason: actual and formal argument lists differ in length
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:412: error: incompatible types: char cannot be converted to String
     [exec]     [javac]                                     _writer.write(';');
     [exec]     [javac]                                                   ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:414: error: incompatible types: char cannot be converted to String
     [exec]     [javac]                                 _writer.write('=');
     [exec]     [javac]                                               ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:417: error: incompatible types: char cannot be converted to String
     [exec]     [javac]                             _writer.write('\"');
     [exec]     [javac]                                           ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:423: error: incompatible types: char cannot be converted to String
     [exec]     [javac]                         _writer.write(' ');
     [exec]     [javac]                                       ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:428: error: cannot find symbol
     [exec]     [javac]                     _writer.flush();
     [exec]     [javac]                            ^
     [exec]     [javac]   symbol:   method flush()
     [exec]     [javac]   location: variable _writer of type Writer
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:449: error: incompatible types: char cannot be converted to String
     [exec]     [javac]             writer.write('"');
     [exec]     [javac]                          ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:459: error: incompatible types: char cannot be converted to String
     [exec]     [javac]             writer.write('"');
     [exec]     [javac]                          ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:461: error: incompatible types: char cannot be converted to String
     [exec]     [javac]             writer.write('"');
     [exec]     [javac]                          ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:486: warning: [deprecation] PathMap in org.eclipse.jetty.http has been deprecated
     [exec]     [javac]             _ignorePathMap = new PathMap<String>();
     [exec]     [javac]                                  ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:493: error: incompatible types: OutputStreamWriter cannot be converted to Writer
     [exec]     [javac]         _writer = new OutputStreamWriter(_out, "UTF-8");
     [exec]     [javac]                   ^
     [exec]     [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:503: error: cannot find symbol
     [exec]     [javac]         try {if (_writer != null) _writer.flush();} catch (IOException e) {Log.getLogger((String)null).ignore(e);

Version 0.9.38-11-1 built fine on the system.

Subtickets

Change History (5)

comment:1 Changed 2 months ago by zzz

  • Description modified (diff)

comment:2 Changed 2 months ago by zzz

  • Cc mhatta added

So it doesn't like java.io.Writer anymore but it's not like that went away or changed in Java 11.0.2. Seems hard to believe but the only explanation would be a corrupted or bad JDK. Awaiting mhatta to reproduce. If he doesn't get to it soon, I'll either hit the same problem on launchpad when I build the 39 release, or not.

comment:3 Changed 2 months ago by echelon

ok, tried something else, and going back with libjetty9-java to version 9.4.14-1 from 9.4.15-1 solved this issue.

comment:4 Changed 2 months ago by zzz

  • Resolution set to fixed
  • Status changed from new to closed

In 9ee50a760074269b3e49e64cc4f71d5b7f555176 0.9.38-16-rc
Jetty added a Writer subinterface to RequestLog? in 9.4.15
The fix will work fine for 9.2.x and 9.4.14 also, no need for a deb patch for disco/buster.

comment:5 Changed 2 months ago by zzz

And here's the Debian bug, they finally found it:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924847

Note: See TracTickets for help on using tickets.