Hi Stephen,
Thanks for the note. Yea that first post was kind of unwieldy.

hadoop-function takes in f and data, and does some preprocessing
before applying f to the processed data. (I tried it by just using f
directly and taking hadoop-function out, and same thing happens)

One of the problems that I am having is that I'm having a hard time to
reproduce this in a smaller manner.
Everything works out fine in the repl, but when the framework/runtime
starts up, it throws a ClassNotFoundException


It's trying to find:cascading$cascading_function__44$fn__46

When I look in my target directory/exploded jar, it has this
cascading$cascading_function__38$fn__40.class




On Jun 21, 8:36 pm, "Stephen C. Gilardi" <[email protected]> wrote:
> On Jun 21, 2009, at 11:07 PM, timshawn wrote:
>
>
>
>
>
> > I can't seem to figure out why java can't find the clojure class in
> > the following example,
> > where f is a clojure function....
>
> > (defn cascading-function [f]
> >  (proxy [BaseOperation Function] [(Integer. 1) (Fields. (into-array
> > Comparable ["line"]))]
> >    (operate [flowProcess functionCall]
> >      (let [clojureData (. (Tuple. (. (. functionCall getArguments)
> > getTuple)) getString 1)
> >            result (hadoop-function f clojureData)
> >            resultTuple (Tuple.)]
> >        (. resultTuple add result)
> >        (. (. functionCall getOutputCollector) add resultTuple)))))
>
> > cascading function returns a java object that implements Function
> > (from the cascading framework) and extends BaseOperation, and it
> > implements the operate method.
> > The error that I am seeing is a ClassNotFoundException for whatever I
> > pass in as f.
>
> The only place f appears is as the argument to hadoop-function. What's  
> that expecting for arguments?
>
> In general if you can come up with a small runnable example that shows  
> the problem (with as few dependencies as possible), that's the easiest  
> way for interested folks to help.
>
> Showing the relevant portion of the stack trace for the exception is  
> also likely to be helpful.
>
> You can get the stack trace for the most recent exception caught by  
> the REPL with
>
>         (.printStackTrace *e)
>
> (see also clojure.contrib.repl-utils for convenience functions around  
> that.)
>
> --Steve
>
>  smime.p7s
> 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to