Skip to main content

GlassFish Server Open Source Edition 3.1.2.2 (build 5) not able to find JDK

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
pradeepsimhanp
Offline
Joined: 2013-08-22

Hi, I am using GlassFish Server Open Source Edition 3.1.2.2 (build 5), and I am trying to deploy AffableBean from Oracle samples it deploys fine, but when I try to run I get below error:

org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required

As per research, I have addedd AS_JAVA variable in:

glassfish3/glassfish/config/asenv.conf

as shown below:

AS_IMQ_LIB="../../mq/lib"
AS_IMQ_BIN="../../mq/bin"
AS_CONFIG="../config"
AS_INSTALL=".."
AS_DEF_DOMAINS_PATH="../domains"
AS_DEF_NODES_PATH="../nodes"
AS_DERBY_INSTALL="../../javadb"
AS_JAVA="/usr/local/java/jdk*"

And I restarted server, still I am getting same error. When I try to run javac or java from shell it works fine since I have JAVA_HOME is set, but I don't know why Glassfish is not able to find JDK. BTW I am using Ubuntu 12.0.4 as a Server.

Is there any other configurations should i make to glassfish recognize JDK?