Glassfish Installation from Hell

December 13th, 2007 by Jevgeni Kabanov

Disclaimer: Since some of you took this personally I want to make a few things clear. This is not an attack on GlassFish or its community. This is just a recap of my personal experience with installing it and the resulting frustration. This could be avoided in the future with a couple of simple fixes.

I just had the weirdest installation experience ever. We are trying to get JavaRebel to work with Glassfish and for that, of course, we need at the very least to install it.

After downloading the JAR I assumed that it will be the usual self-extracting installation package, like the one JDK comes with. When I ran the JAR it displayed a license agreement dialog and vanished with no message of any kind. I assumed that perhaps it’s not a self-installing JAR after all and needs to be unziped manually. Inside the JAR I found a single “glassfish.class” over 50 MB large. After some thought I found out that it unzipped itself in the current directory (which just happened to be my “download” dir with about a hundred other folders). Finally I could start using Glassfish!

Quickly it turned out I was wrong. There was no kind of executables or scripts of any kind that I could start the server with. Of course the first thought was that the extraction process did not finish (remember the lack of message or progress bar). After reiterating through the same process twice I googled for “glassfish quick start” (there was no installation guide with the distribution that I could find). Although it didn’t really talk about installation, it mentioned in passing that I should have ran “ant -f setup.xml” at some point. Turned out this was what extracted all of the scripts and everything else.

So the real question I want to ask is why can’t I just get a ZIP, unzip it and run?

UPDATE: although GlassFish now runs fine when I tried to deploy the Java EE tutorial sample applications it turned out that’s nearly impossible without NetBeans (all build scripts are bound to the .nbproject or somesuch). Is there no end to this torment? I understand that Sun favors NetBeans, but why tie everything to it?

UPDATE 2: Toomas got GlassFish running before me and support is included in the JavaRebel 1.0.1 release. Enjoy!

34 Responses to “Glassfish Installation from Hell”

  1. etf Says:

    Why didn’t you read the installation guide on the GlassFish site? Was it too difficult?

  2. Bill Says:

    It’s called “barrier to entry”. If idiots can’t install your product, you don’t need the bother of supporting idiots.

  3. Jevgeni Kabanov Says:

    etf: I never saw any installation instructions. I downloaded and couldn’t find them. Most products have at least a brief installation manual in the root directory of the distribution and people expect to find it there.

    bill: Plenty of pretty smart people just don’t have time to waste on such things. You can consider me an idiot if you want to, but such attitude is usually destructive to the product and its community.

  4. Jin Chun Says:

    Well, I can tell you that the install, admin, and deploy process is pretty easy, your mileage has varied, but compared to others it hasn’t been a problem. You can deploy without netbeans, in fact you can do it quite easily using the admin scripts.

  5. Jevgeni Kabanov Says:

    Well, I can tell you that the installation project is ridiculous. And all you would have to do to fix it is to have an INSTALL.TXT in the root dir (and give some indication what the self-extracting JAR does).

    Of course you can deploy without NetBeans, just not the tutorial applications, those you can’t even build properly without NetBeans.

  6. KennethMark Says:

    I found Glassfish install is pretty simple. Download site already got all information one needed. Personally I can’t see any simpler instruction to install an application server.

  7. Jevgeni Kabanov Says:

    Fair enough, the installation instructions were on the download page, I just scrolled down to find the binaries.

    But is this really the best place for installation instructions and why can’t they be also inside the distribution?

  8. Stefan Koelle Says:

    Common, I was thinking about using glassfish with JavaRebel. But with this post you damaged my picture of your company.

    The download page of Glassfish (https://glassfish.dev.java.net/downloads/v2-b58g.html) is giving EXACT instruction how to install glassfish.

    (java -Xmx256m -jar filename.jar, cd glassfish, ant -f setup.xml)

    That is REALLY hard to find!

    And starting glassfihs/bin/asadmin start-appserv is very hard, too.

    Beside you don’t need Netbeans, everything works with plain old ant.
    We are using Glassfish with Eclipse WTP (There is lot of space for improvement left in WTP)

    How doss JavaRebel work out with Glassfish?

    Bye
    -stephna

  9. Toomas Römer Says:

    I just find the installation process funny and I have installed a bunch of containers (different versions of Tomcat, Resin, OC4J, Weblogic, JBoss etc.). This is by far the most exotic install I’ve seen.

  10. Jevgeni Kabanov Says:

    Stefan, I already found the installation instructions, but that is not the point. I assume, since I didn’t see the instructions so won’t many other people. It is just very uncommon to have them on the download page and not have them in the distribution.

    And the part about NetBeans is not about GlassFish itself, but about the Java EE tutorial examples, which I needed to get running. Tying them to an IDE is not a good idea in my mind.

  11. Jevgeni Kabanov Says:

    And BTW I have 3 Weblogic versions, 2 Tomcats, JBoss and OC4J installed (not to mention embedded Jetties everywhere) and none were anywhere near as unwelcoming.

  12. Fabian Says:

    I also can’t understand the Glassfish installation and prefer the way how Eclipse and Geronimo do it: just unzip and you’re ready to go…

  13. Robert Says:

    I’ve never had trouble installing glassfish either. However if this is the most exotic install you’ve done (Toomas), then try installing websphere. Oh, and plan on spending many, many hours waiting while it installs. Not mention praying. And I do mean hours.

  14. Jevgeni Kabanov Says:

    Robert: I never said it cannot get any worse. Just it was very weird. As for the worst installation ever I think the Oracle 8 (or 9) on Debian Linux has my vote for that.

  15. Toomas Römer Says:

    Jup, installing Oracle db on debian is quite fun. Maybe today it is already easier.

    But what I found interesting about the evolution of starting j2ee containers was how two vendors took the opposite directions.

    OC9->OC10 meant that “java -jar oc4j.jar” was replaced with “oc4j.sh”

    Resin 3.0 -> 3.1 meant that the perl wrapperl.pl (through httpd.sh) was replaced with “java -jar (through httpd.sh) resin.jar”.

  16. Jason Says:

    Glad to see non-biased feedback of glassfish experience.

    The astroturfing all the Sun employees perform on it, is downright annoying, I suspect individual bonuses are tied to the number of times they blog about it or write the name.

  17. John Clingan Says:

    I’m going to back up what was covered on The Aquarium.
    (http://blogs.sun.com/theaquarium/entry/docs_are_the_difference_between)

    Yes, I think the installation instructions are clear. Yes, I think GlassFish is a breeze to install.
    Yes, I’ve done it hundreds of times, and therein lies the issue. It’s ingrained in my head. My perception of how things should be done are not necessarily how others think it should be done.

    Like Jevgeni, I download software and install it the way I install most software packages – without reading documentation. Of course the documentation is often the fallback. However, we often think that if we have to read installation instructions (for basic installation), then the software is too hard to use.

    I think this is an opportunity for the GlassFish community to improve the installation experience. Jevgeni, thanks for taking the time out to post your experience and to work with GlassFish. Let us know how JavaRebel works with GlassFish and we’ll give you some visibility from our end. Love the screencast.

    John Clingan
    GlassFish / Sun Application Server Product Manager

  18. hendratan Says:

    hi, im junior programmer n heard that glassfish is good so i decide to try it, so when i want to install the glassfish v2, i thought is easy but ends up to be so complicated :( so sad. i wonder whether glassfish can provide some executable file for win (just like other server) thanks :)

  19. Jevgeni Kabanov Says:

    Toomas got GlassFish running before me and support is included in the JavaRebel 1.0.1 release. Enjoy!

  20. JPz'log » Announcing an IzPack-based GlassFish installer Says:

    [...] looks that some people recently complained about the existing GlassFish installer (see this and this). I must admit that the current process can be improved, especially getting rid of the Java VM flag [...]

  21. hateyou Says:

    heh.
    you missed the install instructions for glassfish on the download page ?.

    then you blaim glassfish.

    retards like you should perhaps stay away from stuff you dont grasp ?

  22. Cem Says:

    Hi Jevgeni,

    I think that you are completely right. Nowadays these kind of installations should be replaced with a self extracting installation or something else.

    For example,

    http://jpz-log.info/archives/2007/12/18/announcing-an-izpack-based-glassfish-installer/

    Is it too complicated to prepare something like that for Sun?

  23. admiral Says:

    I tend to agree with Jevgeni. It is not particularly hard to install and instructions are there. But I don’t understand WHY can’t those Einsteins just zip it? I feel the smell of “corporate indifference” vs. open-source inspired inventiveness. Viva Eclipse install!

  24. ZeroTurnaround.com » Blog Archive » ZeroTurnaround team blog at dow.ngra.de Says:

    [...] in the past there were some misunderstandings between what is the official announces of ZeroTurnaround and what is the team personal opinion we [...]

  25. Eric Lois Says:

    Guys, i need help with my glassfish installation. all of my previous installations worked fine. but for some pcs i got this error. im puzzled because i followed the same installation procedure for all installations that i did. i tried many forums but theres no reply.
    below is the error message that was displayed on the screen. you can also reach me through my e-mail etortola@yahoo.com.ph thanks!
    linux-MTGSC:/usr/local/src/glassfish # ./lib/ant/bin/ant -f setup.xml
    Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
    Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    linux-MTGSC:/usr/local/src/glassfish #

  26. Toomas Römer Says:

    Our comment system has not been sending out emails about comments. If the problem still exists let us know via the forum or support at zeroturnaround dot com and we’ll look into it.

  27. cooldude Says:

    the installation instructions are very clear.
    but the process stops at the license agreement dialog box, which only displays the title. the rest is blank.
    i’m using jdk 1.6…
    can someone pls help?

  28. Toomas Römer Says:

    For GlassFish installation specific questions refer to the GlassFish forum, http://forums.java.net/jive/forum.jspa?forumID=56&start=0

    Or try one of their mailinglists https://glassfish.dev.java.net/servlets/ProjectMailingListList

  29. Frank Cahill Says:

    I agree although the install for GlassFish appears to be rather simple, if all does not go well there is not sufficient info anywhere on the web that I could see to give the installer an idea as to how to proceed.

    When I ran the ant -f setup.xml from the glassfish directory I get “Unable to locate tools.jar.” It is looking for this file under jre1.6 but on my machine tools.jar is under the jdk1.6 directory. I have tried to change references to jre1.6 to jdk1.6 to no avail. Of course I have no idea why tools.jar is NOT under the jre1.6 since all of my Java programs, including NetBeans and its tutorials seem to run ok.

    Any help would be appreciated. Thanks Frank

  30. Toomas Römer Says:

    Although this is no support forum for Glassfish, I would advise to change the JAVA_HOME and PATH to point to the JDK version (not the JRE) and everything should be okay. There is no tools.jar in your JRE, only in JDK as far as I know.

  31. flakey foont Says:

    99% of the software out there is installed pretty much the same way. Straying from that path is not a smart idea IMHO. Usability is all about reusing the knowledge people already has, as opposed to forcing them to learn yet a new way (as simple is it may be) to do the same old things.

  32. flakey foont Says:

    Actually, I’m running the install process, I opened the jar out of curiosity. A giant .class file??? What are these guys smoking? Do they think that’s a good presentation for their technology? What happened to zip files? What is wrong about them?

  33. Rotsen Says:

    I am a rookie and I found the same problems. I download and did the java command but the next thing I found was to do ant -f setup.xml but that does not do anything. The bin directory has cliutil.dll.
    yes I am on a windows machine. I am looking but I do not find what is my next step.

    Thanks,

    Rotsen

  34. Toomas Römer Says:

    @Rotsen You need to use the support mediums of Glassfish to get installation help, see forums/mailinglist/irc from https://glassfish.dev.java.net/

Leave a Reply