OserverCommandGetGephi ClassNotFoundException OrientDB 3.0.6 - classnotfoundexception

Environment :
Docker : version 1.12.6
Linux : Centos 7
Java : Java 1.8.0_45
OrientDB : 3.0.6
Am trying to invoke OrientDB instance from an image built up using the Dockerfile from https://github.com/orientechnologies/orientdb-docker/blob/bc7e1c48bedbd259df885dd922a13f79dfef0107/3.0/x86_64/alpine/Dockerfile.
when run the image i get an exception in the middle of the start up process
2018-09-04 07:28:30:865 INFO - shutdown storage: OSystem... [OrientDBDistributed]Error during server execution
java.lang.IllegalArgumentException: Cannot create custom command invoking the constructor: com.orientechnologies.orient.graph.server.command.OServerCommandGetGephi(com.orientechnologies.orient.server.config.OServerCommandConfiguration#501d7d86)
at com.orientechnologies.orient.server.network.OServerNetworkListener.createCommand(OServerNetworkListener.java:129)
at com.orientechnologies.orient.server.network.OServerNetworkListener.<init>(OServerNetworkListener.java:88)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:453)
at com.orientechnologies.orient.server.OServerMain$1.run(OServerMain.java:48)
Caused by: java.lang.ClassNotFoundException: com.orientechnologies.orient.graph.server.command.OServerCommandGetGephi
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.orientechnologies.orient.server.network.OServerNetworkListener.createCommand(OServerNetworkListener.java:123)
While am able to download the same OrientDB bits and start up the instance directly (without using docker) thru the $ORIENT_HOME/bin/server.sh script.
Any help in resolving this issue ?
Please let me know.

Related

Docker Java class error when I try to run docker image of a spring boot application

I'm trying to run a docker image but I keep having the error below
docker run -p 8080:8080 nacer/my-image-name-1
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
This is my Dockerfile
FROM openjdk:8
EXPOSE 8080
ADD target/docker-demo-1.jar docker-demo-1.jar
ENTRYPOINT ["java","-jar","docker-demo-1.jar"]
Is that because because the java version?
this my java version (java version "1.8.0_351")
I try to run spring boot application from my image in docker hub. I was expecting to run the spring application. after I type :
docker run -p 8080:8080 nacer/my-image-name-1

Why did I wrong in the installation of javaFx?

in the first time thank's for your time.
I have buy a new MacBook Pro M1 and I would like to continue an old project.
I use Eclipse to code, and I had load all my files.
I installed java with this website https://openjfx.io/openjfx-docs/#install-java but it didn't work anyway.
My 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 try to run I have this message :
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:273)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more
Someone can help me to explain how delete all and re-install properly ? Or explain what I did wrong..
Thank's !

Unable to start elasticsearch 2.2.0

I have installed elasticsearch 2.2.0 and it worked fine for a week, but now it didn't start. I have set both JAVA_HOME and JRE_HOME. I use java version 1.8 (i.e., jdk1.8.0_201 and jre1.8.0_202). When I try to start the elasticsearch.bat it terminates with a error message of:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/cli/CommandLineParser
Likely root cause: java.lang.ClassNotFoundException:
org.apache.commons.cli.CommandLineParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:241)
at
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
But no logs has been generated.

Problems when trying to create proxy in WSO2

I was training the creating of proxy in wso2, in the tutorial: https://docs.wso2.com/display/ESB490/Sending+a+Simple+Message+Through+the+ESB
and had some problems in pass 2 of: 'Building and deploying SimpleStockQuoteService', when i try to run the wso2server.bat, i receive the message bellow:
"Starting Sample Axis2 Server ..."
Using AXIS2_HOME: C:\Oxaguia spk\Trabalhos\Coach IT\Piramidal\Servers\wso2ei-6.1.1\samples\axis2Server
Using JAVA_HOME: C:\Program Files\Java\jdk1.8.0_121
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Server could not start due to class loading issue java.lang.NoSuchMethodException: samples.util.SampleAxis2Server.startServer([Ljava.lang.String;)
I saw in the internet that it would be because of my jdk version, and i tried the 1.7.0_45 and 1.6.0_45. In this case i had this message:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : 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 sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
The AXIS2_HOME was created too with the way: 'C:\Oxaguia spk\Trabalhos\Coach IT\Piramidal\Servers\wso2ei-6.1.1\samples\axis2Server'
I really don't know what happening. If someone could help me i would stay quite grateful.
ps: After tried the tutorial of 584, to change the axis2server.bat, in the git hub, i receive this message:
"Starting Sample Axis2 Server ..."
Using AXIS2_HOME: C:\Oxaguia spk\Trabalhos\Coach IT\Piramidal\Servers\wso2ei-6.1.1\samples\axis2Server
Using JAVA_HOME: C:\Program Files\Java\jdk1.8.0_144
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[main] INFO samples.util.SampleAxis2ServerManager - [SimpleAxisServer] Starting
[SimpleAxisServer] Using the Axis2 Repository : C:\Oxaguia spk\Trabalhos\Coach IT\Piramidal\Servers\wso2ei-6.1.1\samples\axis2Server\repository
[SimpleAxisServer] Using the Axis2 Configuration File : C:\Oxaguia spk\Trabalhos\Coach IT\Piramidal\Servers\wso2ei-6.1.1\samples\axis2Server\repository\conf\axis2.xml
[main] WARN org.apache.axiom.util.stax.dialect.StAXDialectDetector - Unable to determine dialect of the StAX implementation at jar:file:/C:/Oxaguia%20spk/Trabalhos/Coach%20IT/Piramidal/Servers/wso2ei-6.1.1/wso2/components/plugins/axiom_1.2.11.wso2v11.jar!/
[main] FATAL samples.util.SampleAxis2ServerManager - [SimpleAxisServer] Shutting down. Error starting SimpleAxisServer
org.apache.axis2.deployment.DeploymentException: javax/transaction/SystemException
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:704)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:124)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:887)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at samples.util.SampleAxis2ServerManager.start(SampleAxis2ServerManager.java:93)
at samples.util.SampleAxis2Server.startServer(SampleAxis2Server.java:61)
at samples.util.SampleAxis2Server.main(SampleAxis2Server.java:40)
Caused by: java.lang.NoClassDefFoundError: javax/transaction/SystemException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:688)
... 8 more
Caused by: java.lang.ClassNotFoundException: javax.transaction.SystemException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
Thank you everyone.
Enterprise Integrator 6.1.1 supported on JDK version 1.8.* 1 (Not supported on lower JDK versions).
The issue you observed is fixed 2 in the upcoming version.
The 2nd error happens because you are using a higher JDK during compile time and lower JDK during runtime.
Try both compiling and running on 1.7.

Spark without Hadoop: Failed to Launch

I'm running Spark 2.1.0, Hive 2.1.1 and Hadoop 2.7.3 on Ubuntu 16.04.
I download the Spark project from github and build the "without hadoop" version:
./dev/make-distribution.sh --name "hadoop2-without-hive" --tgz
"-Pyarn,hadoop-provided,hadoop-2.7,parquet-provided"
When I run ./sbin/start-master.sh, I get the following exception:
Spark Command: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -cp /home/server/spark/conf/:/home/server/spark/jars/*:/home/server/hadoop/etc/hadoop/:/home/server/hadoop/share/hadoop/common/lib/:/home/server/hadoop/share/hadoop/common/:/home/server/hadoop/share/hadoop/mapreduce/:/home/server/hadoop/share/hadoop/mapreduce/lib/:/home/server/hadoop/share/hadoop/yarn/:/home/server/hadoop/share/hadoop/yarn/lib/ -Xmx1g org.apache.spark.deploy.master.Master --host ThinkPad-W550s-Lab --port 7077 --webui-port 8080
========================================
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/Logger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I edit SPARK_DIST_CLASSPATH according to the post Where are hadoop jar files in hadoop 2?
export SPARK_DIST_CLASSPATH=~/hadoop/share/hadoop/common/lib:~/hadoop/share/hadoop/common:~/hadoop/share/hadoop/mapreduce:~/hadoop/share/hadoop/mapreduce/lib:~/hadoop/share/hadoop/yarn:~/hadoop/share/hadoop/yarn/lib
But I'm still getting the same error.
I can see the slf4j jar file is under ~/hadoop/share/hadoop/common/lib.
How could I fix this error?
Thank you!
“Hadoop free” builds need to modify SPARK_DIST_CLASSPATH to include Hadoop’s package jars.
The most convenient place to do this is by adding an entry in conf/spark-env.sh :
export SPARK_DIST_CLASSPATH=$(/path/to/hadoop/bin/hadoop classpath)
check this https://spark.apache.org/docs/latest/hadoop-provided.html

Resources