question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR BufferCleaner$ - ByteBuffer cleaner not initialised.

See original GitHub issue

I tried to call scala methods from java 8.

Java version:

java version “1.8.0_171” Java™ SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot™ 64-Bit Server VM (build 25.171-b11, mixed mode)

And found an error in program log:

09:19:57.473 ERROR BufferCleaner$ - ByteBuffer cleaner not initialised.
java.lang.NoSuchMethodError: sun.nio.ch.DirectBuffer.cleaner()Ljdk/internal/ref/Cleaner;
at swaydb.core.io.file.Cleaner$PreJava9$.clean(BufferCleaner.scala:43)
at swaydb.core.io.file.BufferCleaner$$anonfun$createActor$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$2.a
pply$mcV$sp(BufferCleaner.scala:78)
at swaydb.core.io.file.BufferCleaner$$anonfun$createActor$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$2.a
pply(BufferCleaner.scala:77)
at swaydb.core.io.file.BufferCleaner$$anonfun$createActor$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$2.a
pply(BufferCleaner.scala:77)
at swaydb.data.IO$.apply(IO.scala:381)
at swaydb.core.io.file.BufferCleaner$$anonfun$createActor$1$$anonfun$apply$4$$anonfun$apply$5.apply(BufferCleane
r.scala:77)
at swaydb.core.io.file.BufferCleaner$$anonfun$createActor$1$$anonfun$apply$4$$anonfun$apply$5.apply(BufferCleane
r.scala:77)
at swaydb.data.IO$Catch$.apply(IO.scala:389)
at swaydb.data.IO$Failure.orElse(IO.scala:662)

It seems that latest library isn’t compartible with java 8.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
javadevcommented, Apr 6, 2019

I tested it locally. No errors in log. Good job!

0reactions
simerplahacommented, Apr 6, 2019

I’ve pushed v0.8-beta.5 with a reflection based java8 cleaner. Please try it with the release.

We need configure travis to run tests for each build so we can test on multiple JVM versions as soon as possible to avoid these issues. I will keep updating on the progress of tests execution via travis in #4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix java.lang.OufOfMemoryError: Direct Buffer Memory
Cleaner class and Java reflection to call clean() method for freeing memory held by direct byte buffer. Since they are garbage collected using...
Read more >
How to unmap a file from memory mapped using FileChannel ...
A fatal error has been detected by the Java Runtime Environment: ... I don't know why invokeCleaner(ByteBuffer) is not proxied in the same...
Read more >
Allow configuration of direct byte buffer cleaner #9182 - GitHub
Currently netty routes all attempts to deallocate a direct byte buffers through PlatformDependent which uses a static Cleaner to free the ...
Read more >
ByteBuffer (Java Platform SE 8 ) - Oracle Help Center
A byte buffer is either direct or non-direct. Given a direct byte buffer, the Java virtual machine will make a best effort to...
Read more >
Serial.readBytesUntil - will not accept a BYTE buffer
Hello, I've been working on reading incoming serial data. My approach is to read packets into a local buffer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found