In the below article i will focus on the steps required to setup liferay 6.1 EE in Jboss 5.1 server. 

 

  1. Create a directory called Liferay Home. 
  1. Download Jboss 5.1 from drop box and extract it in Liferay Home directory. 
  1. In JbossHome/jboss-as/bin/run.conf.bat change the JAVA_OPTS variable with the following options:

 

          set "JAVA_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Dfile.encoding=UTF-8 -Duser.timezone=GMT+5:30 -Djava.net.preferIPv6Addresses=false -Djava.net.preferIPv4Stack=true"

 

Above step is required for only windows machine. 

  1. Open JbossHome/jboss-as/server/default/conf/standardjbosscmp-jdbc.xml and search for the “Hypersonic SQL” type-mapping in the file. Change: 

          <type-mapping>
                   <name>Hypersonic SQL</name>
                   <row-locking-template/>
                   …
                   <mapping>
                             <java-type>java.lang.Object</java-type>

                              <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->

                              <jdbc-type>VARBINARY</jdbc-type>

                              <sql-type>VARBINARY</sql-type>

                   </mapping>
                   ..
          </type-mapping>

to

          <type-mapping>

                   <name>Hypersonic SQL</name>

                   <row-locking-template/>

                   ...

                   <mapping>

                             <java-type>java.lang.Object</java-type>

                             <!-- hsqldb only supports directly serializable objects for sql type OBJECT -->

                             <jdbc-type>VARBINARY</jdbc-type>

                             <sql-type>VARBINARY(1024)</sql-type>

                   </mapping>

                   ...

          </type-mapping>

5.   Remove hibernate-validator.jar from Jboss_Home/common/lib.

  1. Edit JbossHome/jboss-as/server/default/conf/login-config.xml and comment out the entire XML for policy "other" in lines 113-129.
  2. Unzip the Liferay Portal 6.1 EE dependencies file and copy the jar files to JbossHome/jboss-as/server/default/lib.
  3. Delete all the files and folders from JbossHome/jboss-as/server/default/deploy/ROOT.war
  4. Unzip the Liferay Portal 6.1 war file to ROOT.war directory.
  5.  Remove jaxrpc.jar, stax.jar, xercesimpl.jar, xml-apis.jar from JbossHome/jboss-as/server/default/deploy/ROOT.war/WEB-INF/lib.
  6. Create portal-ext.properties in /LiferayHome/JbossHme directory and addentries for your MySQL DB

    

  1. If you want to deploy war file of portlet, please place it into below path and also put below properties in portal-ext.properties file:

#War Path

     auto.deploy.deploy.dir=/opt/PenskelrQA/Node1/GA2/LiferayHome/JbossHome/deploy

     auto.deploy.jboss.dest.dir=/opt/PenskelrQA/Node1/GA2/LiferayHome/JbossHome/jboss-as/server/default/deploy