Fórumok

Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Sverker Abrahamsson, módosítva 12 év-val korábban

Installing Liferay 6.1.0 (from svn) on JBoss AS 7

New Member Bejegyzések: 13 Csatlakozás dátuma: 2008.04.03. Legújabb bejegyzések
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:

<!--?xml version="1.0"?-->
<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
	<resources>
		<resource-root path="hsql.jar" />
		<resource-root path="portal-service.jar" />
		<resource-root path="portlet.jar" />
	</resources>
	<dependencies>
		<module name="javax.api" />
		<module name="javax.mail.api" />
		<module name="javax.servlet.api" />
		<module name="javax.servlet.jsp.api" />
		<module name="javax.transaction.api" />
	</dependencies>
</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:

<!--?xml version="1.0"?-->
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
	<deployment>
		<exclusions>
			<module name="org.hibernate" />
		</exclusions>
		<dependencies>
			<module name="com.liferay.portal" />
			<module name="javax.mail.api" />
			<module name="org.apache.xerces" />
			<module name="org.jboss.modules" />
			<module name="system" export="false">
				<imports>
					<include path="com/sun/jmx" />
					<exclude path="/**" />
				</imports>
			</module>
		</dependencies>
	</deployment>
</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
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" /> 

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


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

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


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


13. Done, you should now be able to start jboss and go to http://localhost:8080/
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Thanks for the information. I'll try it when I find some spare time. emoticon
Waldemar Kłaczyński, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

New Member Bejegyzés: 1 Csatlakozás dátuma: 2011.10.13. Legújabb bejegyzések
You still need to delete the file "equinox.jar" and add modules to the "jboss-deployment-structure.xml":


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


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


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


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


<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
    <deployment>
        <exclusions>
            <module name="org.hibernate" />
        </exclusions>
        <dependencies>
            <module name="com.liferay.portal" />
            <module name="javax.mail.api" />
            <module name="org.apache.xerces" />
            <module name="org.jboss.modules" />
            <module name="org.jboss.ironjacamar.jdbcadapters" />
            <module name="org.osgi.core" />
            <module name="org.jboss.osgi.framework" />
            <module name="system" export="false">
                <imports>
                    <include path="com/sun/jmx" />
                    <exclude path="/**" />
                </imports>
            </module>
        </dependencies>
    </deployment>
</jboss-deployment-structure>
thumbnail
Kamesh Sampath, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Regular Member Bejegyzések: 158 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
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
thumbnail
Kamesh Sampath, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Regular Member Bejegyzések: 158 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
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

<module xmlns="urn:jboss:module:1.0" name="com.mysql">
  <resources>
    <resource-root path="mysql-connector-java-5.1.16-bin.jar" />
  </resources>
  <dependencies>
    <module name="javax.api" />
    <module name="javax.transaction.api" />
  </dependencies>
</module>

3. Update the standalone.xml for adding a new DS called "LiferayDS", and your datasource subsystem definition will look as follows,

..

<datasource jndi-name="java:jboss/datasources/LiferayDS" pool-name="LiferayPortalDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
                    <connection-url>
                        jdbc:mysql://localhost/lportal_ce?useUnicode=true&amp;useFastDateParsing=false
                    </connection-url>
                    <driver>
                        lportal-mysql
                    </driver>
                    <pool>
                        <prefill>
                            false
                        </prefill>
                        <use-strict-min>
                            false
                        </use-strict-min>
                        <flush-strategy>
                            FailingConnectionOnly
                        </flush-strategy>
                    </pool>
                    <security>
                        <user-name>
                            lportal
                        </user-name>
                        <password>
                            lportal
                        </password>
                    </security>
                </datasource>

               <drivers>
                    <driver name="lportal-mysql" module="com.mysql">
                        <driver-class>
                            com.mysql.jdbc.Driver
                        </driver-class>
                    </driver>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>
                            org.h2.jdbcx.JdbcDataSource
                        </xa-datasource-class>
                    </driver>
                </drivers>
..


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/
Joerg Larbig, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

New Member Bejegyzések: 2 Csatlakozás dátuma: 2011.12.21. Legújabb bejegyzések
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


<module xmlns="urn:jboss:module:1.0" name="com.mysql">
  <resources>
    <resource-root path="mysql-connector-java-5.1.18-bin.jar" />
  </resources>
  <dependencies>
    <module name="javax.api" />
    <module name="javax.transaction.api" />
  </dependencies>
</module>


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


<!--?xml version="1.0"?-->
<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
    <resources>
		<resource-root path="mysql-connector-java-5.1.18-bin.jar" />
        <resource-root path="portal-service.jar" />
        <resource-root path="portlet.jar" />
    </resources>
    <dependencies>
        <module name="javax.api" />
        <module name="javax.mail.api" />
        <module name="javax.servlet.api" />
        <module name="javax.servlet.jsp.api" />
        <module name="javax.transaction.api" />
    </dependencies>
</module>




How can I solve that problem ?

Thanks
Werner Bungert, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

New Member Bejegyzések: 2 Csatlakozás dátuma: 2011.12.21. Legújabb bejegyzések
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
thumbnail
Kamesh Sampath, módosítva 12 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Regular Member Bejegyzések: 158 Csatlakozás dátuma: 2010.05.27. Legújabb bejegyzések
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
thumbnail
devaraj s, módosítva 11 év-val korábban

RE: Installing Liferay 6.1.0 (from svn) on JBoss AS 7

Regular Member Bejegyzések: 228 Csatlakozás dátuma: 2012.05.21. Legújabb bejegyzések
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