留言板

Deployment Problem: Fedora 12, Existing Tomcat6 [RESOLVED]

Stefan Bluhm,修改在14 年前。

Deployment Problem: Fedora 12, Existing Tomcat6 [RESOLVED]

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Hi,

I have spent hours trying to deploy and figure out what is going wrong. My system:
Fedora 12
Liferay Portal 5.2.3
Tomcat6 EXISTING tomcat server from Fedora 12
Java 1.6
MySQL on a different server

The existing Tomcat is a must due to other deployed apps.

This is what I did so far (following the instructions for Tomcat 5.5):

1. Copied xercesImpl.jar from the liferay.war to the folders %TOMCAT_HOME/lib, %TOMCAT_HOME/lib/web, %TOMCAT_HOME/common/endorsed
Note that I had to create the folder %TOMCAT_HOME/common as it does not exist

2. Created and edited $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml

3. unzipped the portal dependencies to these folders: $TOMCAT_HOME/common/lib/ext, %TOMCAT_HOME/lib, %TOMCAT_HOME/lib/web, TOMCAT_HOME/lib/ext

4. Edit $TOMCAT_HOME/conf/catalina.properties to include all possible directories

5. Put the mysql connector into $TOMCAT_HOME/common/lib/ext, %TOMCAT_HOME/lib, %TOMCAT_HOME/lib/web, TOMCAT_HOME/lib/ext and also installed the Fedora one via yum

6. Created $TOMCAT_HOME/conf/jaas.config

7. There is no $TOMCAT_HOME/bin/catalina.sh but a /conf/tomcat6.conf where I added the line JAVA_OPTS="-Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config"

8. Put the liferay-portal-x.x.x.war to $TOMCAT_HOME/webapps/ROOT

restarted tomcat. went to http://localhost:8080 and got an error 404: description The requested resource () is not available.

Now all I get is this error in catalina.out

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

Nothing else in the /logs folder


Now when I copy the liferay.war file into the webapps folder I get the following log entry in /logs/catalina.2010-03-17.log (where the numbers are todays date):

Mar 17, 2010 6:29:54 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive liferay.war
Mar 17, 2010 6:30:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 17, 2010 6:30:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/liferay] startup failed due to previous errors

Does anyone have any ideas or instructions how to put liferay portal onto fedora12 with house tomcat6?

Thanks for your help,

Stefan
thumbnail
Nagendra Kumar Busam,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
Hi Stefan,

Did you copied dependencies related jar files to global classpath of application server.

Regards,
- Nagendra Kumar
thumbnail
Ivan Cheung,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Regular Member 帖子: 113 加入日期: 06-6-20 最近的帖子
Stefan,

Another thing you can try doing is compare your own installation of Liferay + Tomcat to a pre built Liferay + Tomcat bundle.

-Ivan
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Hi Ivan,

thanks. I tried to compare them but the overall structure of the bundle seems to deviate from my tomcat6 installation of fedora. Maybe I should try going through all the config files line by line and compare, but trying to avoid that.

I was hoping that someone has done exactly that installation before and could share the knowledge.

If nothing helps, I guess I have to try merging the items and find the exact differences.

Thanks for all your help,

Stefan
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Can you please tell me what memory settings you are starting your java with? The admin guide suggests JAVA_OPTS=-Xms128m -Xmx512m which is WAY to low to even start the server. I get memory allocation problems. I have now taken the bundled version setting of that. Why is it different?

Also the bundled version has more files in lib/ext than are in the liferay-dependencies.zip. Where do these additional files come from? WIthout them, liferay will not start.
thumbnail
Nagendra Kumar Busam,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
Hi Stephan,

You are right, bundled version of lib/ext is having more jar files. I think we need to have atleast some of those to make them work in all application/web servers - some body who is much clear about this can throw some light.

Better you copy all those jar files to your app server lib dir & use memory options from bundled version TOMCAT_HOME>/bin/setenv.sh

Hope it resolves your memory issues

Regards,
- Nagendra Kumar
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Hi Nagendra,

this is what I have done.

Do you have any suggestions how to get the captcha Problem sorted? It won't display the image on creating a new account. I can't find the property file to disable it either.

Thanks
thumbnail
Ivan Cheung,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Regular Member 帖子: 113 加入日期: 06-6-20 最近的帖子
Stefan Bluhm:
Hi Nagendra,

this is what I have done.

Do you have any suggestions how to get the captcha Problem sorted? It won't display the image on creating a new account. I can't find the property file to disable it either.

Thanks


Search for '## Captcha' in portal.properties. The default is already set to use the captcha:
captcha.check.portal.create_account=true


Remember to clear browser cache and refresh.

Try using a bundled version of Liferay to see the captcha in action...in case your installation errors are affecting things.
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Hi Ivan,

where do I find this file? I have read it mentioned at a lot of places but I do not have this file. Not even in the bundled version.

Best wishes,

Stefan
thumbnail
Ivan Cheung,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Regular Member 帖子: 113 加入日期: 06-6-20 最近的帖子
Stefan Bluhm:
Hi Ivan,

where do I find this file? I have read it mentioned at a lot of places but I do not have this file. Not even in the bundled version.

Best wishes,

Stefan


You're going to need to download the Liferay Portal source code. $LRPortal_Source/portal-impl/src/portal.properties

Read the following for extending and deploying portal.properties using portal-ext.properties instead of directly modifying the file from source code:
http://www.liferay.com/community/wiki/-/wiki/Main/Development+in+the+ext+environment
http://www.liferay.com/community/wiki/-/wiki/Main/Portal.properties
thumbnail
Nagendra Kumar Busam,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
Hi Stephan,

Check for below property

captcha.check.portal.create_account=false


If you want to disable make that to false as mentioned above otherwise true

Regards,
- Nagendra Kumar
thumbnail
Artur Linhart,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Expert 帖子: 459 加入日期: 07-9-13 最近的帖子
Hello,

as the default in 5.2.3 bundle there is specified
-Xmx1024m -XX:MaxPermSize=256m

so maybe some more remarks to the memory options:

1. You wrote in Your first post "The existing Tomcat is a must due to other deployed apps" so it means, You have to add the memory requirements of such applications to the portal memory requrements.

2. You should consider to increase XX:MaxPermSize too, because the default value for the loaded classes might be too low especially if You have more complexer applications using a lot of classes or libraries deployed on the same Tomcat.

3. Let me denote, the memory specifid for perm gen space is added to memory specified by Xmx option, so total memory requirements can then go to the sum of both parameters plus some extra small amount of memory for java procss itself. But be aware the situation Your total java memory usage would exceed the total physical memory available for tomcat (total physical memory minus the requirements of all other apps running in the OS) on the given server - you could fall to the necessity to use the swap of the system, what is very bad situation for performance.
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Artur,

the memory specification was given in the Administration Guide as
set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.-
timezone=GMT -Djava.security.auth.login.config=%CATALINA_HOME
%/conf/jaas.config

I finally managed to get Liferay configured and up and running. It is a bit disappointing to have to look for lots of information about the setup from lots of different places. Including incomplete software packages, wrong information as well as explanations in different sites and documents which are hard to understand.

Let's see how I get along with a running liferay...

For anyone who also wants to install liferay in the same fashion, have a look at my step by step instructions:
http://www.bluhm-de.com/index.php/Liferay

Thanks all for your help
thumbnail
Artur Linhart,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

Expert 帖子: 459 加入日期: 07-9-13 最近的帖子
:-) OK, no matter what is in the Admin manual, in the bundle with Tomcat 6 delivered by Liferay itself in setenv.bat, there is following specified:

set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config" -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Stefan Bluhm,修改在14 年前。

RE: Deployment Problem: Fedora 12, Existing Tomcat6

New Member 帖子: 17 加入日期: 10-3-17 最近的帖子
Hi Nagendra,

yes I did as mentioned in point 3 in my post.