users@glassfish.java.net

Re: Problems installing Glassfish on Ubuntu

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Dec 2007 22:47:33 PST

Hi,

I did a "sudo apt-get install glassfish" on my Ubuntu 7.04 Feisty Fawn.
After which, when i do a "which asadmin" i get "/usr/bin/asadmin". Also, during installation i observed that the binaries are installed in "/usr/share/sunappserver" and a domain is created in "/var/lib/sunappserver/domains" directories. I check my asenv.conf file under "/usr/share/sunappserver/config" directory and see that the AS_DEF_DOMAINS_PATH=/var/lib/sunappserver/domains. One more thing is the domain1 under "/var/lib/sunappserver/domains" directory is started at the end of installation.

I try to stop this domain by issuing "asadmin stop-domain --domaindir /var/lib/sunappserver/domains domain1". But the results are weird. This is what i get :

[i]GlassFish Default Domain Not Present. Creating one in /home/shalini/glassfish/domain1
If you want to use other domains under /usr/share/sunappserver/domains use /usr/share/sunappserver/bin/asadmin command.
Creating domain domain1 @ admin port 4848
Port 4848 is in use.
CLI130 Could not create domain, domain1
Starting GlassFish domain1
Starting Domain domain1, please wait.
Log redirected to /home/shalini/glassfish/domain1/logs/server.log.
Domain domain1 does not exist in /home/shalini/glassfish. Use a different domain name or the --domaindir option.
CLI156 Could not start the domain domain1.
[/i]

Hence i do "sudo /usr/share/sunappserver/bin/asadmin stop-domain domain1". This stops the domain that was started in the process of installation. Now i issue "asadmin start-domain domain1". Now what happens is

[i]GlassFish Default Domain Not Present. Creating one in /home/shalini/glassfish/domain1
If you want to use other domains under /usr/share/sunappserver/domains use /usr/share/sunappserver/bin/asadmin command.
Creating domain domain1 @ admin port 4848
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
2007-12-19 06:17:52.823 GMT Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
----------------------------------------------------------------
2007-12-19 06:17:53.013 GMT:
 Booting Derby version The Apache Software Foundation - Apache Derby - 10.1.3.1 - (417277): instance c013800d-0116-f10d-0db9-0000000879f8
on database directory /home/shalini/glassfish/domain1/lib/databases/ejbtimer

Database Class Loader started - derby.database.classpath=''
Domain domain1 created.
Starting GlassFish domain1
Starting Domain domain1, please wait.
Log redirected to /home/shalini/glassfish/domain1/logs/server.log.
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server Platform Edition 9.0_01 (build b21)] with its configuration and logs at: [/home/shalini/glassfish].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /asadmin ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://shalini:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
[/i]

I see that the domain1 is created again in my home directory and is started. When i do "asadmin version" i get

[i]Version = Sun Java System Application Server Platform Edition 9.0_01
Command version executed successfully.
[/i]

Now i deploy the hello.war quickstart sample from the admin console. When i launch, i get the exception javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException.

So i do a "sudo apt-get install ant". When i do a "which ant" i get "/usr/bin/ant". I restart the domain "asadmin stop-domain && asadmin start-domain" and when i launch the application, there is no exception.
[Message sent by forum member 'sm157516' (sm157516)]

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