On the Ubuntu Linux operating system, installing GlassFish v2 does not override an existing installation of GlassFish v1. The asadmin script in /usr/bin administers GlassFish v2. To administer GlassFish v1, use its local asadmin utility in /usr/share/sunappserver/bin. To upgrade the v1 domain to v2, use the asupgrade tool located in /usr/share/glassfishv2/bin.
Using the global asadmin script to start a v1 domain results in the upgrade tool being invoked automatically. However, this causes an error due to a bug that uses the default domain location of the server for other (non-Ubuntu) platforms. To avoid this error, use the asupgrade tool instead.