Fork me on GitHub
#interop
<
2019-06-30
>
dharrigan20:06:23

So, having a problem. I have a piece of code, that in Kotlin runs perfectly, it's basically a protobuf object that I call toByteArray on, i.e., message.toByteArray(). Works perfectly. The same in clojure (.toByteArray message) throws me an IllegalAccessException (JVMs in both cases is OpenJDK 12) and I'm on Clojure 1.10.1), here's what clojure is telling me...

dharrigan20:06:14

Execution error (IllegalAccessError) at com.foo.Foo$Bar/getSerializedSize (Bar.java:7881).
class com.foo.Foo$Bar tried to access private field com.google.protobuf.AbstractMessage.memoizedSize (com.foo.Foo$Bar and com.google.protobuf.AbstractMessage are in unnamed module of loader 'app')

dharrigan20:06:01

other functions on the message work, i.e., (.getDirection message) => "north"

dharrigan20:06:27

I've been stuck on this for a few hours, can't figure it out. I appeal to the collective wisdom!