07 Mar

Liferay 6.1.1 CE GA2 IDE on JBoss 7 with Eclipse Juno… problems until now!

Eclipse_IconIn this post is shared the installation of Liferay 6.1.1 Community Edition GA2 IDE on Ubuntu 12.04 LTS 64bit with JBoss Application Server 7.1 Community Edition and PostgreSQL 8.4.15. The post is based on the installation tutorial described in the ‘Step by step installation of Liferay 6.1.1 CE GA2 on Ubuntu 12.04 LTS 64bit and JBoss 7… no bundle please!‘ and supposes you have the same environment installed and working in your system.

Unfortunately lot’s of problems are presents and documented here. Hope will be solved soon but until now this way of developing on Liferay with JBoss is not so easy yet.

As we like and prefer, the installation is a step by step list of commands and tasks… simpler to understand, to do and to test. Hope you’ll be agree.

Sources

In this paragraph are collected the used sources for the installation. I suggest to download and store them in a safe repository for future purposes (re-installation, maintainance, etc.).

  • Eclipse IDE for Java EE Developers – Juno release from Eclipse Downloads (‘eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz’).
  • Plugin server-manager-web from Liferay Plugin 6.1 GA (‘server-manager-web-6.1.0.1-ce-ga1-….war’).
  • Liferay 6.1.1 GA2 on Tomcat Bundle from Liferay Portal Download (‘liferay-portal-tomcat-6.1.1-ce-ga2-….zip’).
  • Liferay SDK from Liferay Portal Download (‘liferay-plugins-sdk-6.1.1-ce-ga2-….zip’).

Eclipse Juno installation

Connect to the server (or the virtual machine like in our case) as ‘liferay’ user. We discourage the use of the root user for security reasons.

  • Open a terminal and execute:
cd /home/liferay/Desktop/
cp /mnt/.../eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz .
tar zxvf eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz
rm -rf eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz
  • Let’s run eclipse and use it.
/home/liferay/Desktop/eclipse/eclipse &
  • In the menus bar: Help -> Check for update. Update, if requested, and restart.

Eclipse EGit installation

To have a professional version control of your source code you need a CVS, SVN, Git (or similar) module installed on Eclipse. Here we prefer EGit Eclipse that you can install as described below.

Liferay IDE installation

Liferay IDE, like all the Liferay suite, it’s very well documented here. Liferay IDE installation is documented here and it’s described below.

Add Liferay server as remote

Until now Liferay on JBoss is not supported using the Liferay IDE because only a Tomcat Server can be added to the list of Liferay servers. Reading around in the web and in the Liferay’s forum should be possibile to add a Liferay server as remote. We’ll see that it is possibile… but it doesn’t work properly. But let’s see how to do it.

  • Move the ‘server-manager-web-6.1.0.1-ce-ga1-….war’ file in ‘/opt/liferay/deploy’. This is a hot deploy and the file will be delete in few seconds.
  • To check the installation: open a browser and access to ‘http://localhost:8080/server-manager-web/status’ (login:test@liferay.com, password:test).
  • Below an example of correct result:
{"error":"","status":0,"output":""}

.

service liferay stop
nano /opt/liferay/jboss/standalone/configuration/standalone.xml

.

...
<subsystem xmlns="urn:jboss:domain:logging:1.1">
 ...
 <logger category="org.quartz"><level name="ERROR"/></logger>
 ...
  • Unzip the Liferay Tomcat bundle (‘liferay-portal-tomcat-6.1.1-ce-ga2-….zip’) in /opt/dummyLiferay
chown -R liferay:liferay /opt/dummyLiferay
/opt/dummyLiferay/tomcat-7.0.27/bin/startup.sh
  • Wait while liferay startup with success…
/opt/dummyLiferay/tomcat-7.0.27/bin/shutdown.sh
  • Unzip Liferay SDK (‘liferay-plugins-sdk-6.1.1-ce-ga2-….zip’) in /opt/liferay-plugins-sdk-6.1.1
chown -R liferay:liferay /opt/liferay-plugins-sdk-6.1.1
service liferay start
  • In Eclipse go to New Liferay SDK in the Liferay icon menu.
  • Location: ‘/opt/liferay-plugins-sdk-6.1.1’ and click Ok.
  • In Eclipse go to New Liferay Server in the Liferay icon menu.
  • Location: ‘/opt/liferay-plugins-sdk-6.1.1’ and click Ok.
  • Select ‘Remote Liferay Server’ -> Next
  • Select Liferay Bundle Type to Tomcat 7 and Liferay Bundle Directory set to ‘/opt/dummyLiferay/tomcat-7.0.27’ -> Next
  • Set Password to ‘test’ -> Validate connection -> Next -> Finish

In many tests, the INFO and WARN messages in the console are fast and so many. But restarting everything work… don’t know why.

My personal compliments… Liferay on JBoss and PostgreSQL is installed with success!

Unfortunately lot’s of problems are presents and documented here when you try to release something developed. Hope will be solved soon but until now this way of developing on Liferay with JBoss is not so easy yet.

19 Feb

Liferay 6.1.1 CE GA2 IDE on Tomcat 7 with Eclipse Juno

Eclipse_IconIn this post is shared the installation of Liferay 6.1.1 Community Edition GA2 IDE on Ubuntu 12.04 LTS 64bit with Apache Tomcat Application Server 7.0.32 and PostgreSQL 8.4.15. The post is based on the installation tutorial described in the ‘Step by step installation of Liferay 6.1.1 CE GA2 on Ubuntu 12.04 LTS 64bit and Tomcat 7… no bundle please!‘ and supposes you have the same environment installed and working in your system.

As we like and prefer, the installation is a step by step list of commands and tasks… simpler to understand, to do and to test. Hope you’ll be agree.

Sources

In this paragraph are collected the used sources for the installation. I suggest to download and store them in a safe repository for future purposes (re-installation, maintainance, etc.).

  • Eclipse IDE for Java EE Developers – Juno release from Eclipse Downloads (‘eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz’).
  • Liferay 6.1.1 GA2 on Tomcat Bundle from Liferay Portal Download (‘liferay-portal-tomcat-6.1.1-ce-ga2-….zip’).
  • Liferay 6.1 JavaDoc from Liferay Portal Download (‘liferay-portal-doc-6.1.1-ce-ga2-….zip’).
  • Liferay 6.1 Source from Liferay Portal Download (‘liferay-portal-src-6.1.1-ce-ga2-….zip’).

Eclipse Juno installation

Connect to the server (or the virtual machine like in our case) as ‘liferay’ user. We discourage the use of the root user for security reasons.

  • Open a terminal and execute:
cd /home/liferay/Desktop/
cp /mnt/.../eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz .
tar zxvf eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz
rm -rf eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz
  • Let’s run eclipse and use it.
/home/liferay/Desktop/eclipse/eclipse &
  • In the menus bar: Help -> Check for update. Update, if requested, and restart.

Eclipse EGit installation

To have a professional version control of your source code you need a CVS, SVN, Git (or similar) module installed on Eclipse. Here we prefer EGit Eclipse that you can install as described below.

Liferay IDE installation

Liferay IDE, like all the Liferay suite, it’s very well documented here. Liferay IDE installation is documented here and it’s described below.

Liferay SDK installation

service liferay stop.
  • Unzip Liferay SDK (‘liferay-plugins-sdk-6.1.1-ce-ga2-….zip’) in /opt/liferay-plugins-sdk-6.1.1
chown -R liferay:liferay /opt/liferay-plugins-sdk-6.1.1
  • In Eclipse go to New Liferay SDK in the Liferay icon menu.
  • Location: ‘/opt/liferay-plugins-sdk-6.1.1’ and click Ok.

Liferay JavaDoc and Source installation

  • Copy liferay-portal-doc-6.1.1-ce-ga2-….zip in ‘/opt/liferay’.
  • Copy liferay-portal-src-6.1.1-ce-ga2-….zip in ‘/opt/liferay’.
  • In Eclipse go to New Liferay Server in the Liferay icon menu.
  • Liferay v6.1 (on Tomcat 7) and then press Next.
  • Liferay Tomcat Directory:’/opt/liferay/tomcat’. Press Next.
  • ‘Browse Zip’ of Liferay Javadoc URL selecting ‘/opt/liferay/liferay-portal-doc-6.1.1-ce-ga2-….zip’.
  • ‘Browse Zip’ of Liferay Source URL selecting ‘/opt/liferay/liferay-portal-src-6.1.1-ce-ga2-….zip’.
  • Do not configure the bundle link (not done yet!).
  • Press Next then Finish.
  • In Eclipse go to Servers in the window and start the Liferay server.

Now you are ready to develop your first portlet.