pomegranate could not be found on class path - clojure

I am trying to do a tutorial about Castra and Hoplon and am trying to follow the basic steps to set it up. The project uses https://github.com/tailrecursion/boot to bootstrap itself, and I can't get it to work at all. I cloned the repo and built it (boot, that is), and get the following error when I try to use it to do anything (start the tutorial or do the hello world app thingy from boots github readme):
java.io.FileNotFoundException: Could not locate cemerick/pomegranate__init.class
or cemerick/pomegranate.clj on classpath:
at clojure.lang.RT.load (RT.java:443)
clojure.lang.RT.load (RT.java:411)
clojure.core$load$fn__5018.invoke (core.clj:5530)
clojure.core$load.doInvoke (core.clj:5529)
clojure.lang.RestFn.invoke (RestFn.java:408)
.......
I am very new to clojure in general but after googling around I don't know what to do. It seems kind of ironic also as the whole point of Pomegranate is to put things on your class path and the error is that it isn't on class path.

Inside the build.boot file check if your line 3 is:
#tailrecursion.boot.core/version "2.3.1"
And if you have boot.task 2.1.2 in your deps
[tailrecursion/boot.task "2.1.2"]
HTH

Related

Cursive editor gives classpath exception when trying to run clojure project that uses figwheel

Trying to get a project that uses figwheel running in Cursive. I can get everything running on the command line using run -m clojure.main script/figwheel.clj but when I follow the instructions for running within Cursive I get the following error:
java.io.FileNotFoundException: Could not locate figwheel_sidecar/repl_api__init.class or figwheel_sidecar/repl_api.clj on classpath.
Does anyone know why this works on the command line and not within Cursive? I believe I followed the directions that the project provided. Do I need to set my classpath somewhere in Cursive.

Failing to connect to compojure-app with LightTable

I just ran "lein new compojure-app guestbook" following the book "Web Development with Clojure". In one step the book is connecting to my Clojure project with light table. However when I try this I get the following error that makes no sense to me.
Here is the error I'm getting
Your Error
For the search engines, here is a copy of the pertinent part of your error:
Error loading lighttable.nrepl.handler: java.lang.RuntimeException: Unable to resolve var: reader/*alias-map* in this context
The Cause
Lighttable has upgraded to using a newer tools.reader.
I found two resources:
An applicable github issue that you might find helpful.
A forum thread covering the question (mentioned in the github issue above).
The Summarized Solution
Several people have solved this by simply running lein clean in their project directory.
If lein clean does not solve it for you, then here is the extended solution from the forum:
In project.clj. Replace
[compojure “1.1.6”]
with
[compojure “1.1.6” :exclusions [org.clojure/tools.reader]]
and add to the :dependencies list
[org.clojure/tools.reader “0.7.10”]
The reason seems to be that LightTable expects this version of
tools.reader, but Compojure brings in version 0.7.3
After employing this solution, you may wish to run lein clean again.

koji build : 'no package found for libcman.so.3'

I'm using a koji to build a package. In error, it's saying:
Error: Package: pacemaker-cluster-libs-1.1.10-14.el6.x86_64 (build)
Requires: libcman.so.3()(64bit)
What does it exactly mean?
'libcman.so' is in the package 'cluster'. Then I built the clusterlib, and add it into my build, but didn't fix the problem after I put 'cluster' into 'BuildRequires' since another problem 'no package found for cluster' came out.
I think I'm not on the correct track.
I didn't fix it, but did some work around to avoid it. It's '.so', so I don't think the python module I build really need it here. So I commented it out from the spec file. and Just ensure I have these packages installed at the server before I install the new python module.

Is any package or jar file required for Lancet in clojure?

Programmin Clojure by "Stuart Halloway" book talks about Lancet, Very first step is (use 'lancet) which is throwing some Exception,
Exception
user=> (use 'lancet)
java.io.FileNotFoundException: Could not locate lancet__init.class or lancet.clj
on classpath: (NO_SOURCE_FILE:0)
Is any jar file or some package is required to make this work?
You need lancet installed to use lancet. I'm surprised the book doesn't mention anything like that. Anyway, I would strongly recommend you use leiningen instead. Lancet is out of date and leiningen is the most popular build tool for clojure these days.

Is Clojure installable this way?

I downloaded Clojure 1.2 https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip , extracted it under /Library directory, created CLOJURE_HOME, added $CLOJURE_HOME/script to my $PATH.
When I'm trying to run clj or repl scripts that are located under script directory, I'm getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: jline/
ConsoleRunner
Caused by: java.lang.ClassNotFoundException: jline.ConsoleRunner
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Ok, jline.jar isn't in the CLASSPATH so I checked clj and repl scripts:
CLASSPATH=src/clj:test:test-classes:classes/:script/jline-0.9.94.jar:../clojure-contrib/target/clojure-contrib-1.2.0-SNAPSHOT.jar
if [ -z "$1" ]; then
exec java -server jline.ConsoleRunner clojure.main
else
SCRIPT=$(dirname $1)
export CLASSPATH=$SCRIPT/*:$SCRIPT:$CLASSPATH
exec java -Xmx3G -server clojure.main "$1" "$#"
fi
I downloaded jline.jar under $CLOJURE_HOME/script but I'm still getting the same error.
This lead me to the question:
What is the role of https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip anyway?
Is it supposed to be used to install Clojure? or just to to build and get clojure.jar?
I noticed no one is talking about installing Clojure this way.
Am I missing something?
Clojure, being a JVM language, has to deal with the JVM classpath. This makes 'installing' it a bit unwieldy and confusing. Rather than install it yourself like this, try out some tools like cljr and cake. I wrote a blog post about this that might be helpful: http://blog.raynes.me/?p=48
In summary: Check out cljr, cake, and leiningen.
The majority of people in the Clojure community don't have Clojure 'installed'. Most people use a build tool and/or cljr. It doesn't make a lot of sense to install Clojure to a central place when, inevitably, you're going to need dependency management, and jars will be copied around everywhere anyway. In any case, it's much easier to let a tool handle the classpath for you.
the clojure.zip file exists so people who write tools will have a place for their tools to get the parts they need ;)
For people not writing tools they are either working on/with the latest branch from github and so they get Clojure with a git pull or they are using the above mentioned liningen, cake, cljr , counterclockwise(eclipse), la clojure (intellij), or netbeans.