Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jacob M
LIferay 6 and existent Tomcat6 installation
December 22, 2010 9:14 AM
Answer

Jacob M

Rank: Junior Member

Posts: 37

Join Date: June 18, 2008

Recent Posts

Hi I need little help

I install Tomcat6 with Ubuntu 10.10 and liferay like that:

add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update

sudo apt-get install sun-java6-jre solr-common solr-tomcat tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples mysql-server sun-java6-jdk libmysql-java

ln -s /usr/share/java/mysql.jar /usr/share/tomcat6/lib/mysql.jar

. Copy %TOMCAT_HOME%/webapps/ROOT folder to %TOMCAT_HOME%/webapps/liferay605 folder.

3. Download liferay-portal-6.0.5.war and liferay-portal-dependencies-6.0.5.zip

4. Unzip WAR file and copy all content into %TOMCAT_HOME%/webapps/doot folder.

5. Unzip and copy all dependencies to %TOMCAT_HOME%/lib

6. Download and copy 02 extra libraries (jta.jar and mail.jar) to %TOMCAT_HOME%/lib

7. Create doot.xml file into %TOMCAT_HOME%/conf/Catalina/localhost folder. It looks like this:

<Context path="" crossContext="true">
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/lportal605_db?useUnicode=true&amp;characterEncoding=UTF-8"
username="root"
password=""
maxActive="20"
/>
</Context>
In my case, DB user is “root” with empty password. You must create an empty DB in MySQL, for example “lportal605_db”.

8. Create portal-ext.properties into %TOMCAT_HOME%/webapps/doot folder. It looks like this:

jdbc.default.jndi.name=jdbc/LiferayPool
portal.ctx=/doot
9. If you are using MySQL as database server instead of HSQL, you must copy mysql jdbc lib into %TOMCAT_HOME%/lib folder.

10. Add the code “

set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m
” in the %TOMCAT_HOME%/lib/bin/startup.bat or startup.sh

the server have 2 GB of memory
BUT I SEE THE ERROR IN catalina.out

16:58:08,738 ERROR [ContextLoader:220] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.scripting.Scriptin$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueR$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolve$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueR$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireC$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableB$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableB$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBea$
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.j$
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanF$
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplication$
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:$
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
....


What I am doing round? how I solve the problem Thanks in advance
Randall Hidajat
RE: LIferay 6 and existent Tomcat6 installation
December 22, 2010 9:19 AM
Answer

Randall Hidajat

LIFERAY STAFF

Rank: New Member

Posts: 15

Join Date: August 31, 2010

Recent Posts

Hi Jacob,

Did you install tomcat to be integrated with ubuntu? Have you tried starting up Tomcat without trying to deploy the WAR? What is the default landing page that Tomcat gives you?

I've noticed that When you have Tomcat integrated with Ubuntu, it can sometimes split up the installation into two different locations.

Randall
Jacob M
RE: LIferay 6 and existent Tomcat6 installation
December 22, 2010 2:23 PM
Answer

Jacob M

Rank: Junior Member

Posts: 37

Join Date: June 18, 2008

Recent Posts

Yes I install tomcat to be integrated with ubuntu because need to work with "nutch" and I like to use Liferay also integrated with nutch. This the reason I install after tomcat liferay. In case I not deploy the WAR TOMCAT us Normal.

In ubuntu tomcat in split in few places

@:/usr/share/tomcat6

INSIDE IS:

bin defaults.md5sum defaults.template lib logs skel

@:/var/lib/tomcat6

common conf logs server shared webapps work

and ALso emoticon /etc/tomcat6 "File"

When I copy the lib I copy inside /usr/share/tomcat6/lib

any configuration is inside /var/lib/tomcat6/conf or inside any place folder webapps

Really is a nightmare I read hundred of URls in Google and all have diference configurations for install liferay 6 with existent tomcat6

18:26:14,587 ERROR [ContextLoader:220] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.util.Infras$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver$
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueR$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireC$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableB$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableB$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBea$
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
Randall Hidajat
RE: LIferay 6 and existent Tomcat6 installation
December 24, 2010 10:03 AM
Answer

Randall Hidajat

LIFERAY STAFF

Rank: New Member

Posts: 15

Join Date: August 31, 2010

Recent Posts

Hi Jacob,

As I know it, some linux distros will not split Tomcat in half. Unfortunately that is not the case with Ubuntu. Here are some steps to deploy the Liferay WAR in the separated Tomcat.

* TOMCAT_HOME=CATALINA_HOME
* CATALINA_HOME is in /usr/share/tomcat6
* CATALINA_BASE is /var/lib/tomcat6
* The default page picks up from /var/lib/tomcat6/webapps/ROOT/.

1. Delete and unpack the WAR into /var/lib/tomcat6/webapps/ROOT/
2. Place the dependencies from the .zip into /usr/share/tomcat6/lib/
* If you would like to place the dependencies in the ext folder, you must make sure to change /etc/tomcat6/catalina.properties.
* Under common loader, you must enter in ${catalina.home}/lib/ext/*.jar
3. Open the bundle an in /${tomcat.home}/lib/ext copy these jars into the same folder as the dependencies:
activation.jar
jta.jar
mail.jar
4. Edit /usr/share/tomcat6/bin/catalina.sh
* Set this property: JAVA_OPTS="-Djava.awt.headless/true Dfile.encoding=UTF-8 -server -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=1024m -XX:+DisableExplicitGC"
5. In var/lib/tomcat6/webapps/ROOT/WEB-INF/classes, create a portal-ext.properties and set up MySQL.
* you will also need to set liferay.home to the location of your choice. I chose liferay.home=/liferayhome
6. In your {liferay.home} copy the bundle's "data" and "deploy" folder over to {liferay.home}
7. In your terminal, run "sudo chmod 777 {liferay.home}/ -R"
* This allows tomcat to write to the folder, and all other files in it.
8. Also navigate to /var/lib/tomcat6/webapps/ROOT/html and run "sudo chmod 777 icons/ -R.
9. Run a tail on /var/log/tomcat6/catalina.out
10. To start Liferay type "sudo service tomcat6 start"


Regards,
Randall