When I am trying to create a single cluster Hadoop environment, I cannot load the Node Manager or Resource Manager. From the log I get the error:
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 83 more
I gather this is from a dependency on javax.activation from JDK8. The only online solution I could find involved changing these two lines in the yarn-env.sh file in the usr/local/Cellar/hadoop/{version}/libexec/etc/hadoop folder:
export YARN_RESOURCEMANAGER_OPTS="--add-modules=ALL-SYSTEM"
export YARN_NODEMANAGER_OPTS="--add-modules=ALL-SYSTEM"
This did not work and I continue to get the same error in the log when trying to run the YARN manager. Can anyone advise as to how to get around this dependency?
Environment:
Mac OS Catalina 10.15.2
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
Apache Hadoop 2.10.0
You can set JAVA_HOME variable in hadoop-env.sh to the location of a Java 8 installation, then it should start okay
Alternatively, use Docker or a pre-built quickstart VM such as those from Cloudera
Related
I have downloaded the ant-media-server files and tried to launch the server.
But, I recently learned that Ant Media Server requires java 11.
So I updated the java version to java 11:
So when I run this command:
java -version
This is the result:
openjdk version "11.0.11-ea" 2021-04-20
OpenJDK Runtime Environment (build
11.0.11-ea+4-Ubuntu-0ubuntu3.16.04.1)
OpenJDK 64-Bit Server VM (build 11.0.11-ea+4-Ubuntu-0ubuntu3.16.04.1,
mixed mode, sharing)
And when I run this command:
javac -version
This is the result:
javac 11.0.11-ea
When I try to launch the Ant Media Server, this is the result I get:
Bootstrap exception: null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:122)
at org.red5.server.Bootstrap.main(Bootstrap.java:50)
Caused by: java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path: [/home/ahmed/Desktop/CodingPlayground/ant_media_server/ant_media_server/lib/native]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1683)
at org.bytedeco.javacpp.Loader.load(Loader.java:1300)
at org.bytedeco.javacpp.Loader.load(Loader.java:1123)
at org.bytedeco.ffmpeg.global.avutil.<clinit>(avutil.java:14)
at org.red5.server.Launcher.launch(Launcher.java:65)
... 6 more
Caused by: java.lang.UnsatisfiedLinkError: /home/ahmed/.javacpp/cache/ffmpeg-4.3.1-1.5.4-linux-x86_64.jar/org/bytedeco/ffmpeg/linux-x86_64/libjniavutil.so: libva-drm.so.2: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1633)
... 10 more
Any idea what's going on?
EDIT 1:
When I checked the JAVA_HOME environment variable, I found-out, it still points to java-8 files:
JAVA_HOME=/usr/lib/jvm/java-8-oracle
So I tried to see the files in /usr/lib/jvm, and this is what I found:
So maybe this is causing the problem?
I don't know to which file should I make JAVA_HOME point to instead.
EDIT 2:
I opened /etc/environment and modified JAVA_HOME to this:
JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64'
I also changed it globally by running:
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
And, I am still getting the same error.
check variables in /etc/profile
you may set java environment strong textvariables like this:
export JAVA_HOME=/usr/share/jdk1.6.0_14
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
So I am trying out the very very simple spring quickstart. You can find it here.
I have have java 1.8 installed, but am downloading Java 11 in the mean time from the suggested location (AdoptOpenJDK) just to be sure that isn't the problem.
I followed all the instructions, but when running the project, I get... nothing...
~/spring/demo$ java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
~/spring/demo$ ./mvnw spring-boot:run
It has been like this for 30 minutes while I've been typing out this question. There are no logs or anything to suggest what might be wrong.
Any ideas?
UPDATE: I am now getting a zip error within maven. I am still using java 1.8
~/spring/demo$ ./mvnw spring-boot:run
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.apache.maven.wrapper.Installer.unzip(Installer.java:169)
at org.apache.maven.wrapper.Installer.createDist(Installer.java:86)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:121)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61)
Trenin , Please check whether you have 7Zip/Winzip Software because during startup it looks for these to unzip certain dependencies that it downloads .
I downloaded JDK 15 for my windows 10 64 bit pc and put the environment variable JAVA-HOME correct and the PATH also. This give me in cmd:
C:\Users\patpin>java -version
java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
When I start Ghidra (even as admin) I get:
Error: Could not find or load main class LaunchSupport
Caused by: java.lang.ClassNotFoundException: LaunchSupport
Error: Could not find or load main class LaunchSupport
Caused by: java.lang.ClassNotFoundException: LaunchSupport
Error: Could not find or load main class LaunchSupport
Caused by: java.lang.ClassNotFoundException: LaunchSupport
Failed to find a supported JDK. Please refer to the Ghidra Installation Guide's Troubleshooting section.
Maybe this issue can be solved by updating the lunch.properties file.
First, try to fullfil their minimal requirements. According to ghidra's documentation
Current Ghidra 9.2.2 need Java 11 64-bit Runtime and Development Kit (JDK)
So, it is better to install java 11 64 bit.
If ghidra fails to locate the jdk, then force it by-
To launch with a specific version of Java, set the JAVA_HOME_OVERRIDE property in the support/launch.properties file. If this property is set to an incompatible version of Java, Ghidra will revert to automatically locating a compatible version.
This may be because you're using the release from github, and these releases are not built and only contain the source code.
Source: https://github.com/NationalSecurityAgency/ghidra/issues/2872
To fix the issue, you can try download ghidra from here https://www.ghidra-sre.org/
I wrote a java program for school and it compiled properly but when I tried to run it I got this message:
Exception in thread "main" java.lang.NoClassDefFoundError:
javafx/embed/swing/JFXPanel at Main.main(Main.java:5) Caused by:
java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
I have checked several sources but none match my exact problem. I use java version 11.0.2 and all this is being run on a mac and IDE is Atom.
$ java -version java version "11.0.2" 2019-01-15 LTS Java(TM) SE
Runtime Environment 18.9 (build 11.0.2+9-LTS) Java HotSpot(TM) 64-Bit
Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
The exception means that the JavaFX components are not present in the classpath.
In java 11, javaFX has been moved outside the JDK.
See for example this article.
You need to download the javaFX module for your platform, and add it yourself.
See those instructions.
Similar question to this one but with a different OS. I've installed the latest Java and verified by:
> java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
I also make sure that JAVA_HOME is set as system variable and verify it by:
> $env:java_home
C:\Program Files (x86)\Java\jdk1.8.0_192
Then, I tried both ZIP installation and MSI installation of the Elastic Windows Service. It's installed but doesn't run. When forced manually, it says that it can't do that on the local system (1067, the process terminated unexpectedly).
I tried to reinstall all the relevant components. I tried scm /scannow and reimporting the keys into registry. I tried to re-set the user and system environment variables. Etc. I'm out of ideas.
I noticed that there's no logs directory in Elastic installation root. Also, there's no configuration files in that directory as far I could see. Where exactly should they be located so I can check what's logged and play around with different settings.