I'm trying to install Jigsaw on Linux. I have installed on my machine JDK.here is the message of java -version:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
I followed your instructions but when I execute install.sh I receive:
./install.sh: 5: cd: can't cd to Jigsaw
Errore: impossibile trovare o caricare la classe principale Install
So I choose the manual way exporting CLASSPATH but when I execute java Install here it is the message
Jigsaw/2.2.6 setup.
updating /home/mazzy/Scaricati/Jigsaw/Jigsaw/config/http-server.props ... Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/jigsaw/http/httpd
at Install.install(Install.java:134)
at Install.main(Install.java:210)
Caused by: java.lang.ClassNotFoundException: org.w3c.jigsaw.http.httpd
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 2 more
Related
This question already has answers here:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
(51 answers)
Closed 4 years ago.
I recently got into problem, while installing hadoop on single node machine.
The error log for command
bin/hadoop namenode -format
STARTUP_MSG: java = 1.7.0_80
************************************************************/
17/08/22 21:03:56 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
17/08/22 21:03:56 INFO namenode.NameNode: createNameNode [-format]
17/08/22 21:03:58 ERROR namenode.NameNode: Failed to start namenode.
java.lang.UnsupportedClassVersionError: org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.hadoop.mapreduce.util.ConfigUtil.addDeprecatedKeys(ConfigUtil.java:54)
at org.apache.hadoop.mapreduce.util.ConfigUtil.loadResources(ConfigUtil.java:42)
at org.apache.hadoop.mapred.JobConf.<clinit>(JobConf.java:119)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2134)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:95)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:78)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
at org.apache.hadoop.security.Groups.<init>(Groups.java:79)
at org.apache.hadoop.security.Groups.<init>(Groups.java:74)
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:303)
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:285)
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:262)
at org.apache.hadoop.security.UserGroupInformation.isAuthenticationMethodEnabled(UserGroupInformation.java:339)
at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:333)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:968)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1441)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)
17/08/22 21:03:58 INFO util.ExitUtil: Exiting with status 1
17/08/22 21:03:58 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hplap/127.0.1.1
************************************************************/
The java version i am using is
hduser#hplap:/usr/local/hadoop$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
The path variable is
hduser#hplap:/usr/local/hadoop$ echo $PATH
/home/hduser/bin:/home/hduser/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/hduser/bin:/usr/lib/java/jdk1.7.0_80/bin:/usr/local/hadoop/bin
The java home for hadoop-env.sh is
export JAVA_HOME=/usr/lib/java/jdk1.7.0_80
This code was compiled to be run on Java 8. It seems like you have a previous version of JVM on your cluster.
When I execute "mvn --version" I get this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Maven version I installed is maven 3.3.3
My java version is:
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
echo $PATH returns:
/Library/Maven/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
How to solve the problem of Maven?
$JAVA_HOME should be pointing to 1.8.0_65 as in your case.
If you want it to permanently change the value of JAVA_HOME, you will have to add the command to your ~/.profile file. Below are instructions on how to accomplish this instead:
Open up Terminal.app (Applications → Utilities → Terminal)
Type:
emacs .profile
Add this to the end of the .profile file:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
export JAVA_HOME;
Note that JAVA_HOME should be the path of your JDK directory.
Save and exit emacs (ctrl-x, ctrl-s; ctrl-x, ctrl-c)
Open a new Terminal window (cmd-n) and type:
$JAVA_HOME/bin/java -version
When trying to run namenode -format, I am getting below error. Can anyone please suggest how to resolve it? ( On mac os x 10.9.4 version. Hadoop 2.7.1 version)
Pro:hadoop-2.7.1 hadoop$ bin/hdfs namenode -format
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/hdfs/server/namenode/NameNode : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Java Version is as below...
Pro:hadoop-2.7.1 hadoop$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
In hadoop-env.sh path given as
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
51 Major version of Java class file format conforms to Java 7.
The Hadoop library in your version require Java 7, but you try to run it on Java 6 runtime which will not work.
i have added the ojdbc6.jar and the ojdbc6_g.jar file in the .bashrc but i keep getting the driver error:
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at jdbcdisplay.main(jdbcdisplay.java:17)
I have added the following Classpath to the .bashrc file for the ojdbc6.jar file:
export CLASSPATH=".:/home/shawnreese/Downloads/ojdbc6.jar:/home/shawnreese/Downloads/ojdbc6_g(1).jar"
The jar files are not even detected.They just keep showing the same error.On performing echo ${CLASSPATH} i get the jar file of opencsv.jar added in .bashrc.
.:/home/shawnreese/Downloads/opencsv-2.3/deploy/opencsv-2.3.jar
I am using java version:
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
and Oracle 11g Release 2.
I have a problem with compiling this java project https://github.com/nkitsul/pdfformfiller2
mkdir PdfFormFiller
cd PdfFormFiller/
git clone https://github.com/nkitsul/pdfformfiller2.git .
cd lib/
wget https://github.com/itext/itextpdf/releases/download/5.5.0/itext-5.5.0.zip
unzip itext-5.5.0.zip
cd ..
mkdir bin
javac -cp lib/itextpdf-5.5.0.jar PdfFormFiller.java -d bin/
java -cp ./bin PdfFormFiller.PdfFormFiller
After that I get this:
Exception in thread "main" java.lang.NoClassDefFoundError: com/itextpdf/text/DocumentException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.itextpdf.text.DocumentException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
What am I doing wrong?
My OS - Debian wheezy java version "1.7.0_55" OpenJDK Runtime
Environment (IcedTea 2.4.7) (7u55-2.4.7-1~deb7u1) OpenJDK 64-Bit
Server VM (build 24.51-b03, mixed mode)
javac 1.7.0_55
Add the iText JAR file to the runtime classpath
java -cp ./bin:lib/itextpdf-5.5.0.jar PdfFormFiller.PdfFormFiller