Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; TO run:
- ;; - install clj
- ;; - start a clj REPL with presto: clojure -Sdeps '{:deps {com.facebook.presto/presto-jdbc {:mvn/version "0.219"}}}'
- ;; - copy-paste this gist content
- (ns hello-presto
- (:import [java.util Date]
- [com.facebook.presto.jdbc.internal.client FailureInfo FailureInfo$FailureException]))
- (println "Date bean:" (bean (Date.)))
- (println "Exception bean:" (bean (Exception. "something wrong")))
- (println "Runtime Exception" (bean (RuntimeException. "somemessage" nil)))
- ;; using presto with the clojure java.jdbc driver, when a query fails, I get this
- ;;java.lang.IllegalAccessException: Class clojure.core$bean$fn__6906$fn__6907 can not access a member of class com.facebook.presto.jdbc.internal.client.FailureInfo$FailureException with modifiers "public"
- ;; Here is a short reproduction
- ;;
- (println "FailureInfo:" (bean (FailureInfo. "sometype"
- "somemessage"
- nil
- []
- []
- nil)))
- (println "FailureInfo toException: " (bean (.toException (FailureInfo. "sometype"
- "somemessage"
- nil
- []
- []
- nil))))
- ;; Error printing return value (IllegalAccessException) at sun.reflect.Reflection/ensureMemberAccess (Reflection.java:102).
- ;; Class clojure.core$bean$fn__7182$fn__7183 can not access a member of class com.facebook.presto.jdbc.internal.client.FailureInfo$FailureException with modifiers "public"
- ;; {:cause nil, :class com.facebook.presto.jdbc.internal.client.FailureInfo$FailureException, :localizedMessage "somemessage", :message "somemessage", :stackTrace #object["[Ljava.lang.StackTraceElement;" 0x4b3a45f1 "[Ljava.lang.StackTraceElement;@4b3a45f1"], user=>
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement