Author Archive

Forum issues

30 April 2008

Liferay’s forums don’t current work around inheritating their permissions…

This presented us with a major problem. We have a forum in the ‘Work Based Learning’ community, which all users of the Support Point have access to. This forum is split up into sub categories, each of these sub categories only allow access to certain types of users.

All in all, so far, so  good – except for the tiny problem of a ‘HUGE’ back-door in the Liferay message board utility.

There is a tab which is available to all users, called ‘Recent Posts’ which I hear you say “that sounds useful” , Yes, it would be, if it kept the permissions which are given to the top categories within the forum..

It doesn’t, therefore you could get access to any and every entry in the forum, no matter who wrote it, and what type of account you were using. This tab has now been deleted. The tab also nicely keeped copies of each post, even if they where deleted – “That’s bit daft” Correct – Goodbye ‘Recent Post’ Hopefully they will fix it in a later release.

Advertisements

Liferay Tomcat bundle Upgrade (Liferay as root webapp)

4 March 2008

Upgrade from 4.3.3 to 4.4.2 on crusldi2

If try upgrading liferay follow the upgrade instruction from liferay wiki, liferay can start, but system returns some errors-message : org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named, so we do not use the liferay wiki method and use the downloaded liferay-tomcat-4.4.2 bundle to upgrade.

  • Shut down Tomcat.
  • Upload the 4.4.2-tomcat6 bundle to /LDIapps/Tomcat/liferay-portal-tomcat-6.0-4.4.2/
  • cd /usr/local
  • Remove tomcat softlink
  • Create new tomcat softlink by

ln -s /LDIapps/Tomcat/liferay-portal-tomcat-6.0-4.4.2/ tomcat

  • Register wblway theme files
  1. Copy <Tomcat4.3.3>/webapps/liferay/html/themes/wblway to /LDIapps/Tomcat/liferay-portal-tomcat-6.0-4.4.2/webapps/Root/html/themes/wblway
  2. edit /LDIapps/Tomcat/liferay-portal-tomcat-6.0-4.4.2/webapps/Root/WEB-INF/liferay-look-and-feel.xml
  • Copy portal-ext.properties file from 4.3.3/webapps/liferay/WEB-INF/classes/ to 4.4.2/webapps/Root/WEB-INF/classes/ .
  • Copy log4j.properties file from 4.3.3/webapps/liferay/WEB-INF/classes/ to 4.4.2/webapps/Root/WEB-INF/classes/ .
  • Restart Tomcat.
  • Compile all the portlets with new 4.4.2 dependence jar files

replace portal-kenel.jar and portal-service.jar to lib directory at portlet projects source files.

  • Redeploy the portlets from liferay administration portlet.

Problems we encountered… and solved

24 January 2008

Install lifeRay 4.2.1 as a sub-context web application

  • Download and install Tomcat
  • Download and install Java
  • Download MySQL from http://www.mysql.com and install.
  • Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Tomcat.
  1. Download mysql-connector-java-{$version}-bin.jar. (This is the JDBC connector for MySQL, for other databases, go to appropriate website to download.)
  2. Copy to $TOMCAT_HOME/common/lib/ext.
  • Populate your database with the portal schema and default data.
  1. Download script create-mysql.sql from Liferay Portal 4.2.0 SQL Scripts.
  2. In command prompt, run mysql script by entering mysql < create-mysql.sql

<!--more-->

  • Download Liferay’s Portal 4.2.0 Dependencies.
  1. Create a $TOMCAT_HOME/common/lib/ext directory and unzip the dependencies ZIP in there. If the files do not extract to this directory, make sure they are in the correct directory by moving them there.
  • Edit $TOMCAT_HOME/conf/catalina.properties.
 common.loader=
 ${catalina.home}/common/classes,\
 ...\
 ${catalina.home}/common/lib/ext/*.jar
  • For supporting UTF-8 UIRIEncoding, edit $TOMCAT_HOME/conf/server.xml.
 <Connector port="8080" maxHttpHeaderSize="8192"
  maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
  enableLookups="false" redirectPort="8443"        acceptCount="100"
  connectionTimeout="20000" disableUploadTimeout="true"
  URIEncoding="UTF-8"/>
  • Create and edit $TOMCAT_HOME/conf/Catalina/localhost/lifeRay.xml to set up the portal web application.
 lifeRay.xml:
   <Context crossContext="true" path="/lifeRay">
   <Resource
    name="jdbc/LiferayPool"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/lportal"
    username="root"
    password="****"
    maxActive="20"
    />
   <Resource
    name="mail/MailSession"
    auth="Container"
    type="javax.mail.Session"
    mail.imap.host="localhost"
    mail.pop3.host="localhost"
    mail.smtp.host="localhost"
    mail.store.protocol="imap"
    mail.transport.protocol="smtp"
    />
   <Realm
   className="org.apache.catalina.realm.JAASRealm"
   appName="PortalRealm"
   userClassNames="com.liferay.portal.security.jaas.PortalPrincipal"
   roleClassNames="com.liferay.portal.security.jaas.PortalRole"
   debug="99"
   useContextClassLoader="false"
   />
   </Context>
  • Download liferay-portal-tomcat-jdk5-4.2.1.zip, upzip to c:/temp, rename folder c:/temp/ liferay-portal-tomcat-jdk5-4.2.1\webapps\ROOT to c:/temp/ liferay-portal-tomcat-jdk5-4.2.1\webapps\lifeRay, and then move lifeRay to $TOMCAT_HOME/webapps/
  • Modify $TOMCAT_HOME/webapps/lifeRay/index.html to route to ‘/lifeRay/c’:
...
<meta content="0; url=/lifeRay/c" http-equiv="refresh">
...
<body onLoad="javascript:location.replace('/lifeRay/c')">
...
  • Modify Tomcat_root/webapps/lifeRay/WEB-INF/classes/portal-ext.properties:
...
portal.ctx=/lifeRay
...
  • Modify Tomcat_root/webapps/lifeRay/WEB-INF/web.xml.
<context-param>
<param-name>root_path</param-name>
<param-value>/lifeRay</param-value>
</context-param>
  • Restart tomcat.

Liferay – What’s it all about?

24 January 2008

Portlets! That’s what – Liferay complies with the JSR-168 and JSR-286 portlet standards, and can therefore consume any portlets written to these standards.

  • Runs on any Java EE major app server & servlet container and all major databases, and operating systems (over 700 deployment combinations)
  • Out-of-the-box usablility —choose from over 60 portlets
  • Out-of-the-box development tools
  • Built in Content Management System (CMS) & Collaboration Suite
  • Award winning AJAX enabled user interface
  • Localized to 22 languages, out-of-the-box
  • Full LDAP synchronization
  • Benchmarked as among the most secure portal platforms using LogicLibrary’s Logiscan suite
  • Business-friendly MIT License

Of the above features we use the LDAP functionality, to allow Students and Staff access, aswell as some of the standard included portlets, though mainly ones that we have made ourselves.

The server which runs our version of Liferay is running, Red Hat Enterprise Linux ES release 3 & MySQL 5.0.45

Ray’s visit to Burton Nursery

22 January 2008

I’ve just come back from visiting one of Mike Parker’s clients in Burton college – Ruth Gill, the manager of the Nursery there. It was really useful to find out what problems she had with the system and how long it took for them to be solved. I also explained what features we would be adding to the system in the coming months.

Such as linking the Award codes to the UCAS course information – so, as a Manager or Learner you can find out all the details of any course that your either studying or what the person your managing is doing, all at the click of a button.

I’ll hopefully be visiting a lot more people who are using the ‘Work Based Learning Support Point’ over the coming months – with the guys from Stoke, Shrewsbury and Burton.

When I do, I’ll be writing up any useful information here.