Common problems with GlassFish
From Oxxus Wiki
This section looks at the common problems with GlassFish and how to resolve them.
Should you experience any other issues with Tomcat, submit a ticket to our support team, to help you resolve it.
exec: java: not found
If you get an error when starting Glassfish similar to this:
[root@test]# service glassfish3 start Starting Glassfish Service java /var/glassfish3/bin/asadmin: line 54: exec: java: not found
Type the following:
which java
Take note of the path, and copy everything omitting "/bin/java" part.
Open /var/glassfish3/config/asenv.conf in your editor of choice and add the following line:
AS_JAVA="/usr/java/jdk1.6.0"
Save the file and Glassfish service should start without problems.