Liferay and Tomcat – part 3

But wait – there’s more!

So, I crank up my newly-running Liferay – running in its happy little webapp world, not as the root context, and some funny things are going on.

First: The root context that should be there isn’t there. Instead of the warm, fuzzy Tomcat page with the geeky kittycat graphic, I get a blank page. Hmm.

Second: When I load the Liferay portal, I only get two portlets: “Sign In” and “Hello, World”.

So, I do some poking around as a user. My Tomcat manager webapp comes up OK, so that tells me that other webapps that I choose to install will probably work OK. (Note to self: something to consider trying.)

Next, I log in as test:test on the portal. Well, now, this is cool. I get more portlets. I decide to add an Admin page. I add adminny portlets to it. I decide to add a user. I find a way to add somebody, fill out their info, hit submit….

… and boom. Stack trace.

Here’s a little snippet of it:

Root cause:

java.lang.NoClassDefFoundError: javax/mail/internet/InternetAddress

I go home and sleep on this information. I also download a passel of Powerpoint presentations about installing and configuring Liferay. After reading a few of these, I decide to install the standalone version of Liferay, and play a little shell game of switching CATALINA_HOME environment variables.


I download and unpack liferay-portal-tomcat-jdk5-4.2.2, futz with my environment variables, and as is my usual habit, use Cygwin to run CATALINA_HOME/bin/ And ummm….

….boom. She no go. I got a honking database error, having to do with the hsql database.

So I try something unexpected for me, and follow the actual instructions and – in Windows – double-click on the “startup.bat” icon, and let a command shell bat file do the work. (This goes against my nature for a number of reasons I won’t get into here. Yet.) And ummmm…..

Yay, she works! Which just gets me more curious. And look – I see all the marketing stuff I expected to see on my little installation as a standalone webapp. Hmmmm…..

… I don’t see any portlets along the lines of “Hello, World”, but I do see a link where I can sign in. Who am I to argue? test:test, and life is good.

Now, for some mystical reason, I try rejiggering the variables around (in order to write this post), and now the Cygwin works. It didn’t when I tried it at home – I swear!

Let’s add a user…. no problemo!

Well, maybe I should leave well enough alone for now. I’ve got two instances running (although not simultaneously), both behaving differently, and the one I really torqued with is not behaving correctly.

I’ll post again on this topic once I’ve actually written a portlet.

Leave a Reply