Tuesday, March 5, 2013

leinengen install error java.lang.ClassNotFoundException - klass: 'java/lang/ClassNotFoundException'

Leinengen doesnt work with Sun/Oracle jdk1.6.0_38, when installed and you point /etc/alternatives/java to the bin/java under jdk1.6.0_38 you get this error message:

 - klass: 'java/lang/ClassNotFoundException'
# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (exceptions.cpp:397), pid=5007, tid=139813236819712
#  fatal error: ExceptionMark destructor expects no pending exceptions
# JRE version: 6.0_38-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.13-b02 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /home/dc/hs_err_pid5007.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
/usr/bin/lein: line 319:  5007 Aborted                 $RLWRAP $LEIN_JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $LEIN_JVM_OPTS -XX:+TieredCompilation -Dleiningen.original.pwd="$ORIGINAL_PWD" -Dleiningen.trampoline-file=$TRAMPOLINE_FILE -cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" $NULL_DEVICE "$@"

Change back to openjdk by doing sudo yum install java-1.6.0-openjdk.x86_64

then make sure /usr/bin/java points to /etc/alternatives/java and /etc/alternatives/ajva is a symlink to the java under the directory where java-1.6.0-openjdk.x86_64 is installed, typically under /usr/lib. 

Error message sucks because if you have rlwrap installed it seems like the problem is from rlwrap. 

No comments:

Post a Comment