stardustman opened a new issue, #1577:
URL: https://github.com/apache/incubator-fury/issues/1577

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-fury/issues) and found no similar 
issues.
   
   
   ### Version
   
   1. jdk1.8.0_241
   2. fury v0.4.1
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   test code as follows:
   
   ```java
   public class FurySerde {
   
       // Note that Fury instances should be reused between
       // multiple serializations of different objects.
       private static final ThreadSafeFury fury = new 
ThreadLocalFury(classLoader -> {
           Fury f = Fury.builder()
                   .withLanguage(Language.JAVA)
                   .withClassLoader(classLoader)
                   .requireClassRegistration(false)
                   .build();
           return f;
       });
   
       public static byte[] encoder(Object object) {
           return fury.serialize(object);
       }
   
       public static <T> T decoder(byte[] bytes) {
           return (T) fury.deserialize(bytes);
       }
   
       public static void main(String[] args) {
           byte len = 10;
           ByteBuffer byteBuffer = ByteBuffer.allocate(len);
           for (int i = 0; i < len; i++) {
               byteBuffer.put((byte) i);
           }
           System.out.println(FurySerde.encoder(byteBuffer).length);
       }
   
   }
   ```
   
   
   ### What did you expect to see?
   
   get the size of serialization byte array
   
   ### What did you see instead?
   
   Exception in thread "main" java.lang.NoSuchMethodError: 
java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
        at io.fury.memory.MemoryBuffer.put(MemoryBuffer.java:404)
        at io.fury.memory.MemoryBuffer.write(MemoryBuffer.java:1935)
        at io.fury.memory.MemoryBuffer.write(MemoryBuffer.java:1928)
        at 
io.fury.serializer.BufferObject$ByteBufferBufferObject.writeTo(BufferObject.java:59)
        at io.fury.Fury.writeBufferObject(Fury.java:571)
        at 
io.fury.serializer.BufferSerializers$ByteBufferSerializer.write(BufferSerializers.java:45)
        at 
io.fury.serializer.BufferSerializers$ByteBufferSerializer.write(BufferSerializers.java:36)
        at io.fury.Fury.writeData(Fury.java:551)
        at io.fury.Fury.writeRef(Fury.java:344)
        at io.fury.Fury.write(Fury.java:319)
        at io.fury.Fury.serialize(Fury.java:255)
        at io.fury.Fury.serialize(Fury.java:221)
        at io.fury.ThreadLocalFury.serialize(ThreadLocalFury.java:67)
        at benchmarks.serde.FurySerde.encoder(FurySerde.java:37)
        at benchmarks.serde.FurySerde.main(FurySerde.java:51)
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to