If you require a namespace that requires another namespace, this will all
be resolved and loaded automatically as long as all the namespace files can
be found on the classpath.

I suspect that what you showed here is not the full error output, it seems
to be missing the information we would need to know what actually went
wrong here.

On Sun, Dec 24, 2017 at 8:31 AM Pablo J. Villacorta <[email protected]>
wrote:

> Hi all,
>
> I am totally new to Clojure. From Java I am trying to call a Clojure
> function which belongs to a wider project and has dependencies. I have
> compiled the Clojure project to an uber jar running lein uberjar, the
> imported the jar into my Java project, and then did
>
> IFn require = Clojure.var("clojure.core", "require");
> require.invoke(Clojure.read("xapi-schema.core"));
>
> and then
>
> IFn myfunction = Clojure.var("xapi-schema.core",
> "validate-statement-data");
> myfunction.invoke("some string");
>
> but since myfile.core has dependencies (I see some "require" sentences in
> the Clojure code of that file), I wonder if I have to manually read all the
> dependent clojure files in the project (which are a lot), or there's a
> better way to do this from Java. The error I am getting is:
>
> java.lang.Exception: schema.utils.NamedError@cec1ce2
>
> at xapi_schema.core$validate_statement.invokeStatic(core.cljc:27)
> at xapi_schema.core$validate_statement.invoke(core.cljc:24)
> at
> xapi_schema.core$validate_statement_data_STAR_.invokeStatic(core.cljc:40)
> at xapi_schema.core$validate_statement_data_STAR_.invoke(core.cljc:38)
> at xapi_schema.core$validate_statement_data.invokeStatic(core.cljc:44)
> at xapi_schema.core$validate_statement_data.invoke(core.cljc:43)
> at clojure.lang.Var.invoke(Var.java:379)
> at
> StatementValidatorXAPITest.testClojureValidator(StatementValidatorXAPITest.java:133)
>
> where schema.utils is one of the files that I did not read explicitly from
> Java.
>
> Thank you so much in advance and Merry Christmas to everyone!
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to