An internal error occurred during: "Starting GlassFish 5 [domain1]". Can't find bundle for base name sun.util.logging.resources.logging, locale en_DE - eclipse

I am using eclipse IDE, and Glassfish5. OS is MAC. Java version is 13.0.1.
I have just started with an EJB tutorial, and found that I need Glassfish. I downloaded and added to my server. Now when I am starting it, following error occurs-
An internal error occurred during: "Starting GlassFish 5 (2) [domain1]".
Can't find bundle for base name sun.util.logging.resources.logging, locale en_DE
I got following on console-
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
-Djava.endorsed.dirs=/Users/kum/Downloads/glassfish5 2/glassfish/modules/endorsed:/Users/kum/Downloads/glassfish5 2/glassfish/lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Attaching my screenshot of the error-
I have tried removing and downloading full version of glassfish. But keeps on getting same error.
Somebody help please.

As suggested above, I changed the java version from 13 to 8. The server has started successfully.
I did the following steps-
On terminal brew tap adoptopenjdk/openjdk
Once above step is completed I typed brew cask install adoptopenjdk8
Once adoptopenjdk8 is installed, I checked if it is correctly installed. So I did this- ls -la /Library/Java/JavaVirtualMachines
It gave me following lines-
drwxr-xr-x 4 root wheel 128 Nov 27 11:20 .
drwxr-xr-x 4 root wheel 128 Oct 24 14:09 ..
drwxr-xr-x 3 root wheel 96 Nov 27 11:20 adoptopenjdk-8.jdk
drwxr-xr-x 3 root wheel 96 Oct 24 14:09 jdk-13.0.1.jdk
Then I checked my JAVA_HOME by doing this- echo $JAVA_HOME This gave me following
/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home
Here, it can be seen that I have jdk-13, which I need to change to jdk 1.8. That is, I have to change my JAVA_HOME.
Change JAVA_HOME by export JAVA_HOME=`/usr/libexec/java_home -v 1.8
After this, just check the java version by java -version I got the following-
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
Thats it.
Dont forget to change the runtime environment in the glassfish server on eclipse.
Do it by-Eclipse-preferences-server-Runtime Environments-Select Glassfish-Edit-Change Java Location to your recent /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

Related

SonerQube doesnt start

Sonarqube Startup script does not start ob ubuntu 16.04
Error log shows:
Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run
java.lang.IllegalStateException: SonarQube requires Java 11+ to run
at org.sonar.application.App.checkJavaVersion(App.java:93)
at org.sonar.application.App.start(App.java:56)
at org.sonar.application.App.main(App.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Thread.java:748)
<-- Wrapper Stopped
--> Wrapper Started as Console
Launching a JVM...
Startup failed: Timed out waiting for a signal from the JVM.
JVM did not exit on request, terminated
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
If i run java -version:
java version "11.0.3" 2019-04-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
Open conf/wrapper.conf file
Change wrapper.java.command=java to path where your JavaDK is installed eg. wrapper.java.command=C:\Program Files\Java\jdk-11.0.4\bin\java
I had the same problem a few moments ago, my JAVA_HOME variable pointed to the correct version of my profile, but when I run java -version, it printed 1.8, so I run this command:
update-java-alternatives -l
This showed me all Java versions that were installed on my machine.
After that, I run this another command:
sudo update-java-alternatives -s java-11-oracle
This changed the Java version on my machine and it works just fine.
"Warning Support for Java 8 has been deprecated in SonarQube v7.8 and will be removed in SonarQube v7.9 LTS."
checkout you java -version, and the Supported Platforms requirements: https://docs.sonarqube.org/7.7/requirements/requirements/
Then go to the downloads and choose what is the best for you:
https://www.sonarqube.org/downloads/ (Show all versions)
Check for the JRE version, I have come across the issue where the Java SDK version and JRE -version was different. That may be the issue.
Most user would like to download JDK 11 here as mentioned in recent comments. That should works.
However, I would recommend to install latest version from following link (because you have just downloaded latest sonarqube) for better compatibility.
SDK download link: https://www.oracle.com/java/technologies/javase-downloads.html
FYI,
For mac user,
Install JVM on your machine (I installed it by Homebrew).
brew cask install java
and restarted the sonar by
./sonar.sh restart
it worked for me

How to build Mongodb 3.4 (mongod) for Debian 8 Jessie (stable)?

I have forked and modified a minor thing from the official mongodb repository on stable branch 3.4.
I am building in a fresh VM installed from scratch with required packages to build the source.
Build instructions impose GCC 5.3 which is not available in the stable distribution of debian 8. If I switch to unstable and compile, (it works yay but) the output executable is >600MB and does not run on a stable debian that has GCC 4.9.
Question 1: how is it possible that my build is 10 times bigger in size than the version proposed in the mongodb debian 8 repository ?
-rwxr-xr-x 1 root root 52M Sep 11 17:50 /usr/bin/mongod
-rwxr-xr-x 1 root root 664M Oct 28 11:50 /build/mongod
Question 2: moreover, my built version cannot run on debian 8 stable becauses it uses GCC 5.3 which is not available in stable. So how can I build it such that it runs on the stable debian 8 just like the package repository that mongodb provides ?
If I try to build using GCC 4.9.2, despite some errors that I can eventually fix, it still is a hell to compile. Does that mean they have some magic tricks ?
# scons core -j 3 --ssl --link-model=object --opt=on --dbg=off --disable-minimum-compiler-version-enforcement --disable-warnings-as-errors
[...]
src/mongo/db/repl/storage_interface_mock.h:50: error: undefined reference to 'vtable for mongo::repl::CollectionBulkLoaderMock'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
I can see that there is a special directory debian in the source repository, could that maybe somehow could be used to build the debian package. How should I use it ? Would that make it run on debian 8 stable ?
Answer to Question 1: The executable output contains debug symbols that can be removed from the binary using the strip linux command. This reduces the file size back to ~50MB
Answer to Question 2: In order to build for Debian 8 stable, one should not use the GCC compiler but rather use CLANG. The documented minimum verson is 3.4 and version 3.5 is in the stable debian 8 packages.
There are some minor compilation issues though and issues in the Scons compile scripts (python). But after fixing those, it produces an executable able to run on debian 8 stable.
scons core -j 3 --ssl --link-model=object --opt=on --dbg=off --disable-minimum-compiler-version-enforcement --disable-warnings-as-errors CC=/usr/bin/clang CXX=/usr/bin/clang++

Yum error on Centos 6.4

Yum suddenly start to give the error pasted bellow
I tried to rebuild yum, but the error remains. I re-installed krb5-libs, but the error remains
How can I repair yum without reinstating Centos?
Error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libkrb5.so.3: symbol krb5int_push_fscreatecon_for, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
At my machine the issue was caused by a second libkrb5support.so distributed with PostgreSQL 5.2 / PSqlODBC. After commenting the library path in /etc/ld.so.conf.d/psqlODBC.conf and runing ldconfig -v, I can run yum again without any issue.
In my case, the path to the "wrong" library is /opt/PostgreSQL/9.2/lib/libkrb5support.so.0
Edgar.
I encountered this error after defining LD_LIBRARY_PATH environment variable. It was fixed by adding /lib and /lib64 to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/lib:/lib64:....
Run the below command to test what all the libraries you have:
# ldd /lib64/libkrb5.so.3
And make sure that the module 'libkrb5support.so.0' is available under '/lib64' directory or having the soft ink to the files that is inside /lib64 directory. If its not there then this error is expected. So manually you have to link it again.
From my test system:
# locate libkrb5support.so.0
/lib64/libkrb5support.so.0
# ls -l /lib64/libkrb5support.so.0
lrwxrwxrwx. 1 root root 21 Aug 19 15:52 /lib64/libkrb5support.so.0 -> libkrb5support.so.0.1
# ls -l /lib64/libkrb5support.so.0.1
-rwxr-xr-x. 1 root root 46336 May 1 2012 /lib64/libkrb5support.so.0.1

An error occurred uploading to the iTunes store

Using Xcode 4.3.2.
Since yesterday, I can't upload to ITunes Store. I can't find any reasons.
Archive -> Validate... no problem.
But, it is occurred error in distribute.
My app is using Push.
My Xcode version is 4.3.2.
What do I do to escape this state?
Please help me... and thank you.
I had the similar issue..which i was able to fix using the solution mentioned here - An error occurred uploading to the iTunes Store - Please upgrade Java
for quick reference I am adding the solution here also
open terminal window and execute below lines of code
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
I upgraded to java 1.7 (October 2012) and applied the latest Apple patch 2012-006 (if I'm not wrong)
Well, it disabled the java preferences (the Oracle Java pref is used inside the System Pref) and the Java Preferences in the Utilities folder was removed (by the latest Apple patch), because it seems they want yo force you to use the latest Java release (I can understand it, considering the security problems).
Result: I'm not able to submit to the app store and there is no way to re-enable it
XCode use Java at it's core function and a problem in Java makes Apple XCode unusable to submit to the App Store ... I didn't suspect that.
Well I managed to workaround the issue by updating my symlinks. Here's what I did:
cd /System/Library/Frameworks/JavaVM.framework/Versions
ls -l
total 72
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Oct 18 16:41 1.6.0 -> CurrentJDK
drwxr-xr-x 8 root wheel 272 Oct 18 16:42 A
lrwxr-xr-x 1 root wheel 10 Oct 18 17:18 Current -> A
lrwxr-xr-x 1 root wheel 59 Oct 18 16:41 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
sudo mv Current Current.bak
sudo ln -s CurrentJDK Current
java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
This changes the 'Current' symlink to point to the same version that 'CurrentJDK' is pointing to. This may or may not be the same on your system, so double check. This may or may not cause other problems, but so far I haven't seen any.
To undo the changes, just go back to the same directory and:
sudo rm Current
sudo mv Current.bak Current
Hope this helps!
Try to use "Software Update..." from "Apple symbol" also works
If Xcode gives you the following error in Console
Error: Java 1.5, 1.6, or 1.7 is required. Currently, java is the
default java version. Please upgrade.
Check whether there is a Software Update.
In my case there was one: Java for OSX 2012-002
Java for OS X 2012-002 delivers improved compatibility, security, and
reliability by updating Java SE 6 to 1.6.0_31.
Please quit any web browsers and Java applications before installing
this update.
See http://support.apple.com/kb/HT5055 for more details about this
update.
See http://support.apple.com/kb/HT1222 for information about the
security content of this update.
After the update I could submitted my app with no error.
It's an issue with the last java version, a workaround in terminal write:
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
Then you can upload normally.
This did not solve my problem. I was having this problema because I installed and set as default the Oracle Java 1.7. Disabling it and using Apple Java, this problem went away.
Oracle Java 1.7 Broke the Xcode Application uploader again!! I filed this as a Bug on ADC and it was acknowledged as such.
I was able to fix two ways:
Unistall Java 1.7 and fallback to Apple Java 1.6.34 or 35 work.
Temporarily turn off Java 1.7. Goto: Applications > Utilities > Java Preferences and un-check java 1.7. After that the uploader worked. If you need 1.7 you can turn it back on after you upload.

Install New Software on Eclipse not working on Mac

I have downloaded eclipse classic x86_64 3.7 cocoa on my Mac Intel Core 2 Duo with snow leopard 10.6.8
I have extracted and copied the eclipse directory to Applications folder. When run,
I get following errors
System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
Unexpected error loading extension: org.eclipse.equinox.p2.metadata.repository.simpleRepository
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpClient at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientBrowseFileTransferFactory$1.sendBrowseRequest(HttpClientBrowseFileTransferFactory.java:53)
Error while reading from repository: http://download.eclipse.org/releases/indigo/site.xml.
I have following java version
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
I have tried with eclipse classic 32 and 64 bit versions, with both i have the same problem .
I have also tried tweaking around priority of java version (32 or 64) under Java preferences.
Deleting /Library/Java/Extensions/log4j-1.2.15.jar resolved the issue.
Incase you are using ubuntu instead and had this problem, just go
cd /usr/java/packages/lib/ext/
sudo rm log4j-1.2.15.jar
sudo rm slf4j-*
I also had this problem and had nothing under /Library/Java/Extensions
You can notice that Eclipse reports: "The value will be overwritten using values from the preferences". So what you can do - visit Preferences > Network Connections and under 'Proxy Bypass' add Host: *
This has resolved the issue for me.
I set this to solve the problem:
http.sslVerify false in the egit config file.