This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-01
Channels
- # 100-days-of-code (2)
- # beginners (83)
- # calva (3)
- # cider (98)
- # clara (3)
- # clj-kondo (2)
- # clojure (84)
- # clojure-dev (59)
- # clojure-europe (11)
- # clojure-italy (22)
- # clojure-madison (4)
- # clojure-nl (3)
- # clojure-spec (24)
- # clojure-uk (80)
- # clojurescript (33)
- # clr (3)
- # datomic (59)
- # events (2)
- # fulcro (20)
- # interop (35)
- # jobs (6)
- # jobs-rus (1)
- # joker (3)
- # kaocha (2)
- # luminus (3)
- # off-topic (16)
- # other-languages (2)
- # pathom (17)
- # planck (2)
- # reagent (1)
- # shadow-cljs (1)
- # test-check (1)
- # tools-deps (49)
- # vim (16)
could you drop the first 10 lines or so of the stack trace? (pst)
what jvm were the protobuff objects compiled with?
so java modules were added in Java 1.9, not sure if that's involved here (doesn't really look like it from the message)
IllegalAccessError tried to access field com.google.protobuf.AbstractMessage.memoizedSize from class com.foo.Foo$Bar
com.foo.Foo$Bar.getSerializedSize (DQAProto.java:7881)
com.google.protobuf.AbstractMessageLite.toByteArray (AbstractMessageLite.java:62)
message_window_enricher.interop.Interop.messageWindowToBytes (Interop.kt:12)
user/eval32140 (NO_SOURCE_FILE:1)
user/eval32140 (NO_SOURCE_FILE:1)
clojure.lang.Compiler.eval (Compiler.java:7177)
clojure.lang.Compiler.eval (Compiler.java:7132)
clojure.core/eval (core.clj:3214)
clojure.core/eval (core.clj:3210)
clojure.main/repl/read-eval-print--9086/fn--9089 (main.clj:437)
clojure.main/repl/read-eval-print--9086 (main.clj:437)
clojure.main/repl/fn--9095 (main.clj:458)
I'm kind of wondering if you'd have same result if you had compiled the protobuf object w/Java 12
Thing is, I have a project, in pure java 1.8, does the same thing, works fine. Even when I switch the project to java 12, works fine
well those symptoms sound like a reflection issue - if you (set! *warn-on-reflection* true)
, do you see any reflection warnings?
reading the error, it sounds like messages can cache the computed size in the private memoizedSize field in the parent abstract class and the child class is unable to access the abstract parent field?
it's possible this is module related
the confusing thing here is that the access error seems to be in calls from one external thing to another external thing, not in the Clojure call itself
sure, although not sure how much time I have to look at it
So, a huge thank you to Alex who helped me to get a solution to my problem by pointing the finger!
I had a rogue import of a protobuf library all the way from rebel readline which included the cljs libraries which included the closure compiler which included a version of protobuf that I am not using!
:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "RELEASE" :exclusions [org.clojure/google-closure-library
rewrite-cljs/rewrite-cljs]}}
btw, it's a bad idea to use RELEASE versions, much better to set a fixed version
cool. I think there's some clojure lein plugin that does something similar too, but can't remember what it's called
(I just added the Zulip mirror bot so future discussions here will be archived and searchable within Zulip -- I didn't even know this channel existed!)