users@glassfish.java.net

Re: Glassfish Start-up Error

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Dec 2007 10:39:22 PST

Chris,

I have a guess (of course educated ;) ) about your situation.

Since you /installed/ the server as root, you must have done the following:
1- Possibly as /root/, you downloaded the glassfish.jar and executed java -Xmx256m -jar glassfish.jar per instructions.

2- Definitely as /root/, you executed [b] ant -f setup.xml/setup-cluster.xml[/b].

If the above is true, what I think is happening is:
- I call ant -f setup.xml a "combined" operation. It does a bunch of things. First off, it gets you the
  GlassFish "bits" which are mostly the "static" library jars.
- It gives you token replaced executable scripts and config files, e.g. bin/asadmin,
  config/asenv.conf[bat].
- It gives you what is called a "default" runtime, also known as a domain. This is created in
  domains/domain1.

All of the above is done using setup.xml. See the following:
[code]
kedar-mhaswades-computer:~/Software/gfml/glassfish kedar$ ant -projecthelp -f setup.xml
Buildfile: setup.xml

Main targets:

 all Installer the server
 jar-pack Applying the pack utility on jars
 setup.init Set up the OS version
Default target: all
[/code]

AND
[code]
kedar-mhaswades-computer:~/Software/gfml/glassfish kedar$ ant -projecthelp -f setup-cluster.xml
Buildfile: setup-cluster.xml

Main targets:

 all Installs the server
 create-node-agent Creates, configures NA post bootstrap activities
 install-domain Create domain post bootstrapping activities
 jar-pack Applying the pack utility on jars
 preinstall-bootstrap Bootstrap activities before installing server
 setup.init Set up the OS version
Default target: all
[/code]


The problem is that setup xml's are not granular enough. Please file an RFE in this regard.

So, now, since the domain is created as root, the user "chris" can't write to it. The best way
to deal with this is:

- logon to the system as "chris".
- cd glassfish-install/bin
- ./asadmin create-domain --portbase 5000 chrisdomain
--> provide information on the prompt
- ./asadmin start-domain chrisdomain

You'll have your domain created and started at: domains/chrisdomain. The co-ordinates of
that domain are available as displayed by console output of start-domain command.

Hope this helps.

Regards,
Kedar
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=249386