You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a Clojure webapp and used hickory for scraping web pages. I used io.github.clojure/tools.build {:git/tag "v0.9.1" :git/sha "27ff8a4"} for creating an uberjar of the app. I build it using clj -T:build uber, my deps.edn looking like this:
Then when I tried running the app using the java -jar target/gajbe.jar command, I encountered this exception:
Exception in thread "async-dispatch-1" java.lang.NoClassDefFoundError: hickory/core/HickoryRepresentable
at gajbe.rasclanjivaci.ProcesorBeogradskiOglasi.izvuci_oglase(rasclanjivaci.clj:97)
at gajbe.rasclanjivaci$fn__24183$G__24153__24185.invoke(rasclanjivaci.clj:10)
at gajbe.rasclanjivaci$fn__24183$G__24152__24188.invoke(rasclanjivaci.clj:10)
at clojure.core$map$fn__5935.invoke(core.clj:2770)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5467.invokeStatic(core.clj:139)
at clojure.core$apply.invokeStatic(core.clj:662)
at clojure.core$mapcat.invokeStatic(core.clj:2800)
at clojure.core$mapcat.doInvoke(core.clj:2800)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at gajbe.rasclanjivaci$dohvati_oglase.invokeStatic(rasclanjivaci.clj:117)
at gajbe.rasclanjivaci$dohvati_oglase.invoke(rasclanjivaci.clj:115)
at gajbe.poslovi$pokreni_obavestavaca$fn__24511$state_machine__21095__auto____24512$fn__24514.invoke(poslovi.clj:12)
at gajbe.poslovi$pokreni_obavestavaca$fn__24511$state_machine__21095__auto____24512.invoke(poslovi.clj:12)
at clojure.core.async.impl.runtime$run_state_machine.invokeStatic(runtime.clj:62)
at clojure.core.async.impl.runtime$run_state_machine.invoke(runtime.clj:61)
at clojure.core.async.impl.runtime$run_state_machine_wrapped.invokeStatic(runtime.clj:66)
at clojure.core.async.impl.runtime$run_state_machine_wrapped.invoke(runtime.clj:64)
at gajbe.poslovi$pokreni_obavestavaca$fn__24511.invoke(poslovi.clj:12)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at clojure.core.async.impl.concurrent$counted_thread_factory$reify__15124$fn__15125.invoke(concurrent.clj:29)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: hickory.core.HickoryRepresentable
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 27 more
It has nothing to do with the thread being async, because it happens with sync as well. I attach the uberjar and the only file in which I use the library.
@JovanToroman sorry for the delay on this. Is this still a problem? There's a lot going on here, would you be able to create a small reproducible sample project without any of your own code to see if the problem still exists?
Unfortunately I haven't made regular commits as I made changes to my code so I am not able to go back to the version when this error used to happen. I think that you can close this as I found a different way of building and running the jar.
I created a Clojure webapp and used hickory for scraping web pages. I used
io.github.clojure/tools.build {:git/tag "v0.9.1" :git/sha "27ff8a4"}
for creating an uberjar of the app. I build it usingclj -T:build uber
, my deps.edn looking like this:Then when I tried running the app using the
java -jar target/gajbe.jar
command, I encountered this exception:It has nothing to do with the thread being async, because it happens with sync as well. I attach the uberjar and the only file in which I use the library.
uberjar: gajbe.jar.zip
Clojure ns using hickory:
Let me know if you need any other info.
The text was updated successfully, but these errors were encountered: