Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error after deploying application in glassFIsh

Tags:

glassfish-3

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

like image 919
Basit Avatar asked Apr 24 '12 13:04

Basit


2 Answers

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

like image 104
Jim Avatar answered Sep 28 '22 01:09

Jim


Just have to especify the path without spaces.

first create a symbolic link

mklink /D c:\as_java C:\Program Files\Java\jdk1.6.0_06\

and create and set the environment variable AS_JAVA to c:\as_java

like image 38
ram Avatar answered Sep 27 '22 23:09

ram