Glassfish error starting domain. endorsed directories not supported - glassfish

I have a problem starting glassfish on Mac Os X 10.14.6.
I installed it with
brew install glassfish
then I added
AS_JAVA="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
in asenv.conf in order to solve a java null pointer exception.
and now I receive the following error:
$ ./asadmin start-domain domain1
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
-Djava.endorsed.dirs=/usr/local/Cellar/glassfish/5.1.0/libexec/glassfish/modules/endorsed:/usr/local/Cellar/glassfish/5.1.0/libexec/glassfish/lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Command start-domain failed.
Does anyone know how to solve this issue?

The endorsed directories have been removed since Java 9. So the error message suggests that you are running with at least Java 9.
You need to use Java 8 for this to work. If I remember correctly then Glassfish does not support Java 9 and higher.

Related

Fatal Error DISPLAY variable set incorrectly: :0

I want to install oracle weblogic server. I already downloaded it and it's fmw_12.1.3.0.0_wls.jar. In order to install it I'm instructed to run java -jar fmw_12.1.3.0.0_wls.jar. But when I run it I get
(...)X-Server access is denied on host
[Fatal Error] DISPLAY variable set incorrectly: :0
[Resolution] Verify that your DISPLAY environment variable is set correctly,
and that there is an X11 server on the system. If you are
running the Oracle Installer as a different user or on a different host,
you may need to use the xhost command to ensure that host/user
has permission to write to your display.
Logs are located here: /tmp/OraInstall2019-03-16_10-36-23PM.
My system is: CentOS Linux release 7.6.1810 (Core) My java is: Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
I'm trying to perform this installation locally. I'm confused because every solution I came across assumed that I was logging via ssh or vnc server while I'm definitely not. What I tried:
set $JAVA_HOME to point to my jdk directory.
unset $ORACLE_HOME that was created for the database I have installed.
trying to set DISPLAY values to some other number than 0 (I know
its stupid but whatever).
reinstall java
I'm thinking if it might be the problem related with graphic drivers. Might it be that the defaults that were installed with X11 are somehow wrong? Or maybe centOS is not compatibile with this software? Should I maybe try oracle linux?
Add -Djava.awt.headless=true to your command line, e.g.
java -Djava.awt.headless=true -jar fmw_12.1.3.0.0_wls.jar
I solved my problem by using jdk 1.8 x64. This issue seemed to be caused by jdk 1.8 x86.
And yes, the problem was similar to yours. Give it a shot.

XAMPP tomcat service is not starting with error as "Tomcat Started/Stopped with errors, return code: 1"

I have installed XAMPP 7.2.10 on my Win 10 and other services like Apache and MySQL are working fine.
But the Tomcat service is not starting and is throwing an error as:
"Tomcat Started/Stopped with errors, return code: 1,
Make sure you have Java JDK or JRE installed and the required ports are free,
Check the "/xampp/tomcat/logs" folder for more information"
XAMPP Tomcat error image
I have installed Java JDK in "C:\Program Files\Java" and have set the environment variables path.
I have set the "JAVA_HOME" variable path as "C:\Program Files\Java\jdk-10.0.2"
Also, no other program is using the required ports.
When I run the "catalina_start.bat", I get error as:
"ERROR: The system was unable to find the specified registry key or value.
. [XAMPP]: Cannot find current JDK installation!
. [XAMPP]: Cannot set JAVA_HOME. Aborting ..."
What mistakes have I made here?
I had the same problem (XAMPP 7.3.0 / Windows Server 2016 / Java 11). I first checked the environment variables, the java installation - all seemed to be fine.
Sadly the XAMPP error message is not very meaningful, so i looked inside of tomcat installation. To my surprise XAMPP 7.3.0 uses a very old version of Apache Tomcat (7.0.56 from 2014!), that don’t work well with Java 9+. The reason is Tomcat 7.0.56 uses the "-Djava.endorsed.dirs" option, that is no longer supported in Java 9+. Up-to-date Tomcat versions have no problem with java 9+. To solve this you can just stay with Java 8 (if possible for you) or try to fix this on your own by modify Tomcat start-up: Go to your \xampp\tomcat\ folder and see this fix in Tomcat 7.0.73 doesn't work with java 9.
But i would recommend you to install a up-to-date version of tomcat and don’t use the XAMPP one (what i finally did) - at least until XAMPP updates there tomcat version .

IBM Mobilefirst CLI - Server start issue

I recently installed IBM MobileFirst CLI on my Mac, but I don't seem to be able to start the Server. See error below. I searched the internet and found that there is a bug in JDK which causes the JavaLaunchHelper error. I downloaded the beta version that supposedly fixes the issue from here - JDK Download Link
. But this doesn't help either. Any other help is appreciated.
Imayas-MBP:EmployeeDirectory imaya$ mfp start Initializing
MobileFirst Console. objc[18564]: Class JavaLaunchHelper is
implemented in both
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java
and
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libinstrument.dylib.
One of the two will be used. Which one is undefined. Starting
server worklight. Server worklight start failed. Check server logs
for details.
/Users/imaya/.ibm/mobilefirst/6.3.0/server/wlp/bin/server: line 744:
18563 Abort trap: 6 "${JAVA_CMD}" "$#" > "${JAVA_CMD_LOG}"
2>&1 Error: The MobileFirst server failed to start. The port may be in
use by another instance of a running server, or the server may not
exist.
The JavaLaunchHelper error is not the problem here; Anyone using Java 7 will experience it, but things will work regardless.
The problem here is the second error:
The MobileFirst server failed to start. The port may be in use by
another instance of a running server, or the server may not exist.
Verify you do not have an already running server, that was started either by the CLI or by MFP Studio in an Eclipse installation.
In the command line, run mfp stop
In Eclipse, well, quit it
Make sure the Java process is not running
Then, start over. Using the CLI, create a new project and application and try to start the server. For example:
cd /Users/idanadar/Desktop
mfp create testProject
cd testProject
mfp add hybrid testApp
mfp start
mfp build
mfp deploy
mfp console
On OSX, you can locate and kill a process holding open a port using the following:
Run (assumes port 10080):
$ lsof -i :10080
Then if a process is shown, run the following using the shown Process ID:
$ kill -9 {PID}

Red5: Error: Could not find or load main class org.red5.server.Bootstrap

I am doing a red5 eclipse integration using the following directions:
https://docs.google.com/document/d/1GncMDOEeUSyWxm6OM1Cedtl6BeJ2ppU-J-TIIKODreo/edit#heading=h.crcr7jpvtmhj
Versions: java8
Red5: 1.0.2-RC4
When I am starting the red5-server as java application debug, it is working fine
But on starting the server in the last step I am getting the following error
Running on Linux
Starting Red5
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseStringCache; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
Listening for transport dt_socket at address: 8787
Error: Could not find or load main class org.red5.server.Bootstrap
Build and / or use the tarball or zip file; extract the jars and you'll have a server jar and another jar containing the bootstrap class. For version 1.0.2 I believe it will be named red5-bootstrap.jar; the sh and bat files will contain the correct jar file paths.

iReport 5.5.0 won't start

I want to use iReport on ubuntu 12.04. When I try to start it, it stands still and just gives me this error:
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/jna4023560596826437553.tmp which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
How can I solve this problem ?
Edit: I tried: execstack -c /tmp/jna4023560596826437553.tmp but that didn't help.
This error seems more related to a JVM problem instead of jasper. Indeed, Java 7 on linux has a feature which blocks code written in C (or other languages like Ruby etc) and linked into Java (the so-called Java Native Interface - JNI) from halting the whole VM if it’s written badly or maliciously.
So, if you're using java version 1.7, getting back to 1.6 should do the trick. But if you want to keep this version, then try a clean uninstall and re-install of java:
Uninstall,
Install
Notice that if you're not running on 1.7 , it could be a compatibility problem. Try to match the right jars required for iReport to get it work on linux.
I'm using ubuntu and I did below,
Opened the ireport.conf
and uncomment jdkhome
and added java 7 paths (since my default is java 8)
jdkhome=/home/bhanuka/Apps/jdk-7u80-linux-x64/jdk1.7.0_80