./asadmin start-domain command
./asadmin: 19: /usr/lib/jvm/java-6-sun-1.6.0.20/jre/../bin/java: not found
To resolve this problem you can follow this workaround:
First I find that after update, my official SUN JDK was replaced with OpenJDK that doesn't work quite well with glassfish. So the first step is completly uninstall the OpenJDK or at least change the current path to /usr/bin/java.
To set the Java PATH to the official JDK execute this command and select SUN Java implementation:
sudo update-alternatives --config java
Hay 2 opciones para la alternativa java (proporcionando /usr/bin/java)
Selección Ruta Prioridad Estado
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 modo automático
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 modo manual
* 2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 modo manual
Next I set the JAVA_HOME adding this lines to the end of /etc/bash.bashrc:
JAVA_HOME="/usr/lib/jvm/java-6-sun"
export JAVA_HOME
Finally, fix the AS_JAVA property in ../glassfish/config/asenv.conf to the correct path:
AS_JAVA="/usr/lib/jvm/java-6-sun"
Done, now glassfish should start and work flawlessly.
Thank you bro, you saved my life!!! :-)
ResponderEliminarHappy to help. You are the first to comment in our blog! :)
ResponderEliminarEste comentario ha sido eliminado por el autor.
ResponderEliminar