Tuesday, July 17, 2007

Installing Liferay Portal 4.3

Update: There are several very handy presentations called Lifecasts on the Liferay website. They make the already simple installation and configuration even easier.

I wrote the following entry while performing the actual installation, which was much simpler than I had anticipated. A few grimaces but no tears.

------

For the past few days I've been researching portals and portlets to replace Microsoft Sharepoint for our corporate intranet. If you'd like to know why I'm replacing Sharepoint, please install and use Sharepoint. If you're still clueless, fire up Sharepoint Designer and get a good book on .Net.

Ok, now that we're all on the same page, the portal that's got me excited today is called Liferay. That's right, your software got me excited. Your feature documents often fill me with great hope, which invariably leads to a much larger-than-necessary crash into the depths of depression and self-hatred. Still, I must press on. Someday I'll deploy the software that will earn me the status of Employee of the Quarter. Someday.

Anyhow, I found out about Liferay when researching Alfresco, a document management system.

"Huh? I thought you were researching portals?"

Cork it. I'm also researching document management systems, and content management systems, and customer relation management systems and all variations of the above, "enterprise" or otherwise. Really I don't understand why there's so much distinction here. If you want a system to store records then surely you might want to collaborate about the records; maybe schedule a meeting about said records or leave a comment? Perhaps the records in question relate to a particular customer? That wouldn't be terribly strange now would it? I guess it would.

So anyhow, Liferay portal is some kind of Java thing that has all sorts of portlets which are some other kinds of Java things that plug in to the portal to provide the actual features that a person might want. The default portlets supported by Liferay look very promising and best of all, there's some kind of Alfresco portlet. This combination could be the Sharepoint killer that I've been looking for. (Yes, I really did just say "Sharepoint killer" with the full knowledge of the power of that phrase in search engines. There, I just said it again.)

Both Liferay and Alfresco are open source, or at least have public open source versions. I haven't looked into licensing much yet, but it looks like I can freely use and develop for both and I like that. However, being community-driven open source projects, it also means that your community forgot to write proper documentation and probably forgot to implement some show-stopper of a feature. Ouch, burn.

Enough with the preface, let's get on with the install.

I'm installing Liferay on my garbage machine just to see it in action. The garbage machine in question is running Windows XP Pro.

"Oh well then you're just asking for problems...."

Stuff it. If I decide on Liferay it will have to run on a Windows 2003 Server because we're almost 100% Windows here. Not my choice, just the way it is. Get over it. Anyhow, installing on XP Pro should be just fine as I just want to see how it works.

Here we go...

1) I'm visiting http://www.liferay.com/web/guest/downloads and there's a nice "Recommended Download" link entitled "Liferay Enterprise Portal 4.3.0 (Bundled with Tomcat 6.0)". I like recommended download links, especially considering the schizophrenic list of alternative downloads you typically offer me.

It's a zip file, praise Blod (the um, God of Blogs). There are some quick installation instructions underneath the link:

"Quick installation instructions: Install Java Runtime, Unzip, Run startup.bat or startup.sh. Read "Liferay Portal 4 - Installation Guide" for instructions on how to change to a production-ready database instead of HSQLDB."

Sounds easy!

2) Checking the system for Java runtime -- check. Actually: check, check, check, check. I have four Javas, three versions of version 5, and one version of version 6. Whatever. Your Java makes me confused.

3) Download complete. Unzipping.

Ok, what I've got here is a bunch of files and folders. There's a RUNNING.txt file with instructions for installing and running Tomcat. Do I need to follow these instructions? Hmm, according to the LICENSE document, this IS Tomcat. Alright, so my guess is that you basically just installed your software on/in Tomcat and zipped it all up. I guess we can work with that.

4) Running startup.bat. Which is in "bin/". (would it have been so hard to note that even though we all know that bin is short for binary, a convenience that saves us a mere 30 seconds assuming we can only type one word per minute?).

*Blip* Ah, the black blip of a batch file that terminates without pausing. Fine. Shell it is.

"Neither the JAVA_HOME nor the JRE_HOME environment variable is defined. At least one of these environment variable is needed to run this program."

I hate your Java.

5) Reading Quick Installation guide for Liferay. Step 1 says that I need to download and install JavaSE 5.0 and define the JAVA_HOME environment variable.

Have I mentioned that I hate your Java? So I have to actually download and install the JDK because all I've got on this machine is four versions of the JRE. I'm about to have five versions of the JRE because it's included in the JDK. I'm not sure what "Java SE" means, and there's also a "Java EE". What's wrong with you?

On the Java SE Downloads page there's a picture of a girl sitting in a tree while using a laptop. You should take that down because it fills me with rage. There are also about sixty five downloads to choose from. The first download is "JDK 6 Update 2". Is that an update for JDK 6, or JDK with an update? Why would I want an un-updated JDK? The second link is "JDK Update 1 with Java EE SDK Update 3 Preview 2". You bastard.

And wait, aren't I supposed to be downloading J2SE (another acronym!) version 5? Damnit. Ok, thanks to Google I've located the page to download JDK 5, and that same chick is still sitting in a tree.

Ok, the first link is "JDK 5.0 Update 12 with NetBeans IDE 5.5.1". That sounds good, I'll try it. Ok, the download button took me to a page with four thousand, seven hundred and eighty six links. I see another download button; I'm going for it.

Son of a crap, another download page. You are a bad, bad person. Ok, I have to click that I accept a license agreement that I'm not going to read, and then....ahh, ok, I just have to choose the "J2SE(TM) and NetBeans(TM) IDE Cobundle (J2SE 1.5.0 U12 / NB 5.5.1), Multi-language" link under "Windows Platform - J2SE(TM) and NetBeans(TM) IDE Cobundle (J2SE 1.5.0 U12 / NB 5.5.1". Sounds both high-tech and enterprise at the same time. Yay, downloading.

Hey wait a minute, didn't you tell me to "Download an install JavaSE 5.0" in your installation instructions? Aren't I downloading JavaSE 1.5.0? Does JavaSE == J2SE? Nevermind. It's cake day and I'm going to get some cake and eat it. (for real, it's not some silly metaphor)

Damnit there's no cake left. The rest of this install had better go smoothly.

6) Installing J2SE 1.5.0 or JavaSE 5.0 or JDK 5 or something like that.

Man it takes a long time to unpack jars. Done!

7) Ok, re-running startup.bat.

Dang it. If you're going to use Installsheild to install your product, then you have the power to set environment variables for me. Or maybe find a less 1990's way of storing your path? But then we wouldn't have this blog, would we.

8) Setting JAVA_HOME *or* JRE_HOME. I'll pick JAVA_HOME, it sounds nice.

Ok, that worked not at all.

I'll set JRE_HOME. But which JRE to point to now that I have five of them? The largest one that starts with 5 I guess. Oh no, I mean 1.5. I think. 1.5 = 5 and 1.6 = 6. You won't outfox me!

Oh yeah, setting variables via System Properties doesn't update them. What year is this? Google or restart...Google or restart... I'll just restart and take a little walk.

9) Running startup.bat.

It worked! I've got me a nice Tomcat shell that popped up. It's setting "useContextClassloader" to false...that's good. Some more stuff is happening. Good, good. Setting "useContextClassloader" to false again just in case. Good. Ok server startup in 70 thousand milliseconds. Awesome.

10) Browsing to localhost:8080. Hot dog, it worked! Signing in as default user. Success!

Ok, it's working but it's slow. Like sixty seconds to load a page slow. The Tomcat console is reporting java.lang.OutOfMemoryError. Interesting, considering that I'm only using 430MB of 1GB of RAM. The CPU is pegged.

I click on Add Content and about a minute later I get a blank popup. You like doing this to me, don't you. Ok, back to the instructions.

11) Re-reading installation instructions. Hm. Ok so the default database is probably the reason that the system runs so poorly, and that's not a big deal. But now I'm wondering how I use this thing. Let's check the website for some documentation. Ah, Portal Administrator's Guide, perfect.

"Coming Soon!"

Damn you.

Ok, so the documentation for version 4.3 isn't quite complete. That's ok, it's open source and I can write my own documentation. Snicker. But seriously, it looks like there's some documentation for 4.2 and I'm betting that some of it will apply. I'm glad that there is at least some documentation, and it looks pretty good overall.

According to the Portal Administrator's Guide for version 4.2, I click on Add Content to add portlets to the page. Unfortunately this is the same Add Content page that comes up blank on my installation.

Do I have to log in as a different user? I've seen no indication that I have to.

Do I have to download portlets manually? I know there are many bearded men out there who can't stand any extra bits bundled into their software, but I would expect at least one portlet to be available.

Something is wrong.

Looking back at the Tomcat console I'm noticing an error that I missed: "Unable to load repository ... plugins.liferay.com ..."

Ok, that's interesting. Let's ping it: "could not find host plugins.liferay.com".

Awesome. You've almost got me upset, but the strange calmness of 4PM has washed over me.

12) Let me check your forums.

Ok, I found this thread: http://www.liferay.com/web/guest/devzone/forums/message_boards/message/36461 which leads me to believe that everything should be working regardless of the fact that plugins.liferay.com doesn't exist.

Not finding anything about a blank Add Content window.

13) Let me try IE instead of Firefox, just for giggles.

14) That was dumb. This thing is too slow to be messing around like this. Let me figure out why it's running so slow. Searching forums for out of memory errors.

I'm going to try adding the memory options to my catalina.bat file from the following wiki page:

http://wiki.liferay.com/index.php/Setting_up_the_Alfresco_Portlet

Ok, that just doesn't work at all. Restoring catalina.bat.

Server is back up and running. Let me try it again just to see....

It works?!

Ok, apparently all that I needed to do was stop and restart the server.

Conclusion

Your software failed to make me cry today, and for that I am thankful. I do feel like a bit of a fool, however, since the purpose of this blog is to rant about how much I hate your software, but that's what I get for writing while I'm working. Your Java did upset me for a little while there, but not enough to bring tears. Nice try.

So far Liferay looks like it might do much of what I need in order to dump Sharepoint.

Off to a Great Start - Blogger.com

Oh great, now I'm blogging.

I've created this blog here on the Web 2.0 in order to vent the frustration that your software has caused me. It's a last ditch effort, really. I've tried medication, meditation, therapy, various plants, self-help books, and a half dozen religions but nothing has helped. I hate your software. It makes me feed bad.

Another thing I hate are blogs. I reject all information from blogs and about blogs and especially information from blogs about blogs. I also can't stand blogging, and I'm only on my third paragraph. This had better work.

I got started with blogging back on the morning of July 17th, 2007 after recovering from a minor blackout caused by the installation of your software; something you'll be reading about in an upcoming entry. I put the word "blog" into Google and the second link that appeared brought me here to blogger.com where I was up and running in only a few moments using my Gmail account (or "Google account" or whatever the hell they call it now).

The reason that it took a few moments to get started instead of just a couple moments or a single moment, is that I received a sign from blogging Gods upon the creation of this blog:

Some people might regard this omen as warning, but to me it's rage-inducing evidence that this will one day become the most important blog to have ever existed on the topic of your software and the grief that it has caused me.