users@glassfish.java.net

Problems with Installing Glassfish on Ubuntu

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Oct 2007 10:14:01 PDT

I'm new to this group and this is my first posting. I moved to France
just over a week ago where I will be working for the next six months.
One of my main tasks is to set up an interactive website for a
university in Lyon. I brought with me from the USA a new dual boot
laptop computer with Windows Vista / Ubuntu Linux. The latter was
installed at the University of Arizona in early September and works
OK.

Last week I downloaded Glassfish, but I'm having lots of problems and
would appreciate some kind help. Glassfish installs OK
into /usr/share/sunappserver and /var/lib/sunappserver/ , and when I
type /usr/share/sunappserver/asadmin start-domain the server
starts and I get the test page at http://localhost:8080 , which is all
well and good. The path of the corresponding HTML file is at
/var/lib/sunappserver/domains/domain1/docroot/index.html .

However, on downloading a the test file hello.war from the link at
https://glassfish.dev.java.net/downloads/quickstart/index.html I have
problems. When I copy the file to the folder
/var/lib/sunappserver/domains/domain1/autodeploy , the file
hello.war_deployed is automatically created, as the website says,
but it is empty, and I don't know if that should be the case or not.
In any case, on pointing my browser to http://localhost:8080/hello/
I get the 500 error message followed by the messages:

javax.servlet.ServletException
java.lang.NoClassDefFoundError
org/apache/tools/ant/BuildException

followed by the root cause errors:

java.lang.NoClassDefFoundError
org/apache/tools/ant/BuildException

which are also in the server's log.

According to the page at
http://blogs.sun.com/harpreet/entry/glassfish_on_ubuntu_with_jdk
there is an inconsistency between versions 5 and 6 installed with
Glassfish. I followed the instructions and changed AS_JAVA in
/usr/share/sun/sunappserver/config/asenv.config from
/usr/share/lib/jvm/java-1.5.0-sun to /usr/share/lib/jvm/java-6-sun .
There is also a reference to java-1.5.0-sun a few lines down, which
I also changed. On rebooting the computer I get the above error
messages after making these changes. Previously I got additional
errors in the log when the server started up, presumably due to the
clash between the two versions of Java, but http://localhost:8080
in fact worked.

So in spite of making the changes suggested in the blog, I'm
still unable to get the server to work properly. As I have already
spent quite a lot of time on this, I would most appreciate some
advice. I don't know if there is anybody in Lyon who can help
me locally.

Regards,

Christopher Sharp
[Message sent by forum member 'csharpdotcom' (csharpdotcom)]

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