Novice Installation Instruction on GF + WS on Windows XP

classic Classic list List threaded Threaded
1 message Options
Adam Tang Adam Tang
Reply | Threaded
Open this post in threaded view

Novice Installation Instruction on GF + WS on Windows XP

Get sges_ee-2_1-windows-ml.exe some where from Sun website. It is mostly titled as Sun GlassFish Enterprise Server with HADB.

Install the GF and please do not start the admin server or node agent for now.

Create a file called Password.conf with content below


Put Password.conf in the GF\config folder

Edit GF\domains\domain1\config\server.policy and add lines below

grant codeBase "file:${com.sun.aas.instanceRoot}/lib/-" {

grant codeBase "file:${com.sun.aas.instanceRoot}/applications/j2ee-modules/webspace/-" {

grant codeBase "file:${com.sun.aas.instanceRoot}/applications/j2ee-modules/saw-web/-" {

// Basic set of required permissions granted to all remaining code
grant {
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

Go to Start Menu and change

Start Admin Server target to GF\lib\asadmin-pause.bat start-domain --user admin --passwordfile GF\config\Password.conf domain1


Start Node Agent target to GF\lib\asadmin-pause.bat start-node-agent --user admin --passwordfile GF\config\Password.conf adamtang

note : adamtang is my pc or localhost name, yours will mostly different then mine.

Do not start your GF yet.

Go to Control Panel/System/Advanced and click on Environment Variables

Under System Variables

Add or Edit JAVA_HOME to your JDK folder
Add or Edit ANT_HOME to your ANT folder

important <<< you must do this below

Edit Path add below 2 entries before anything else


Get somewhere from Sun website and unzip it in a folder which is nearby to GF folder

note : do not put WS folder in GF folder

my favorite folder structure is

C:\Server\Sun\AppServer <<< GF
C:\Server\webspace-for-gfv2 <<< WS

note : do not delete WS folder unless you know what you are doing.

Edit WS\webspace\application\distribution\deploy\webspace\WEB-INF\classes\ and add lines below (if necessary)

note : line 1 is a must if you are following everything I have mentioned.
the rest is up to you for your database choices.

Now we are done.

1. Start Admin Server
2. Start Node Agent
3. type in localhost:4848 in a browser and try to login by using admin and your password
4. Check whether Node Agent is running or not by clicking left panel "node agent"
5. close the browser
6. go to command prompt
7. cd to WS\webspace\application and type ant -f install.xml
8. if everything is fine you will see message "... domain1 stopped ..."
9. stop node agent
10. restart your windows
11. Make sure your database server is on
12. start admin server
13. start node agent
14. browse to GF\domains\domain1\applications\j2ee-modules

and if you see all 6 folders listed below


then you are done.

if you are like me having normal pc for above installation, you might need to constantly (interval at 5 minutes) browse to localhost:4848 to see the login page appear or not. If it shows http page not found, stop node agent, start admin server then start node agent until you see 6 folders above.

The whole period for me to see those 6 folders are 20 minutes with 3 or 4 times stop start routine (if login page is not served).

note : for my postgresql, total tables at final is 181 and total sequence final is 1

If you make it, kindly login and click on web application and launch webspace and wait for another 5 or 10 minutes before the first page show.

Enjoy :)