Fork me on GitHub
#clara
<
2017-09-17
>
mmer10:09:10

More details:

mmer10:09:01

This must be something very simple about classpaths etc that I am not grasping. The Operation is defined as:

mmer10:09:03

(defrecord Operation [assemblyName name src])

mmer19:09:14

The erro I am getting is: ClassNotFoundException Thing java.net.URLClassLoader.findClass (URLClassLoader.java:381) - I am trying to isolate the issue into a simple set of files - hence the reference to Thing rather than Operation

mikerod21:09:10

@mmer I don’t see enough information here to be able to see what the problem coulud be

mikerod21:09:25

the class not found’s name is AssemblyOperation which you don’t even refer to in the rule debug-rules

mikerod21:09:33

So I’m not sure how they are connected

mikerod21:09:22

However, if classes are missing, I’d make sure you are appropriately requiring all necessary namespaces, including those that define types via things like defrecord

mmer22:09:06

Hi @mikerod - in trying to get a simple example out I have confused you all. Sorry. I now have a very simple project which is showing the issue.

mmer22:09:13

(apply-rules "name" "description") and I get the errors

mmer22:09:25

ClassNotFoundException Thing java.net.URLClassLoader.findClass (URLClassLoader.java:381)

mmer22:09:42

Everything to my eyes looks OK and follows the scheme of project layout that avoids cyclical dependencies, yet I can't get the reference to the rule to see the record defined in the shared files.

mikerod22:09:30

@mmer when defining types via defrecord (and similarly, deftype), a :refer from a :require does not import the class name to be used shorthand. So you need to refer to the class either by it’s fully qualified name, or add something like

(:import [rules.shared Thing])
to your rules namespaces using the class