9

I'm creating a compojure project using hiccup-1.0.0-beta1. I get the following stack trace when I runlein ring server-headless:

Caused by: java.lang.IllegalAccessError: defelem does not existat clojure.core$refer.doInvoke(core.clj:3287)at clojure.lang.RestFn.applyTo(RestFn.java:139)at clojure.core$apply.invoke(core.clj:542)at clojure.core$load_lib.doInvoke(core.clj:4781)at clojure.lang.RestFn.applyTo(RestFn.java:142)at clojure.core$apply.invoke(core.clj:542)at clojure.core$load_libs.doInvoke(core.clj:4800)at clojure.lang.RestFn.applyTo(RestFn.java:137)at clojure.core$apply.invoke(core.clj:544)at clojure.core$use.doInvoke(core.clj:4892)at clojure.lang.RestFn.invoke(RestFn.java:408)at hiccup.page_helpers$eval17$loading__4414__auto____18.invoke(page_helpers.clj:1)at hiccup.page_helpers$eval17.invoke(page_helpers.clj:1)at clojure.lang.Compiler.eval(Compiler.java:5424)

Which is confusing to me, because the filepage_helpers.clj no longer exists in hiccup:

$ jar tf lib/hiccup-1.0.0-beta1.jar META-INF/MANIFEST.MFMETA-INF/maven/hiccup/hiccup/pom.xmlMETA-INF/maven/hiccup/hiccup/pom.propertiesproject.cljhiccup/compiler.cljhiccup/core.cljhiccup/def.cljhiccup/element.cljhiccup/form.cljhiccup/middleware.cljhiccup/page.cljhiccup/util.clj$

Also, my code doesn't even try to bring in page_helpers.clj:

(ns views.layout     (:require [app-config :as config])    (:use hiccup.core)    (:use hiccup.page)    (:use hiccup.element))
askedMar 5, 2012 at 18:48
Kevin's user avatar
1
  • reverted to 0.3.8 and (after fixing up the :use statements) the code works fine...CommentedMar 5, 2012 at 21:29

1 Answer1

4

I'm having the same trouble.

I think you are using dev-dependencylein-ring. If you look in to your project/lib/dev folder, you'll seehiccup 0.3.X jar there. It is because the filering-devel jar file uses old hiccup. I guess the cause to the problem is to do with the conflicts between these files. But I haven't figured out a way to get around this yet.

However, if you uselein ring uberwar to create a deployable file, that file works in another container (eg. tomcat) just fine.

answeredMar 9, 2012 at 5:07
Huinan's user avatar
Sign up to request clarification or add additional context in comments.

3 Comments

in maven I can do dependency exclusions...I'm not a lein pro yet but I wonder if there's a way to exclude hiccup from lein-ring? But nice catch, that was bothering me...
This is how you exclude dependencies: :dev-dependencies [[lein-ring "0.5.4" :exclusions [hiccup]]] But i'm still getting an error
As per this github issuegithub.com/weavejester/hiccup/issues/41#issuecomment-4423262, This will be fixed only in Ring 1.1

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.