{"id":15,"date":"2007-05-18T12:09:53","date_gmt":"2007-05-18T17:09:53","guid":{"rendered":"https:\/\/sendai77.com\/blog\/?p=15"},"modified":"2007-05-18T14:36:51","modified_gmt":"2007-05-18T19:36:51","slug":"liferay-and-tomcat-part-2","status":"publish","type":"post","link":"https:\/\/sendai77.com\/blog\/liferay-and-tomcat-part-2\/","title":{"rendered":"Liferay and Tomcat &#8211; part 2"},"content":{"rendered":"<p>Here are some more detailed steps I took to get <a href=\"http:\/\/www.liferay.com\/\">Liferay<\/a> and <a href=\"http:\/\/tomcat.apache.org\/\">Tomcat<\/a> to work together. Then, I&#8217;ll share some more interesting data and observations.<\/p>\n<p>For those hardware\/OS minded folks, these experiments are being conducted on a Dell Latitude 620 2.33 GHZ  Intel Centrino Duo running Windows XP SP 2, 2 GB of RAM.<\/p>\n<p>So to recap, I settled on the technique of replacing Liferay&#8217;s suggested ROOT.xml file in conf\/Catalina\/localhost with an XML file named liferay.xml. I decided not to go with the technique of creating a context.xml file in webapps\/liferay\/META-INF. Note to reader: these path fragments are relative to what I&#8217;ve defined as CATALINA_HOME for this instance of Tomcat.<\/p>\n<p>Well, the next thing that Liferay required that I didn&#8217;t have configured was the jaas.config file &#8211; it needed to live in the plain old conf directory.<\/p>\n<p>Next step: JAVA_OPTS. It&#8217;s important to make sure that you crank the memory settings for Tomcat, and that you give Tomcat a clue as to the location of the jaas.config file.<\/p>\n<p>Next, I followed <a href=\"http:\/\/www.liferay.com\/web\/guest\/devzone\/forums\/message_boards\/message\/24930\">an instruction I found in the Liferay forums<\/a> that advised creating the file webapps\/liferay\/WEB-INF\/classes\/portal-ext.properties with the following content:<\/p>\n<p>portal.release=professional<br \/>\nportal.ctx=\/liferay<br \/>\nauto.deploy.dest.dir=..\/webapps<br \/>\nportal.instances=1<br \/>\nomniadmin.users=<\/p>\n<p>I&#8217;m not certain if this indeed has the effect it&#8217;s supposed to, but it sounded like a reasonable thing to attempt.<\/p>\n<p>Well, I was hopeful and tried cranking up Tomcat &#8211; but it died again. Basically, I did not have this line in conf\/catalina.properties configured correctly:<\/p>\n<p>common.loader=${catalina.home}\/common\/classes,${catalina.home}\/common\/i18n\/*.jar,${catalina.home}\/common\/endorsed\/*.jar,${catalina.home}\/common\/lib\/*.jar,${catalina.home}\/common\/lib\/ext\/*.jar<\/p>\n<p>But once I fixed that, the portal tried to load &#8211; and the connection to the database blew up.<\/p>\n<p>The reason was simple: I had installed MySQL Community Server 5.0.41, and the default security for MySQL is much stricter that it has been in the past. So, I simply had to create a user and a password, and issue a GRANT ALL on the &#8216;lportal&#8217; database &#8211; then update my Context settings in liferay.xml to include the username and passwords in the JDBC connector data.<\/p>\n<p>Life is good. The portal runs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are some more detailed steps I took to get Liferay and Tomcat to work together. Then, I&#8217;ll share some more interesting data and observations. For those hardware\/OS minded folks, these experiments are being conducted on a Dell Latitude 620 &hellip; <a href=\"https:\/\/sendai77.com\/blog\/liferay-and-tomcat-part-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-webtech"],"_links":{"self":[{"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":0,"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendai77.com\/blog\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}