FileNotFound Exception with example code


#1

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"}}}}}

#2

Any suggestion? May be I am doing something very silly…


#3

Hi Hkrishnan2005,

What command are you running at the time of this error? Could you copy it here? Are you running a :push?

Thanks,
Jaret


#4

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…

Additional errors…

Could not find artifact com.datomic:ion:jar:0.9.7 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:ion:jar:0.9.7 in clojars (https://repo.clojars.org/)
Could not find artifact com.datomic:java-io:jar:0.1.12 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:java-io:jar:0.1.12 in clojars (https://repo.clojars.org/)
Could not find artifact com.cognitect:s3-libs:jar:0.9.34 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.cognitect:s3-libs:jar:0.9.34 in clojars (https://repo.clojars.org/)
Could not find artifact com.datomic:ion-dev:jar:0.9.162 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:ion-dev:jar:0.9.162 in clojars (https://repo.clojars.org/)
This could be due to a typo in :dependencies, file system permissions, or network issues.

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.


#5

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:

https://docs.datomic.com/cloud/ions/ions-tutorial.html

If you still run into errors pulling down the artifacts please post the results here.