- Oracle DBA and RAC DBA Expert
- Saved searches
- Use saved searches to filter your results more quickly
- Unable to run elasticsearch — Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version #2989
- Unable to run elasticsearch — Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version #2989
- Comments
- Oracle 12c Installation Error: «Exception . Could not initialize class sun.awt.X11.XToolkit»
Oracle DBA and RAC DBA Expert
When launching Database configuration assistant (DBCA) you may encounter this error. The “java.lang.NoClassDefFoundError” error encounter when it could not initialize class “sun.awt.X11.XToolkit”.
This normally occur when launching Graphic user interface (GUI)
Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
at oracle.assistants.dbca.driver.DBConfigurator.startup(DBConfigurator.java:378)
at oracle.assistants.dbca.driver.DBConfigurator.main(DBConfigurator.java:513)
The main causes of the issue is
1. The DISPLAY variable is NOT set or value is not correct.
2. X Windows is not installed
3. Oracle user not added to ACL (Access Control List)
If launching from server make sure you have any X Windows software installed and install org-x11-apps.x86_64 package
If you are launching from a local workstation, make sure you have XGraphics software such as Exceed, VLC…etc tools installed. Then You can set DISPLAY by using below command
In Some cases, users may face issue when installing Oracle software on Ubuntu or Linux environment.
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed
>>> Ignoring required pre-requisite failures. Continuing.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-08-01_12-17-01PM. Please wait . oracle$:~$ No protocol specified
Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
In this scenario, verify weather JDK installed on the system or not using below command
$ java -version
If not installed then installing required JDK will resolve the issue. If the problem persists, then run below command by logging as root
Switch back to Oracle user and run the installation.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run elasticsearch — Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version #2989
Unable to run elasticsearch — Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version #2989
Comments
I got an error using elasticsearch 0.90.0
I am unable to run it using elasticsearch sh script.
Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:251)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:235)
at org.elasticsearch.bootstrap.ElasticSearch.main(ElasticSearch.java:32)
The text was updated successfully, but these errors were encountered:
Exactly.
I have no root access (I am on my dev account on my company and I cannot ask for it for the moment).
22:56 lbelluccini@xxxxxx ~/tmp> java -version 10:56PM
java version «1.7.0_03»
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)
I tried to printout the ES_CLASSPATH and ES_HOME and they are correctly set by the script itself.
Linux xxxxxx 2.6.32.23-0.3-default #1 SMP 2010-10-07 14:57:45 +0200 x86_64 x86_64 x86_64 GNU/Linux
I got exactly the same error when using the official .deb (upgrade from 0.20.5 to 0.90.0), on Ubuntu 13.04 64bit and Oracle JDK 7u21.
I then apt-get purged the old installation, re-installed 0.90 from scratch, and everything worked fine. I didn’t investigate any further, but I would suspect either a problem with the existing elasticsearch.yml, or with an existing native script that I referenced there (which of course was compiled against 0.20.x). HTH.
Unfortunately I have no right to modify my system.
@klausbrunner I guess you do not have a way to reproduce your problem? Did you use plugins, which maybe included some more jars (even an old es installation maybe)?
@lucabelluccini have you maybe unzipped your elasticsearch zip file into an existing elasticsearch installation and then tried to start? Can you set the log level to TRACE in your logging.yml and check if you are getting more data logged, so we can debug this issue?
@spinscale I downloaded and untarred both 0.20 and 0.90 in different paths.
I got 2 different errors.
19:51 lbelluccini@nxxxxxxxx ~/repos/pi_stats/elasticsearch-0.90.0> Exception in thread «main» java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version 7:51PM
at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:251)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:235)
at org.elasticsearch.bootstrap.ElasticSearch.main(ElasticSearch.java:32)
19:52 lbelluccini@nxxxxxxxx ~/repos/pi_stats/elasticsearch-0.20.6> ./bin/elasticsearch -f 7:52PM
May 08, 2013 7:52:56 PM node
INFO: [Grasshopper I&II] [19688]: initializing .
May 08, 2013 7:52:56 PM plugins
INFO: [Grasshopper I&II] loaded [], sites []
May 08, 2013 7:52:56 PM bootstrap
SEVERE: : Initialization Failed .
- NoClassDefFoundError[org/apache/lucene/store/IndexInput]
ClassNotFoundException[org.apache.lucene.store.IndexInput]
@spinscale Yep, a plugin was also involved (phonetic). I can’t easily reproduce this now, but it seems likely that either the plugin or the native script may have been the culprit, as both had been built for 0.20.x.
@lucabelluccini can you show me all the commands (including the wget to download the archive) you executed in order to get your elasticsearch versions and to start elasticsearch. It doesnt like you downloaded the zip or the tar.gz distribution, otherwise I cannot explain why you lack lucene jars when starting elasticsearch.
I did the same on my unix vm and it worked.
I tried to print out es classpath etc. and it contains the jars.
Ok, this is getting even more strange.
To what is your JAVA_HOME set?
What is the difference between your unix VM and the system you are trying to install on? It is a standard linux, right?
Also would be interseting to see an export of all env vars.
Linux version 2.6.16.60-0.76.8-smp (geeko@buildhost) (gcc version 4.1.2 20070115 (SUSE Linux)) #1 SMP Tue Jan 11 11:23:59 UTC 2011
java version «1.7.0_03»
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)
SSH_TTY=/dev/pts/2
TERM=xterm
CDC_JOINED_ZO
PS1=%%T %%n%@%%m %%~%>%
RPS1=%t
DIRSTACKSIZE=50
HISTSIZE=1000
HISTFILE=/remote/users3/lbellucc/.zsh_history
SAVEHIST=500
TMPDIR=/gctmp/lbelluccini
FCEDIT=vi
EDITOR=vi
TZ=MET
TERMINFO=/usr/share/terminfo
MERCURIAL_VERSION=2.2.3
MERCURIAL_BASE=/opt/devsup/mercurial
MERCURIAL_PYTHONPATH=/opt/devsup/mercurial/mercurial-2.2.3/lib/python2.6/site-packages
PYTHONPATH=/remote/projects1/intscs/delivery/python2.6/lib/python2.6/site-packages:/projects/seidelde/ConfigTools::/opt/devsup/platinum/:/opt/devsup/mercurial/mercurial-1.6/lib/python
PLATINUM_CLIENT_HOME=/opt/devsup/platinum
POLONIUM_HOME=/opt/devsup/polonium
LD_RUN_PATH=/opt/gcc/lib::/nastools/fuse/lib:/nastools/sles10/valgrind/lib
KDEDIR=/nastools/sles10/kcachegrind
CSX_HOSTTYPE=Linux
CSX_HOSTREL=2.6.16.60-0.76.8-smp
TRACECONFIGPATH=.
CVS_RSH=remsh
CVS_SERVER=/usr/local/bin/cvs
CVSROOT=:pserver:ncedom+lbelluccini@ncecvsgco:/cvsgco/csxdev
stable=/remote/projects1/cplint/stable
staging=/remote/projects1/cplint/work
reference=/remote/projects1/cplint/reference
MERCURIAL_WORKING_DIR=/remote/users3/lbellucc/cpl
CONFMAKER_VERSION=latest
DISABLE_HUGETLBFS=1
TNS_ADMIN=/nastools/oracle/etc
TWO_TASK=DB10C11ls
CCACHE_DIR=/mwrep/ccache
CCACHE_NOLINK=1
CCACHE_UMASK=000
CCACHE_UNIFY=1
CSX_BMS=1
BMS_TARGET=sCxx64MtDbg
CSX_OTF=1
CSP_OTF=1
CPC_OTF=1
GREP_OPTIONS=—color=auto
CSX_USE_CH=1
OTF_VERSION=2-6-0-19
MW_PACK_VERSION=1-7a-1-23
CSX_USE_MWREPLICATION=1
NLS_LANG=AMERICAN_AMERICA.UTF8
WORKSPACE=cpl
SCS_PACKAGE_VERSION=1.28
OTF_PORT_RANGE=200
_=/usr/bin/env
Hey, judging from your setup I have one more assumption (and slowly but surely being more sure this is a administration setup preventing elasticsearch from starting).
Has your system administrator have any additional security tools like SELinux or AppArmor running?
Judging from your settings, is it possible that your home directory is a network share? Any additional possibilities, that this share is not allowed to execute or open certain files (again by security policy maybe?) or that executing programs may not open files on that share?
Wild guesses from the distance. maybe having one of sysadmins jump in may help to clear things up a bit with this setup.
Hello. I am quite sure LinuxSe is active.
And yes, I am on a network mounted home.
I’ll try later from the machine drive.
Outside from the NAS works correctly.
[2013-05-14 09:11:15,600][INFO ][node ] [Aged Genghis] [30251]: initializing .[2013-05-14 09:11:15,605][INFO ][plugins ] [Aged Genghis] loaded [], sites []
[2013-05-14 09:11:17,314][INFO ][node ] [Aged Genghis] [30251]: initialized
[2013-05-14 09:11:17,314][INFO ][node ] [Aged Genghis] [30251]: starting .
[2013-05-14 09:11:17,449][INFO ][transport ] [Aged Genghis] bound_address
[2013-05-14 09:11:22,086][INFO ][node ] [Aged Genghis] [30251]: stopping .
[2013-05-14 09:11:22,100][INFO ][node ] [Aged Genghis] [30251]: stopped
[2013-05-14 09:11:22,100][INFO ][node ] [Aged Genghis] [30251]: closing .
[2013-05-14 09:11:22,108][INFO ][node ] [Aged Genghis] [30251]: closed
Closing this issue then. Not an elasticsearch issue.
Still important to keep in mind, that running security hardening tools might be an issue in order to get elasticsearch up and running.
Thanks a lot for your patience and ongoing information delivery!
Oracle 12c Installation Error: «Exception . Could not initialize class sun.awt.X11.XToolkit»
I have been trying to install oracle 12 c on Ubuntu 14.10 but facing the below mentioned error.Could some one please check this and advise me how to fix this error?
Checking Temp space: must be greater than 500 MB. Actual 429214 MB Passed Checking swap space: must be greater than 150 MB. Actual 4041 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed >> Ignoring required pre-requisite failures. Continuing. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-27_11-15-08PM. Please wait . oracle@v3nky-HP-Pavilion-dv6-Notebook-PC:~$ No protocol specified Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:171) at java.awt.Toolkit$2.run(Toolkit.java:834) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826) at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484) at com.jgoodies.looks.LookUtils.(LookUtils.java:249) at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:135) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1852) at javax.swing.UIManager.setLookAndFeel(UIManager.java:557) at oracle.install.commons.util.Application.startup(Application.java:792) at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181) at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198) at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:355) at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:130) at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:161)