Bug Java 14 no longer compatible with (current) svnkit

Veracity

Developer
Staff member
After an "svn update":

Code:
KoLmafia v20.7 r20294
Released on July 30, 2020

Currently Running on Mac OS X
Local Directory is /Users/Brianna/Library/Application Support/KoLmafia
Using Java 14.0.2

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.tmatesoft.svn.core.internal.util.SVNSocketFactory (file:/src/kolmafia/dist/KoLmafia-20.7.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.tmatesoft.svn.core.internal.util.SVNSocketFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sigh. Maybe they have an update available.
 

Veracity

Developer
Staff member
Ha.

Code:
r16072 | heeheehee | 2015-07-25 22:24:53 -0400 (Sat, 25 Jul 2015) | 2 lines

Upgrade SVNKit to latest version; update bundled libraries as part of this
process.
That gave us "SVN/1.8.1 SVNKit/1.8.11 (http://svnkit.com/) rSNAPSHOT"
The current version is "SVN/1.8.1 SVNKit/1.10.0 (http://svnkit.com/) rSNAPSHOT"
(although the source tree claims it is 1.10.1)

How hard can this be? ;)
 

Veracity

Developer
Staff member
Revision 20296 updates SVNKit to 1.10.1. According to svnkit.org, that makes it compatible with Java 11.
Unfortunately, the Java 14 issue remains.
Perhaps I should report a bug at svnkit.com
 

apologue

New member
So... now "svn update" produces a number of these for me:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v20.7 r20312, Windows 7, Java 1.8.0_261
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Sat Aug 22 11:09:21 EEST 2020
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.throwThrowable(SvnNgAbstractUpdate.java:918)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:125)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:309)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:286)
	at net.sourceforge.kolmafia.svn.UpdateRunnable.run(UpdateRunnable.java:141)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager$2.run(SVNManager.java:1314)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager.doUpdate(SVNManager.java:1325)
	at net.sourceforge.kolmafia.textui.command.SVNCommand.run(SVNCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:199)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:168)
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.<init>(SVNDeltaReader.java:52)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVDeltaHandler.init(BasicDAVDeltaHandler.java:48)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.DAVEditorHandler.<init>(DAVEditorHandler.java:249)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1350)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
	... 25 more

class java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.<init>(SVNDeltaReader.java:52)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVDeltaHandler.init(BasicDAVDeltaHandler.java:48)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.DAVEditorHandler.<init>(DAVEditorHandler.java:249)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1350)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:309)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:286)
	at net.sourceforge.kolmafia.svn.UpdateRunnable.run(UpdateRunnable.java:141)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager$2.run(SVNManager.java:1314)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager.doUpdate(SVNManager.java:1325)
	at net.sourceforge.kolmafia.textui.command.SVNCommand.run(SVNCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:199)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:168)
 

apologue

New member
Can't reproduce with r20313 and a newer Java.

The same happens with r20320:

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v20.7 r20320, Windows 7, Java 1.8.0_261
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Aug 25 11:25:04 EEST 2020
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.throwThrowable(SvnNgAbstractUpdate.java:918)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:125)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:309)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:286)
	at net.sourceforge.kolmafia.svn.UpdateRunnable.run(UpdateRunnable.java:141)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager$2.run(SVNManager.java:1314)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager.doUpdate(SVNManager.java:1325)
	at net.sourceforge.kolmafia.textui.command.SVNCommand.run(SVNCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:199)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:168)
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.<init>(SVNDeltaReader.java:52)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVDeltaHandler.init(BasicDAVDeltaHandler.java:48)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.DAVEditorHandler.<init>(DAVEditorHandler.java:249)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1350)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
	... 25 more

class java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.<init>(SVNDeltaReader.java:52)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVDeltaHandler.init(BasicDAVDeltaHandler.java:48)
	at org.tmatesoft.svn.core.internal.io.dav.handlers.DAVEditorHandler.<init>(DAVEditorHandler.java:249)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1350)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:859)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:40)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
	at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:309)
	at net.sourceforge.kolmafia.svn.SVNManager.update(SVNManager.java:286)
	at net.sourceforge.kolmafia.svn.UpdateRunnable.run(UpdateRunnable.java:141)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager$2.run(SVNManager.java:1314)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:300)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:285)
	at net.sourceforge.kolmafia.svn.SVNManager.doUpdate(SVNManager.java:1325)
	at net.sourceforge.kolmafia.textui.command.SVNCommand.run(SVNCommand.java:63)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:199)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:168)

Please elaborate on the newer Java. This was released July 14, 2020 and it is the most recent version www.java.com offers to me.
 

fronobulax

Developer
Staff member
$ java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

and Capturea.JPG

Without digging deep enough to find out where my error is I believe I am running Java 13 and you are running Java 8.

I agree that something called "Version 8 Update 261" is the latest at www.java.com and that your debug log suggests that is what you are running.

I am running from a Java Development Kit. Java SE 14.0.2 is the latest and I am behind.

Java version naming has been a PITA going back to the days when something labelled Java 1.2 was called both "Java one point two" and "Java two".

I think it is safe to say that you are running "the wrong version" for KoLmafia in its current iteration. I'm not sure whether the fix is requiring you to upgrade or something on mafia's end. If the only thing broken is the SVN commands you can grab an old version and run it when you need SVN and otherwise use the latest mafia.
 

Veracity

Developer
Staff member
They are running Java 8. That is disheartening, since we are compiling with a target of Java 8. Unfortunately, it looks like svnkit is dong something tricky using refection.
 

Veracity

Developer
Staff member
Code:
Unexpected error, debug log printed.
class java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
java.lang.RuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
...
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
	at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.<init>(SVNDeltaReader.java:52)

./lib/org/tmatesoft/svn/core/internal/delta/SVNDeltaReader.java

Code:
    private ByteBuffer myBuffer;
 ...  
    public SVNDeltaReader() {
        myBuffer = ByteBuffer.allocate(4096);
        myBuffer.clear();
        myBuffer.limit(0);
    }
Yes. There is a call to ByteBuffer.clear there.

That file did change in the svnkit update - but that code I quoted did not change; it was there, just like that, in the previous version.

Interesting that there was no problem compiling it but it threw a NoSuchMethodError when you tried to execute it.

I set my JDK to 1.8.0_172 (earlier than yours - 1.8.0_261).
It compiled fine.
It started up fine.
svn update worked; it updated autoscend as expected.

I don't know why your version of java.nio.ByteBuffer could not find a clear() method, but mine could.
FWIW, I have a Mac and you have Windows - but, as I mentioned, this code did not change in the recent update.
 

Veracity

Developer
Staff member
I did another experiment.

I have Java v1.8.0_261-b12 installed as my JRE
I find my .jar file and double click it. That starts it with my installed JRE
I log in and "update all scripts" via the Script anager.

I get a ton of errors in my DEBUG log:

Code:
Unexpected error, debug log printed.
class org.tmatesoft.svn.core.SVNException: svn: E200030: There are unfinished transactions detected in '/Users/pld/Library/Application Support/KoLmafia/svn/kol-airport-colors'

I go to the gCLI and do "svn update". No DEBUG log, but at the end I see:

Code:
svn: E200030: There are unfinished transactions detected in '/Users/pld/Library/Application Support/KoLmafia/svn/kol-airport-colors'
svn: E200030: There are unfinished transactions detected in '/Users/pld/Library/Application Support/KoLmafia/svn/kol-airport-colors'
I go to my Terminal window and compile KoLmafia with 1.8.0_172
I execute the jar file from the command line.
svn update from the gCLI.
No errors.

I conclude that Java 1.8.0_261 is buggy.
 

fronobulax

Developer
Staff member
FWIW

svn: E200030: There are unfinished transactions detected in '/Users/pld/Library/Application Support/KoLmafia/svn/kol-airport-colors'

is similar to my recollection of an error messages I got a long time ago. I was using TortoiseSVN on mafia's SVN directories and there were updates and checkins that did not complete because I lost the network. mafia wouldn't update, which was acceptable behavior under the circumstances. The TortoiseSVN GUI command that fixed this was "Clean Up". Perhaps some of the behavior is SVNKit not handling some types of SN errors well?

That said, the buggy Java hypothesis is well supported by https://github.com/jruby/jruby/issues/5450 and https://jira.mongodb.org/browse/JAVA-2559

Solutions suggested there are to cast ByteBuffer to Buffer or compile with -release 8
 

xKiv

Active member
I did NOT get the same error with jdk_1.8.0_131 either, FWIW (on windows).
(and then I waited several hours to post this, oops)
(but at least it got me to upgrade to jdk 14 and corresponding eclipse, so *something* good happened from it?)
 
Last edited:

Veracity

Developer
Staff member
Nice. That MongoDB bug report explained very nicely what the issue is.

Code:
Handle Java 9 additions of covariant return types to java.nio.ByteBuffer methods

Description
Java 9 introduces overridden methods with covariant return types for the following methods in java.nio.ByteBuffer that are used by the driver:

position
limit
flip
clear

In Java 9 they all now return ByteBuffer, whereas the methods they override return Buffer, 
resulting in exceptions like this when executing on Java 8 and lower:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer

This is because the generated byte code includes the static return type of the method, which is not found on Java 8 and lower because the overloaded methods with covariant return types don't exist.

The solution is to cast ByteBuffer instances to Buffer before calling the method.
I looked through svnkit and they have the following files which use ByteBuffers:

Code:
./core/io/diff/SVNDiffInstruction.java:15:import java.nio.ByteBuffer;
./core/io/diff/SVNDiffWindow.java:17:import java.nio.ByteBuffer;
./core/internal/delta/SVNDeltaCombiner.java:29:import java.nio.ByteBuffer;
./core/internal/delta/SVNDeltaReader.java:20:import java.nio.ByteBuffer;
./core/internal/delta/SVNDeltaAlgorithm.java:14:import java.nio.ByteBuffer;
./core/internal/util/SVNCharsetConvertor.java:20:import java.nio.ByteBuffer;
./core/internal/util/SVNEncodingUtil.java:16:import java.nio.ByteBuffer;
./core/internal/util/SVNUUIDGenerator.java:16:import java.nio.ByteBuffer;
./core/internal/util/SVNSkel.java:17:import java.nio.ByteBuffer;
./core/internal/util/SVNCharsetInputStream.java:17:import java.nio.ByteBuffer;
./core/internal/util/SVNCharsetOutputStream.java:20:import java.nio.ByteBuffer;
./core/internal/io/svn/sasl/SaslInputStream.java:17:import java.nio.ByteBuffer;
./core/internal/io/svn/sasl/SaslOutputStream.java:16:import java.nio.ByteBuffer;
./core/internal/io/dav/handlers/DAVProppatchHandler.java:16:import java.nio.ByteBuffer;
./core/internal/io/fs/FSInputStream.java:16:import java.nio.ByteBuffer;
./core/internal/io/fs/FSRepositoryUtil.java:18:import java.nio.ByteBuffer;
./core/internal/io/fs/FSFile.java:23:import java.nio.ByteBuffer;
./core/internal/wc/SVNFileUtil.java:34:import java.nio.ByteBuffer;
./core/internal/wc/admin/SVNTranslatorOutputStream.java:16:import java.nio.ByteBuffer;
./core/internal/wc/admin/SVNTranslator.java:15:import java.nio.ByteBuffer;
./core/internal/wc/admin/SVNTranslatorInputStream.java:16:import java.nio.ByteBuffer;
./core/internal/wc/SVNSubstitutor.java:15:import java.nio.ByteBuffer;
That would be a LOT of work. Perhaps I shoud file a bug report at svnkit and hope Sombebody Else will fix it in the official codebase. :)

That jruby bug report had an alternate suggestion:

Code:
the problem is that I have a jruby's binary that was compiled with java 9, but executed with java 8.
...
If you specify -release 8 it will only compile against Java 8 APIs, which should solve all these cases in one swoop.
The "javac" ant task lets you specify release="8" in order to call the Java compiler with -release 8.
Unfortunately, that was added in ant 1.9.8 and I only had ant 1.9.3
Fortunately, "brew install ant" got me ant 1.10.8.
It works like a charm.

Those of you who compile from sources will need to make sure you have an updated ant.
Sorry for the inconvenience.
 
Top