Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Sverker Abrahamsson
Installing Liferay 6.1.0 (from svn) on JBoss AS 7
8 de Setembro de 2011 14:02
Resposta

Sverker Abrahamsson

Ranking: New Member

Mensagens: 13

Data de entrada: 3 de Abril de 2008

Mensagens recentes

This recepie describes how to install Liferay on JBoss AS 7. I didn't suceed with Liferay 6.0.x but instead had to use the trunk checked out from svn. Please note that the trunk is work in progress and changing heavily so sometimes it's not possible to build it.

1. Check out the sourcecode from svn trunk

2. Build by issuing the following commands:

mkdir dist
ant jars
ant -f build-dist.xml zip-portal-war zip-portal-dependencies

2. Download Jboss AS 7.0.1 and unpack it

3. Create a folder $JBOSS_HOME/modules/com/liferay/portal/main

5. Unpack the content of the liferay-portal-dependencies-6.1.0.jar from dist to this folder. It will contain the files hsql.jar, portal-service.jar and portlet.jar.

6. Create a file in this folder called module.xml with the following content:

 1<?xml version="1.0"?>
 2<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
 3    <resources>
 4        <resource-root path="hsql.jar" />
 5        <resource-root path="portal-service.jar" />
 6        <resource-root path="portlet.jar" />
 7    </resources>
 8    <dependencies>
 9        <module name="javax.api" />
10        <module name="javax.mail.api" />
11        <module name="javax.servlet.api" />
12        <module name="javax.servlet.jsp.api" />
13        <module name="javax.transaction.api" />
14    </dependencies>
15</module>


7. Unpack the content of liferay-portal-6.1.0.war to $JBOSS_HOME/standalone/deployments/liferay-portal-6.1.0.war to create an exploded deployment. This directory will be refered to as $PORTAL_HOME below

8. Create an empty file $JBOSS_HOME/standalone/deployments/liferay-portal-6.1.0.war.dodeploy

9. Create a file called jboss-deployment-structure.xml in $PORTAL_HOME/WEB-INF with the following content:

 1<?xml version="1.0"?>
 2<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
 3    <deployment>
 4        <exclusions>
 5            <module name="org.hibernate" />
 6        </exclusions>
 7        <dependencies>
 8            <module name="com.liferay.portal" />
 9            <module name="javax.mail.api" />
10            <module name="org.apache.xerces" />
11            <module name="org.jboss.modules" />
12            <module name="system" export="false">
13                <imports>
14                    <include path="com/sun/jmx"/>
15                    <exclude path="/**" />
16                </imports>
17            </module>
18        </dependencies>
19    </deployment>
20</jboss-deployment-structure>


10. Delete $PORTAL_HOME/WEB-INF/lib/eclipselink.jar

11. Create a file $PORTAL_HOME/WEB-INF/classes/portal-ext.properties with the following content:

liferay.home=${jboss.home.dir}/liferay
resource.repositories.root=${liferay.home}

12. Edit $JBOSS_HOME/standalone/configuration/standalone.xml, change the following entries:

Change
1<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />

to
1<deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" deployment-timeout="240"/>


Change
1<virtual-server name="default-host" enable-welcome-root="true">

to
1<virtual-server name="default-host" enable-welcome-root="false">


Add to security-domains section:
1                <security-domain name="PortalRealm">
2                    <authentication>
3                        <login-module code="com.liferay.portal.security.jaas.PortalLoginModule" flag="required"/>
4                    </authentication>
5                </security-domain>


13. Done, you should now be able to start jboss and go to http://localhost:8080/
Hitoshi Ozawa
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
8 de Setembro de 2011 15:12
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 8000

Data de entrada: 23 de Março de 2010

Mensagens recentes

Thanks for the information. I'll try it when I find some spare time. emoticon
Waldemar Kłaczyński
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
20 de Outubro de 2011 16:05
Resposta

Waldemar Kłaczyński

Ranking: New Member

Mensagens: 1

Data de entrada: 13 de Outubro de 2011

Mensagens recentes

You still need to delete the file "equinox.jar" and add modules to the "jboss-deployment-structure.xml":

1
2<module name="org.osgi.core"/>
3<module name="org.jboss.osgi.framework"/>


For connections with mysql module must be added in the "jboss-deployment-structure.xml:

1
2<module name="org.jboss.ironjacamar.jdbcadapters"/>


Here is my well-tested file "jboss-deployment-structure.xml":

 1
 2<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
 3    <deployment>
 4        <exclusions>
 5            <module name="org.hibernate" />
 6        </exclusions>
 7        <dependencies>
 8            <module name="com.liferay.portal" />
 9            <module name="javax.mail.api" />
10            <module name="org.apache.xerces" />
11            <module name="org.jboss.modules" />
12            <module name="org.jboss.ironjacamar.jdbcadapters"/>
13            <module name="org.osgi.core"/>
14            <module name="org.jboss.osgi.framework"/>
15            <module name="system" export="false">
16                <imports>
17                    <include path="com/sun/jmx"/>
18                    <exclude path="/**" />
19                </imports>
20            </module>
21        </dependencies>
22    </deployment>
23</jboss-deployment-structure>
Kamesh Sampath
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
3 de Dezembro de 2011 08:42
Resposta

Kamesh Sampath

Ranking: Regular Member

Mensagens: 131

Data de entrada: 26 de Maio de 2010

Mensagens recentes

With Jboss AS 7.0.2 and the latest source of 6.1 i was successfully able to deploy, as bundle by building from source, except that we need to add the <security-domain> manually else the portal start-up will fail

Also when the Portal starts up for the first time the deployment will fail because the response was not within 60 secs, as Portal will be creating the tables, we could either create the tables before hand or just delete the ROOT.war.deploy.failed file and stop touch a new file called ROOT.war.dodeploy . Voila! You will see the Liferay Portal on JBoss 6.1

-Kamesh
Kamesh Sampath
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
5 de Dezembro de 2011 22:49
Resposta

Kamesh Sampath

Ranking: Regular Member

Mensagens: 131

Data de entrada: 26 de Maio de 2010

Mensagens recentes

There were few more modifications that were required to properly deploy and start the Lifreray Portal on AS7 especially with MySQL DB. The following are the things that are fixed to make a proper deployment and startup

1. Delete the mysql.jar from the $JBOSS_HOME/modules/com/liferay/portal/main/mysql.jar and also the entry from module.xml for mysql.jar under resources, as we need jdbc4 compliant jar , i used mysql 5.1.16
2. create a new module like com/mysql/main/, add the 5.1.16 jar there and add a module.xml too as shown below
 1
 2<module xmlns="urn:jboss:module:1.0" name="com.mysql">
 3  <resources>
 4    <resource-root path="mysql-connector-java-5.1.16-bin.jar"/>
 5  </resources>
 6  <dependencies>
 7    <module name="javax.api"/>
 8    <module name="javax.transaction.api"/>
 9  </dependencies>
10</module>

3. Update the standalone.xml for adding a new DS called "LiferayDS", and your datasource subsystem definition will look as follows,
 1
 2..
 3
 4<datasource jndi-name="java:jboss/datasources/LiferayDS" pool-name="LiferayPortalDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
 5                    <connection-url>
 6                        jdbc:mysql://localhost/lportal_ce?useUnicode=true&amp;useFastDateParsing=false
 7                    </connection-url>
 8                    <driver>
 9                        lportal-mysql
10                    </driver>
11                    <pool>
12                        <prefill>
13                            false
14                        </prefill>
15                        <use-strict-min>
16                            false
17                        </use-strict-min>
18                        <flush-strategy>
19                            FailingConnectionOnly
20                        </flush-strategy>
21                    </pool>
22                    <security>
23                        <user-name>
24                            lportal
25                        </user-name>
26                        <password>
27                            lportal
28                        </password>
29                    </security>
30                </datasource>
31
32               <drivers>
33                    <driver name="lportal-mysql" module="com.mysql">
34                        <driver-class>
35                            com.mysql.jdbc.Driver
36                        </driver-class>
37                    </driver>
38                    <driver name="h2" module="com.h2database.h2">
39                        <xa-datasource-class>
40                            org.h2.jdbcx.JdbcDataSource
41                        </xa-datasource-class>
42                    </driver>
43                </drivers>
44..


4. In the portal-ext.properties specify the jndi.name as follows, jdbc.default.jndi.name=java:jboss/datasources/LiferayDS, not that in earlier versions of JBoss we just give like LiferayDS, but now we need to give the full name otherwise the spring-hibernate will lookup @ env/
Werner Bungert
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
21 de Dezembro de 2011 13:25
Resposta

Werner Bungert

Ranking: New Member

Mensagens: 2

Data de entrada: 21 de Dezembro de 2011

Mensagens recentes

I am not able using mysql according to the last posts.
HSQL works fine but when I setup liferay 6.1.0 using mysql the database
is created during startup of my JBoss 7.0.2 but I am not able to
pass the "Basic Configuration" form after startup. The submit is not executed but
no error occurs in the log file.
(jdk1.7.0_02, mysql-connector-java-5.1.18-bin.jar)

module setup for mysql

 1
 2<module xmlns="urn:jboss:module:1.0" name="com.mysql">
 3  <resources>
 4    <resource-root path="mysql-connector-java-5.1.18-bin.jar"/>
 5  </resources>
 6  <dependencies>
 7    <module name="javax.api"/>
 8    <module name="javax.transaction.api"/>
 9  </dependencies>
10</module>


liferay module ( I tried it with and without mysql jar )

 1
 2<?xml version="1.0"?>
 3<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
 4    <resources>
 5        <resource-root path="mysql-connector-java-5.1.18-bin.jar" />
 6        <resource-root path="portal-service.jar" />
 7        <resource-root path="portlet.jar" />
 8    </resources>
 9    <dependencies>
10        <module name="javax.api" />
11        <module name="javax.mail.api" />
12        <module name="javax.servlet.api" />
13        <module name="javax.servlet.jsp.api" />
14        <module name="javax.transaction.api" />
15    </dependencies>
16</module>




How can I solve that problem ?

Thanks
Werner Bungert
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
22 de Dezembro de 2011 11:36
Resposta

Werner Bungert

Ranking: New Member

Mensagens: 2

Data de entrada: 21 de Dezembro de 2011

Mensagens recentes

Seems to be a bug in the setup wizard when using mysql.

After setting
setup.wizard.enabled=false
in the portal-ext.properties everything works fine emoticon
Kamesh Sampath
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
17 de Fevereiro de 2012 05:51
Resposta

Kamesh Sampath

Ranking: Regular Member

Mensagens: 131

Data de entrada: 26 de Maio de 2010

Mensagens recentes

Check out my my blog on the small changes thats required to deploy Liferay 61 on JBoss AS71 - Thunder

I have attached the patch or sample module.xml, standalone.xml and jboss-deployment-structure.xml which works well for my setup and though there is not much of a change.

Hope it helps emoticon
Anexos: Liferay_JBossAS71_sample_configs.zip (4,0k)
devaraj s
RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7
3 de Julho de 2012 02:40
Resposta

devaraj s

Ranking: Regular Member

Mensagens: 183

Data de entrada: 21 de Maio de 2012

Mensagens recentes

Hi,
I have deployed liferay 6.1 in jboss 7.1.1. its running perfectly but when i try to go access the portal it making problem .. like login, adding page, and all.

Thanks in advanceemoticon