I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!*

CompilerException java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)

this is beyond belief! I thought I sorted that at the office...before leaving I tried lein2 repl/lein2 test 5 times and it worked every single time!!!!

my project.clj is here: https://github.com/jimpil/hotel-nlp/blob/master/project.clj

sorted@sorted-desktop:~$ java -version
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

sorted@sorted-desktop:~/clooJWorkspace/hotel-nlp$ lein2 deps :tree
 [edu.stanford.nlp/stanford-corenlp-models "1.3.4-models"]
 [edu.stanford.nlp/stanford-corenlp "1.3.4"]
   [de.jollyday/jollyday "0.4.7"]
     [javax.xml.bind/jaxb-api "2.2.7"]
   [joda-time "2.1"]
   [xom "1.2.5"]
     [xalan "2.7.0"]
     [xerces/xercesImpl "2.8.0"]
     [xml-apis "1.3.03"]
 [experiment "1.5.3"]
 [net.sf.jwordnet/jwnl "1.4_rc3"]
   [commons-logging "1.1.1"]
 [org.apache.lucene/lucene-snowball "3.0.3"]
 [org.apache.opennlp/opennlp-maxent "3.0.3-SNAPSHOT"]
 [org.apache.pdfbox/pdfbox "1.7.1"]
   [org.apache.pdfbox/fontbox "1.7.1"]
   [org.apache.pdfbox/jempbox "1.7.1"]
 [org.clojure/clojure "1.5.0-RC16"]
 [org.clojure/data.zip "0.1.1"]
 [uk.ac.gate/gate-core "7.1"]
[com.thoughtworks.xstream/xstream "1.4.2" :exclusions [[xmlpull] [xpp3/xpp3_min]]]
   [commons-io "2.1"]
   [commons-lang "2.6"]
[jaxen "1.1" :scope "runtime" :exclusions [[xml-apis] [xerces/xercesImpl] [xom]]]
     [dom4j "1.6.1" :scope "runtime"]
   [jdom "1.0"]
   [junit "4.10" :exclusions [[org.hamcrest/hamcrest-core]]]
   [log4j "1.2.17"]
   [net.sourceforge.nekohtml/nekohtml "1.9.14" :exclusions [[xml-apis]]]
   [org.apache.ant/ant "1.8.1"]
     [org.apache.ant/ant-launcher "1.8.1"]
   [org.apache.ivy/ivy "2.2.0"]
   [org.apache.lucene/lucene-core "3.5.0"]
[org.apache.tika/tika-parsers "1.0" :scope "runtime" :exclusions [[rome] [edu.ucar/netcdf] [org.ccil.cowan.tagsoup/tagsoup] [asm] [de.l3s.boilerpipe/boilerpipe] [org.apache.geronimo.specs/geronimo-stax-api_1.0_spec]]]
     [com.drewnoakes/metadata-extractor "2.4.0-beta-1" :scope "runtime"]
     [commons-codec "1.5" :scope "runtime"]
     [org.apache.commons/commons-compress "1.3" :scope "runtime"]
     [org.apache.james/apache-mime4j-core "0.7" :scope "runtime"]
     [org.apache.james/apache-mime4j-dom "0.7" :scope "runtime"]
[org.apache.poi/poi-ooxml "3.8-beta4" :scope "runtime" :exclusions [[stax/stax-api] [xml-apis]]]
       [org.apache.poi/poi-ooxml-schemas "3.8-beta4" :scope "runtime"]
         [org.apache.xmlbeans/xmlbeans "2.3.0" :scope "runtime"]
     [org.apache.poi/poi-scratchpad "3.8-beta4" :scope "runtime"]
     [org.apache.poi/poi "3.8-beta4" :scope "runtime"]
     [org.apache.tika/tika-core "1.0" :scope "runtime"]
     [org.bouncycastle/bcmail-jdk15 "1.45" :scope "runtime"]
     [org.bouncycastle/bcprov-jdk15 "1.45" :scope "runtime"]
[org.codehaus.woodstox/woodstox-core-lgpl "4.1.3" :exclusions [[javax.xml.stream/stax-api]]]
     [org.codehaus.woodstox/stax2-api "3.1.1"]
   [org.springframework/spring-aop "2.0.8"]
     [aopalliance "1.0"]
     [org.springframework/spring-beans "2.0.8"]
     [org.springframework/spring-core "2.0.8"]
   [org.xhtmlrenderer/flying-saucer-core "9.0.1"]
   [uk.ac.gate/gate-asm "3.1"]
   [uk.ac.gate/gate-compiler-jdt "3.7.1"]
   [urbanophile/java-getopt "1.0.9"]
   [xmlunit "1.2"]
   [xpp3 "1.1.3.4.O" :scope "runtime"]


My actual project has practically no dependencies! All that stuff I need to test what I'm doing. I'm providing the glue (the protocols and the extension-points) for several NLP libraries...after I'm done with each library, I need to pull it in and use it exactly as a consumer would. At the moment I've only done openNLP , stanfordNLP & GATE so it is normal to see those and their dependencies in the dep-tree. They are used in examples/workflows.clj which demonstrates how the 'glue' feels like from a consumer's perspective...

any help to get to the bottom of this will be really appreciated guys...This is a rather ambitious project but I'd like for it to step on its feet quite early....I can't do anything while this persists...I mean, I can but it is eating my brain...


Jim





On 28/02/13 15:46, Jim foo.bar wrote:
On 28/02/13 15:36, Softaddicts wrote:
Hi,

can you post the JVM used, maybe a snippet of the code around line 68,
the dependencies tree (lein deps :tree) and your project.clj ?

With these we can probably find the root cause of this.

Luc P.

Hi Luc,

thanks for your interest but I think I've cracked it...:) the code that was causing this is the following record. You will notice that 'deploy' delegates to 'run' per component. But then, since a WorkFlow can be a Component as well, the 'run' fn should NOT delegate to 'deploy' as it will only go round in circles! So, from what I understand '(deploy this text)' should be '(reduce #(run %2 %) text components))' which is basically what 'deploy' does! This is in-line with what Marko / Meikel suggested...


(defrecord Workflow [components] ;;a seq of components - the workflow can itself be a component
IWorkflow
(getComponents [this] components) ;;just return all components
(appendComponent [this c] (conj (vec components) c))
(addComponent [this pos c] (addC components pos c))
(removeComponent [this pos] (removeC components pos))
(replaceComponent [this pos replacement] (replaceC components pos replacement))
(deploy [_ text intermediates?]
((if intermediates? reductions reduce)
(fn [init c] (run c init)) text components))
(deploy [this text] (deploy this text false))
;(deploy [this] (deploy this))
IComponent
(link [this pos other]
(Workflow. (help/link this pos other)))
;(run [this] (deploy this))
(run [this text] (deploy this text) ;(reduce #(run %2 %) text components))
;(run [this text & more] (deploy this text (first more)))
clojure.lang.IFn ;;can act as an fn
(invoke [this arg]
(deploy this arg))
(applyTo [this args]
(apply deploy this args)) ) Jim


--
--
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
--- 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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to