tonivade / claudb

ClauDB is a REDIS implementation in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

latest release 1.8.0 not working with java 8, only with java 11

tonivade opened this issue · comments

It seems there are some incompatibilities in some java.nio.ByteBuffer methods in java 8 and java 11.

When you use cross compilation with java 11 to java 8, like in this project, the byte code generated is incorrect and not compatible with java 8.

See jetty/jetty.project#3244

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at com.github.tonivade.resp.protocol.SafeString.append(SafeString.java:106)
	at com.github.tonivade.claudb.command.string.AppendCommand.lambda$execute$0(AppendCommand.java:32)
	at com.github.tonivade.claudb.data.Database.merge(Database.java:78)
	at com.github.tonivade.claudb.command.string.AppendCommand.execute(AppendCommand.java:30)
	at com.github.tonivade.claudb.command.DBCommandWrapper.executeDBCommand(DBCommandWrapper.java:94)
	at com.github.tonivade.claudb.command.DBCommandWrapper.execute(DBCommandWrapper.java:82)
	at com.github.tonivade.claudb.command.CommandRule.execute(CommandRule.java:133)
	at com.github.tonivade.claudb.command.string.AppendCommandTest.testExecute(AppendCommandTest.java:24)