On Mon, Nov 16, 2009 at 7:20 PM, Kent <squi...@aol.com> wrote:

> Hi,
>
> I am trying to use clojure to implement a "plugin" for some vendor
> supplied software.
>
> Here is a little background on the vendor supplied software.  It
> expects me to implement a particular interface and then put the jar
> file containing that implementation into a directory on its server.
> Then when a client runs the software, my implemented class gets "sent"
> to the client from the server via RMI and then my implementation of
> the interface runs on the client.  The client doesn't have my jar file
> (or the clojure jar file) in it's classpath.  Only the server has
> those jar files.  RMI seems to be smart enough to upload whatever
> dependencies are necessary.
>
> I have successfully built a very simple implementation in clojure and
> it seems to work. The problem is, I would like to be able to update my
> implementation on the client on the fly.  I embedded a repl-server in
> my class and I can successfully connect to it.  Just to be clear, the
> repl-server is running on the client and I am able to connect to the
> repl getting a prompt "clojure.core=>".  However, the repl seems to be
> quite crippled.  If I enter (+ 1 1) I get the following error:
> "java.lang.ClassNotFoundException: clojure.lang.Numbers".  If enter
> (str "kent") I get "java.lang.NoClassDefFoundError: clojure/lang/
> AFunction".  Most things I enter produce something similar.  I can
> however do a simple def such as (def x 3) and x does get defined so
> the REPL does seem to be running in some sense.
>
> It seems like it might be a classpath problem, but I'm not sure why my
> "compiled" code, running on the client would not have a classpath
> problem while the repl, running on the same client cant find core
> classes.
>
> Any ideas?
>

My guess is that it has something to do with the evaluator/compiler; it
seems AOT-compiled Clojure is working at the remote end, but the
evaluator/compiler isn't fully, and so the REPL acts up.

You might try sending a test class that does an "(eval '(+ 1 1))" at some
point and see if the test class blows up when it tries to do the eval. If it
does, then that proves that eval is what's crippled, and therefore probably
that not everything needed for on the fly bytecode generation is being
pulled in by RMI.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to