The following call:
(String/format "%s" "a")
... throws a "ClassCastException java.lang.String cannot be cast to [Ljava.lang.Object" exception in Clojure.
(String/format "%s" (cast Object "a"))
.... produces the same exception.
String.format is using varargs, which are internally plain Java arrays. You then need to convert the input parameters into an array, e.g. by using to-array:
user=> (String/format "%s" (to-array "a"))
"a"
String.formatand not Clojure.core/format - it wraps withto-arrayfor you?(format "%s" "a")