{"action":"opened","issue":{"url":"https://api.github.com/repos/aerospike/aerospike-client-java/issues/19","labels_url":"https://api.github.com/repos/aerospike/aerospike-client-java/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/aerospike/aerospike-client-java/issues/19/comments","events_url":"https://api.github.com/repos/aerospike/aerospike-client-java/issues/19/events","html_url":"https://github.com/aerospike/aerospike-client-java/issues/19","id":58455836,"number":19,"title":"Creating record from Clojure results into  \" Cannot cast com.aerospike.client.Bin to [Lcom.aerospike.client.Bin; \"","user":{"login":"andreiursan","id":173817,"avatar_url":"https://avatars.githubusercontent.com/u/173817?v=3","gravatar_id":"","url":"https://api.github.com/users/andreiursan","html_url":"https://github.com/andreiursan","followers_url":"https://api.github.com/users/andreiursan/followers","following_url":"https://api.github.com/users/andreiursan/following{/other_user}","gists_url":"https://api.github.com/users/andreiursan/gists{/gist_id}","starred_url":"https://api.github.com/users/andreiursan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreiursan/subscriptions","organizations_url":"https://api.github.com/users/andreiursan/orgs","repos_url":"https://api.github.com/users/andreiursan/repos","events_url":"https://api.github.com/users/andreiursan/events{/privacy}","received_events_url":"https://api.github.com/users/andreiursan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-21T11:16:51Z","updated_at":"2015-02-21T11:16:51Z","closed_at":null,"body":"Trying to create aerospike records, using the client e.g. version ```   [com.aerospike/aerospike-client \"3.0.34\"] ``` or  ``` [com.aerospike/aerospike-client \"3.0.20\"] ```\r\nresults in the following error:\r\n```ClassCastException Cannot cast com.aerospike.client.Bin to [Lcom.aerospike.client.Bin;  java.lang.Class.cast (Class.java:3133)```\r\n\r\n```clojure\r\n(ns todo-aerospike.domain.utils.db\r\n  (:import [com.aerospike.client Bin AerospikeClient Key Record Info]\r\n           [com.aerospike.client.cluster Node]\r\n           [com.aerospike.client.policy WritePolicy]))\r\n\r\n(def key-namespace \"todo-aerospike\")\r\n(def write-policy (new WritePolicy))\r\n\r\n(defn uuid []\r\n  (str (java.util.UUID/randomUUID)))\r\n\r\n(defn create [conn data]\r\n  \"[C]RUD creates a record  \"\r\n  (let [bin (new Bin (:column-name data) (:value data))\r\n        key (new Key key-namespace (:set-name data) (uuid))]\r\n        (println (.getClass bin)) ; for Debug\r\n        (. conn put write-policy key bin)))\r\n```\r\n\r\ntrying to create a record from the repl, results in the mentioned error\r\n```bash\r\n➜  todo-aerospike git:(master) ✗ lein repl\r\nnREPL server started on port 53426 on host 127.0.0.1 - nrepl://127.0.0.1:53426\r\nREPL-y 0.3.5, nREPL 0.2.6\r\nClojure 1.6.0\r\nJava HotSpot(TM) 64-Bit Server VM 1.7.0_67-b01\r\n    Docs: (doc function-name-here)\r\n          (find-doc \"part-of-name-here\")\r\n  Source: (source function-name-here)\r\n Javadoc: (javadoc java-object-or-class-here)\r\n    Exit: Control+D or (exit) or (quit)\r\n Results: Stored in vars *1, *2, *3, an exception in *e\r\n\r\n=> (in-ns 'todo-aerospike.domain.utils.db)\r\n=> (def conn (new AerospikeClient \"localhost\" 3000))\r\n=> (first (.getNodes conn))\r\n#<Node BB976C89B270008 127.0.0.1:3000>\r\n=>  (create conn { :column-name \"test\" :value \"work you client\" :set-name \"test\" })\r\ncom.aerospike.client.Bin\r\n\r\nClassCastException Cannot cast com.aerospike.client.Bin to [Lcom.aerospike.client.Bin;  java.lang.Class.cast (Class.java:3133)\r\n```\r\n\r\nand this is the stacktrace\r\n\r\n```bash\r\njava.lang.ClassCastException: Cannot cast com.aerospike.client.Bin to [Lcom.aerospike.client.Bin;\r\n        at java.lang.Class.cast(Class.java:3133)\r\n        at clojure.lang.Reflector.boxArg(Reflector.java:427)\r\n        at clojure.lang.Reflector.boxArgs(Reflector.java:460)\r\n        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:58)\r\n        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)\r\n        at todo_aerospike.domain.utils.db$eval6145.invoke(form-init4786145880839548089.clj:1)\r\n        at clojure.lang.Compiler.eval(Compiler.java:6703)\r\n        at clojure.lang.Compiler.eval(Compiler.java:6666)\r\n        at clojure.core$eval.invoke(core.clj:2927)\r\n        at clojure.main$repl$read_eval_print__6625$fn__6628.invoke(main.clj:239)\r\n        at clojure.main$repl$read_eval_print__6625.invoke(main.clj:239)\r\n        at clojure.main$repl$fn__6634.invoke(main.clj:257)\r\n        at clojure.main$repl.doInvoke(main.clj:257)\r\n        at clojure.lang.RestFn.invoke(RestFn.java:1523)\r\n        at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__5548.invoke(interruptible_eval.clj:67)\r\n        at clojure.lang.AFn.applyToHelper(AFn.java:152)\r\n        at clojure.lang.AFn.applyTo(AFn.java:144)\r\n        at clojure.core$apply.invoke(core.clj:624)\r\n        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1862)\r\n        at clojure.lang.RestFn.invoke(RestFn.java:425)\r\n        at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:51)\r\n        at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__5590$fn__5593.invoke(interruptible_eval.clj:183)\r\n        at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__5583.invoke(interruptible_eval.clj:152)\r\n        at clojure.lang.AFn.run(AFn.java:22)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n```"}}