Getting error after deploying application in glassFIsh

Basit picture Basit · Apr 24, 2012 · Viewed 9.2k times · Source

i just deployed an application to glass fish. What i did, i made a directory structure. HelloWorld->index.jsp, WEB-INF->sun-web.xml, web.xml. MY index.jsp is just a page that prints HelloWorld

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
    <head>
        <title>Hello World! Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

Then i went to HelloWorld directory and issue the following command

jar cvf helloworld.war .

The war file was created. Then i deployed the application to GlassFish using admin console. In the context i wrote /HelloWorld. But then i tried to open the application using http://localhost:8080/HelloWorld/

Then i got the error that

type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception

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

My path environment is set to

;C:\Program Files\Java\jdk1.6.0_06\bin;C:\Program Files\glassfish-3.0.1\bin;

I have java on my classpath, why i am getting this error? I am using windows 7.

Thanks

Answer

Jim picture Jim · Apr 24, 2012

Somehow glassfish is picking up on another JRE install on your machine. Try setting the AS_JAVA environment variable: http://www.java.net/node/702274