Basit
Basit

Reputation: 8626

Getting error after deploying application in glassFIsh

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

Upvotes: 6

Views: 9273

Answers (3)

alex
alex

Reputation: 1

go to GFdirectory/bin/asadmin.bat file, and manually replace ALL the occurences of

set JAVA=<...>

with

set JAVA="<absolute_java_path>\bin\java"

hardcoding always works 100% =)

Upvotes: 0

ram
ram

Reputation: 21

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

Upvotes: 2

Jim
Jim

Reputation: 3694

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

Upvotes: 3

Related Questions