Starting eXoPlatform from Eclipse

Prerequisites

  • Download and unzip the latest version of eXo Platform 3.5 (Tomcat version). The eXoPlatform location will be referenced as <eXoPlatform_dir> in this tutorial.
  • Download and install an Eclipse JEE bundle (I used Juno).

Creating the server

The first step is to create a server runtime environment, pointing to our eXoPlatform Tomcat :

  • Go to Window > Preferences > Server > Runtime Environnements
  • Click Add
  • Select Apache Tomcat v6.0
  • Click Next
  • In the field Tomcat installation directory, select the folder <eXoPlatform_dir>/tomcat-bundle
  • Click on Finish
  • Click on OK

Then we create a new instance of this server :

  • In the Servers panel, click-right then click on New > Server
  • Select Apache > Tomcat v6.0 Server
  • Enter the host name (localhost is generally good)
  • Enter the server name (eXoPlatform for example)
  • Select the Apache Tomcat v6.0 server
  • Click on Next
  • Click on Finish

You should now see your new eXoPlatform server in the Servers view :

Configuring the server

The next step is to configure the server instance :

  • Double-click on the eXoPlatform server in this view to edit its properties
  • In the Server Locations panel,
    • select Use Tomcat installation (takes control of Tomcat installation)
    • in the Deploy path, select the <eXoPlatform_dir>/tomcat-bundle/webapps folder
  • In the Timeouts pabel, increase the start timeout (300 par example)

Finally, let’s define the environment variables used by eXoPlatform :

  • Now click on Open launch configuration (still in the server properties, in the General information panel)
  • Select the Arguments tab
  • In the VM arguments, add the eXoPlatform environment variables from the <eXoPlatform_dir>/tomcat-bundle/bin/setenv.(sh|bat) file :
    -Dexo.conf.dir.name=gatein/conf
    -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
    -Djava.security.auth.login.config=../conf/jaas.conf
    -Dexo.profiles=default
    
  • In the Working directory panel, select Other and select the <eXoPlatform_dir>/tomcat-bundle/bin folder
  • Click on OK

Your eXoPlatform is now ready to be launched in Eclipse. In the Server view, you simply have to right-click on it, and click on Start.

Switching to eXoPlatform developing mode

In order to switch to the eXoPlatform debug mode, you just need to add the following environment variables (in the launch configuration properties) :

-Dorg.exoplatform.container.configuration.debug
-Dexo.product.developing=true

You can even create 2 instances of this server to easily switch between these 2 modes.

Enjoy !

About these ads

,

  1. #1 by Pierre on 27/09/2012 - 11:11

    Thanks Thomas !

    Following this great tutorial step by step I got :

    Exception in thread “Poller SunPKCS11-Darwin” java.lang.OutOfMemoryError: Java heap space
    at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)
    at sun.security.pkcs11.SunPKCS11.initToken(SunPKCS11.java:767)
    at sun.security.pkcs11.SunPKCS11.access$100(SunPKCS11.java:42)
    at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:700)
    at java.lang.Thread.run(Thread.java:680)

    I have copied the memory arguments and it works fine :
    -Xms256m -Xmx1024m -XX:MaxPermSize=256m

  2. #2 by sudhirpatel on 27/05/2013 - 09:48

    please suggest for exo 4.0 to create server

  1. eXo Blog – The Cloud User Experience Platform – Boost your eXo Platform Development with JRebel!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: