When used the ION Starter files in my example, I am getting this error…
CompilerException java.io.FileNotFoundException: Could not locate datomic/ion/lambda/api_gateway__init.class or datomic/ion/lambda/api_gateway.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(/Users/horizon/clj_projects/dctest/src/clj/dctest/datomic/ion/starter.clj:1:1)
DEPS.EDN file
{:paths [“src” “resources”]
:deps {;; Note that the Datomic client API is not a production
;; dep. It is already installed for you in Datomic Cloud.
;; The ion library includes helpers for interacting with
;; AWS, e.g. the ionize function to convert a Ring-like
;; web function so that it implements the contract expected
;; by AWS API Gateway.
com.datomic/ion {:mvn/version "0.9.7"}
org.clojure/data.json {:mvn/version "0.2.6"}
org.clojure/clojure {:mvn/version "1.9.0"}
com.datomic/ion-dev {:mvn/version "0.9.162"}
com.datomic/client-cloud {:mvn/version "0.8.54"}}
:mvn/repos {“datomic-cloud” {:url “s3://datomic-releases-1fc2183a/maven/releases”}}
:aliases
{:dev
{:extra-deps
{
;; The client-cloud library is a dev-time only dep
;; so that you can test interactively from a REPL.
com.datomic/client-cloud {:mvn/version “0.8.54”}
;; The ion-dev tooling implements the :push and
;; :deploy commands and is needed only at dev time.
com.datomic/ion-dev {:mvn/version "0.9.162"}}}}}
clj…following exactly as the tutorial/the video says…trying to ionize the function…My objective is to move my backend functions to ions behind a lambda, and connect it to an API Gateway…
I also added the deps.edn/config files to an existing project…with lein-tools-deps plugin…
Going back to basics… trying create a simple web app with (cljs/reagent/figwheel) front end, accessing Datomic Cloud backend, with local dev, and prod on aws…
A few guide lines on the workflow might be useful. Thanks.
I’d recommend that you leave lein out of the equation and use only what is in the Ions Tutorial. Start with Ion-starter tutorial app and build up to your application:
I’m grappling with the same exception, which shows up when I require datomic.client.api. Initially I had no such issue with the ion-starter tutorial and had been able to build my own ion project without problem. But at one point, requiring datomic.client.api started failing. Not quite sure how to solve it, I just deleted .m2 folder, reinstalled clojure, and downloaded the fresh ion-starter tutorial from the git repo. When I try to load the starter.clj file, I get the following error.
I checked .m2 folder which was emptied minutes ago and found the com/datomic/client-cloud folder missing. So I added the datomic-cloud dependency to the main :deps map and then I see the exception disappear. However, if I remove the dependency from the :deps map and only keep :extra-deps in the dev aliase, I get the exception back again.
@hkrishnan2005 From my experience, I suggest you include com.datomic/ion-dev in the main :deps map.
@jaret What puzzles me is that I didn’t have this kind of trouble when I did the ion-starter project a few weeks ago. I mean I didn’t need to add the com.datomic/client-cloud to the main :deps map. Now I’ve got to. Weird. I’m not well-educated about dependency problems, so I cannot provide better explanation than this report.
Having the same problem with ion-starter tutorial. I tried to manually delete the datomic/ion-dev and ~/datomic-cloud folders from ~/.m2 in the hope that it would refetch, but no dice.