Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not found! Seun O January 8, 2008 2:02 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Roman Hoyenko January 8, 2008 7:13 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Theo Tekstra January 14, 2008 7:03 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Keith Egler January 14, 2008 11:22 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Theo Tekstra January 14, 2008 11:29 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Theo Tekstra January 14, 2008 11:39 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Theo Tekstra January 14, 2008 12:01 PM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun ramesh radhakrishnan February 13, 2008 4:20 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun ramesh radhakrishnan February 14, 2008 3:24 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Árpád Magosányi December 17, 2011 11:35 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Árpád Magosányi December 18, 2011 2:17 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Jevon Wright December 18, 2011 7:36 PM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Googol plex October 3, 2012 10:27 AM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Dennis Gearon January 20, 2013 6:38 PM
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun Dennis Gearon January 21, 2013 8:31 AM
Seun O
SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not found!
January 8, 2008 2:02 AM
Answer

Seun O

Rank: New Member

Posts: 1

Join Date: January 8, 2008

Recent Posts

I got the error message below while trying to deploy liferay on Ubuntu Server 7.10 using tomcat 5.5 and i got 404 error on the browser.

I was trying a production standard install of liferay portal,
tomcat start fine, mysql start fine, lportal database was created
the jar files were in the common/lib/ext (and the loader reference was added in the catalina.properties file)
using ROOT.xml (mysql, mail and jaas configured) and the liferay portal files unzipped into /webapps/ROOT/
jaas.config file containing "PortalRealm {com.liferay.portal.kernel.security.jaas.PortalLoginModule required;};"
i actually traced the PortalPrincipal & PortalRole shown in the error to the portal-impl.jar file and it was there

Hopping someone will give me a pointer as to what i might have missed.


INFO: Starting Servlet Engine: Apache Tomcat/5.5
Jan 7, 2008 11:49:45 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 7, 2008 11:49:47 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not found! Class not added.
Jan 7, 2008 11:49:47 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalRole not found! Class not added.
Jan 7, 2008 11:49:47 PM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
Jan 7, 2008 11:49:49 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jan 7, 2008 11:49:49 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors


Thanks
Roman Hoyenko
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 8, 2008 7:13 AM
Answer

Roman Hoyenko

Rank: Liferay Master

Posts: 868

Join Date: October 8, 2007

Recent Posts

Did you add the directory where portal-impl.jar is to the classpath of your tomcat ?
Theo Tekstra
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 14, 2008 7:03 AM
Answer

Theo Tekstra

Rank: New Member

Posts: 5

Join Date: February 27, 2007

Recent Posts

we have the same problems after deploying a minor server update which includes Tomcat 5.5, the portal does not start anymore.

I have seen this same problem in the Tomcat bugzilla (https://issues.apache.org/jira/browse/JS2-828) - hope that helps finding a solution.

Last lines in the log file:

14:47:01,354 ERROR [org.apache.catalina.realm.JAASRealm] Class com.liferay.portal.security.jaas.PortalPrincipal not found! Class not added.
14:47:01,356 ERROR [org.apache.catalina.realm.JAASRealm] Class com.liferay.portal.security.jaas.PortalRole not found! Class not added.
14:47:01,356 INFO [org.apache.catalina.realm.JAASRealm] Setting useContextClassLoader = false
14:47:02,077 INFO [org.apache.coyote.http11.Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-8180
14:47:02,863 INFO [org.apache.catalina.storeconfig.StoreLoader] Find registry server-registry.xml at classpath resource
14:47:03,094 INFO [org.apache.catalina.startup.Catalina] Server startup in 16655 ms


Starting the portal results in:

HTTP Status 404 - /c/

type Status report

message /c/

description The requested resource (/c/) is not available.
Apache Tomcat/5.5.25


We were in the process of upgrading Liferay to a new version (nothing implemented yet), but the system patches had to be implemented for securtity reasons.
Keith Egler
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 14, 2008 11:22 AM
Answer

Keith Egler

Rank: New Member

Posts: 2

Join Date: January 14, 2008

Recent Posts

I spent several days tracking down similar issues so I thought that I would share this info:

For the com.liferay.portal.security.jaas.PortalPrincipal not found error, make sure that you have the support-tomcat.jar in your classpath (in standard liferay deployment, it is in location C:\liferay4.3.5\server\lib.

For the HTTP Status 404 - /c/ error, make sure that you have a WEB-INF\classes\portal-ext.properties defined with your correct portal.ctx defined.

Hope this helps.
Theo Tekstra
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 14, 2008 11:29 AM
Answer

Theo Tekstra

Rank: New Member

Posts: 5

Join Date: February 27, 2007

Recent Posts

Thanks Keith, will have it checked and report back if this has helped
Theo Tekstra
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 14, 2008 11:39 AM
Answer

Theo Tekstra

Rank: New Member

Posts: 5

Join Date: February 27, 2007

Recent Posts

someone was already smart enough to try it, and it did not help unfortunately but thanks for the post anyway!
Theo Tekstra
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 14, 2008 12:01 PM
Answer

Theo Tekstra

Rank: New Member

Posts: 5

Join Date: February 27, 2007

Recent Posts

We are still not sure what the problem was, but restoring the old Tomcat directory solved the problem.

We were doing a server maintenance patch for FreeBSD, which included tomcat-5.5.25.
ramesh radhakrishnan
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
February 13, 2008 4:20 AM
Answer

ramesh radhakrishnan

Rank: New Member

Posts: 2

Join Date: February 13, 2008

Recent Posts

I am also facing the problem

type Status report

message /c

description The requested resource (/c) is not available.

I am using apache-tomcat-5.5.26 and jdk1.5.0_14.

thanks
ramesh radhakrishnan
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
February 14, 2008 3:24 AM
Answer

ramesh radhakrishnan

Rank: New Member

Posts: 2

Join Date: February 13, 2008

Recent Posts

The error was caused due to the missing web.xml in the ROOT/WEB-INF directory. The error is fixed. However I am getting the following error.

javax.servlet.ServletException: Servlet.init() for servlet MainServlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

root cause

java.lang.IncompatibleClassChangeError
com.liferay.portal.security.pwd.PwdEncryptor.encodePassword(PwdEncryptor.java:166)
com.liferay.portal.security.pwd.PwdEncryptor.encrypt(PwdEncryptor.java:110)
com.liferay.portal.security.pwd.PwdEncryptor.encrypt(PwdEncryptor.java:82)
com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:248)
com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:313)
com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:123)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy16.checkCompany(Unknown Source)
com.liferay.portal.service.CompanyLocalServiceUtil.checkCompany(CompanyLocalServiceUtil.java:810)
com.liferay.portal.util.PortalInstances._initCompany(PortalInstances.java:284)
com.liferay.portal.util.PortalInstances.initCompany(PortalInstances.java:89)
com.liferay.portal.servlet.MainServlet.init(MainServlet.java:387)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

I have JDK1.5.0_14 and Tomcat 5.5.26 running on Mandriva 2008. The portal distribution used is liferay-portal-servlet23-4.4.1.war.

I am working on the problem by looking in logs and documentation.

However the bundle version liferay-portal-tomcat-5.5-jdk5-4.4.0.zip is installed and could login and use it.

Any help will be appreciated.

R.Ramesh
Árpád Magosányi
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
December 17, 2011 11:35 AM
Answer

Árpád Magosányi

Rank: New Member

Posts: 2

Join Date: December 17, 2011

Recent Posts

Have the same problem.

It seems that the needed class is simply missing from support-tomcat.jar in 6.1.0-ce-b4:

/opt/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/lib/ext$ unzip -l support-tomcat.jar
Archive: support-tomcat.jar
Length Date Time Name
--------- ---------- ----- ----
0 2011-11-10 16:00 META-INF/
1214 2011-11-10 16:00 META-INF/MANIFEST.MF
0 2011-11-10 15:30 com/
0 2011-11-10 15:30 com/liferay/
0 2011-11-10 15:30 com/liferay/portal/
0 2011-11-10 15:30 com/liferay/portal/security/
0 2011-11-10 15:25 com/liferay/portal/security/jaas/
0 2011-11-10 15:30 com/liferay/support/
0 2011-11-10 15:30 com/liferay/support/tomcat/
0 2011-11-10 15:30 com/liferay/support/tomcat/jasper/
0 2011-11-10 15:30 com/liferay/support/tomcat/jasper/runtime/
0 2011-11-10 15:30 com/liferay/support/tomcat/loader/
0 2011-11-10 15:30 com/liferay/support/tomcat/poller/
0 2011-11-10 15:30 com/liferay/support/tomcat/poller/comet/
0 2011-11-10 15:30 com/liferay/support/tomcat/session/
0 2011-11-10 15:30 com/liferay/support/tomcat/startup/
2099 2011-11-10 16:00 com/liferay/support/tomcat/jasper/runtime/TagHandlerPool.class
566 2011-11-10 16:00 com/liferay/support/tomcat/loader/PortalClassLoader.class
1050 2011-11-10 16:00 com/liferay/support/tomcat/loader/PortalClassLoaderFactory.class
6691 2011-11-10 16:00 com/liferay/support/tomcat/poller/comet/CatalinaCometProcessor.class
1388 2011-11-10 16:00 com/liferay/support/tomcat/poller/comet/CatalinaCometRequest.class
2030 2011-11-10 16:00 com/liferay/support/tomcat/poller/comet/CatalinaCometResponse.class
1719 2011-11-10 16:00 com/liferay/support/tomcat/poller/comet/CatalinaCometSession.class
1265 2011-11-10 16:00 com/liferay/support/tomcat/poller/comet/CatalinaCometSessionUtil.class
538 2011-11-10 16:00 com/liferay/support/tomcat/session/SessionLessManagerBase.class
1898 2011-11-10 16:00 com/liferay/support/tomcat/startup/PortalHostConfig.class
--------- -------
20458 26 files
Árpád Magosányi
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
December 18, 2011 2:17 AM
Answer

Árpád Magosányi

Rank: New Member

Posts: 2

Join Date: December 17, 2011

Recent Posts

I have downloaded some older versions, and the class is missing from them as well.
By taking a look at the tomcat bundle I see no trace of reference to jaas in the configs.
However if I remove the reference from the startup script (/etc/default/tomcat6 , as it is a debian with the shipped tomcat6), I still get the exception.

BTW it is a Debian stable on 2.6.26-1-sparc64-smp, tomcat is 6.0.28-9+squeeze1, the jre is openjdk-6-jre-headless 6b18-1.8.10-0+squeeze2.
Jevon Wright
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
December 18, 2011 7:36 PM
Answer

Jevon Wright

Rank: New Member

Posts: 8

Join Date: December 5, 2011

Recent Posts

I also solved this problem by making sure that all the JARs in lib\ext\*.jar were included, as defined in conf/catalina.properties, including all of the portlet dependencies:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext/*.jar
Googol plex
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
October 3, 2012 10:27 AM
Answer

Googol plex

Rank: New Member

Posts: 1

Join Date: September 28, 2011

Recent Posts

I found that the problem is in the Realm definition
<Realm
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.security.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.security.jaas.PortalRole"
debug="99"
useContextClassLoader="false"
/>

it should be

<Realm
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.kernel.security.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.kernel.security.jaas.PortalRole"
debug="99"
useContextClassLoader="false"
/>
Dennis Gearon
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 20, 2013 6:38 PM
Answer

Dennis Gearon

Rank: New Member

Posts: 5

Join Date: November 27, 2011

Recent Posts

I am getting this error also

I have followed all the directions on:
http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/installing-liferay-for-an-enterpri-4

My copy of tomcat-support.jar does not have the class files.
My copy of portal-support.jar DOES have two class files of the same name with a different path. The path that the one poster added saying it needs 'kernel' in the path for the class names in ${catalina.home}/conf/Catalina/localhost/ROOT.xml . I tried that and it did not work.

Is there better instructions for installing on Ubuntu/tomcat6 ?

I have been REALLY thorough. Here is a script that I exercised ONE line at a time in a test script and it does everything that is needed, except the hand edits. For those, it pops up the text to copy,then opens and editor. It is for Ubuntu/Postgres/ExistingTomcat server:


#IMPORTANT ! ! ! ! ! !
# For all files being downloaded . . .
# important, remove all GET variables from the end of file name to down load.
# I.E., anything from a '?' character in the URL INCLUDING the '?' char




# command line variables to this script
# $1 is the url for the UNBUNDLED liferay war file
# $2 is the url for the zipped regular dependencies file
# $3 is the url for the BUNDLED WITH TOMCAT liferay zip file which contains
# other tomcat6 specific dependencies files
# $4 is the url for the postgres JDBC connector jar




# invoke by:
# sudo deleteAndReinstallLiferay.sh http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.1%20GA2/liferay-portal-6.1.1-ce-ga2-20120731132656558.war http://downloads.sourceforge.net/project/lportal/Liferay%20Portal/6.1.1%20GA2/liferay-portal-dependencies-6.1.1-ce-ga2-20120731132656558.zip http://jdbc.postgresql.org/download/postgresql-9.2-1002.jdbc4.jar
# change the URLs to suit the version that you are installing. These are current as of 2013-01-21




# The official directions for doing this:
# http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-tomcat-7-0
# (notice that it is Tomcat7, pay attention to exceptions for Tomcat 6)
# This one MAY be better, and is the one used here
# http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/installing-liferay-for-an-enterpri-4





# Other directions consulted:
# http://www.shotmentality.org/content/bgoines78/installating_liferay_6x_tomcat_6x_bundled_ubuntu
# http://www.liferay.com/community/forums/-/message_boards/message/6880773
# http://portal.gnenc.org/web/drew.blessing.esu10.org/resources/-/wiki/Main/Installing+Liferay+Portal?p_p_auth=6CkrNwyf&_36_pageResourcePrimKey=66277786




installDateTime="`date +%Y-%m-%d_%H-%M-%S`"
tmp="/tmp/liferaryInstall/$installDateTime"
rm -rf $tmp
mkdir -p $tmp

/etc/init.d/tomcat6 stop


#main LifeRay
mkdir -p /var/lib/tomcat6/webapps/ROOT
chown -R tomcat6:tomcat6 /var/lib/tomcat6/webapps
rm -rf /var/lib/tomcat6/webapps/ROOT/*
rm -f /var/lib/tomcat6/webapps/ROOT.war
mkdir -p $tmp/1
wget -P $tmp/1 $1
cp $tmp/1/* /var/lib/tomcat6/webapps/ROOT.war
chown root:tomcat6 /var/lib/tomcat6/webapps/ROOT.war


#Additional dependencies jars (assumes zip of multiple jars)
mkdir -p $tmp/2
mkdir -p $tmp/2/tmp
mkdir -p /var/lib/tomcat6/common
wget -P $tmp/2 $2
unzip -o -d $tmp/2/tmp $tmp/2/*.zip
dependencyDir=$(ls -d $tmp/2/tmp/*/ | xargs -l basename)
cp $tmp/2/tmp/$dependencyDir/* /var/lib/tomcat6/common
chown -R root:tomcat6 /var/lib/tomcat6/common


#Additional dependencies jars from BUNDLED FOR TOMCAT ZIP
mkdir -p $tmp/3
mkdir -p $tmp/3/tmp
mkdir -p /var/lib/tomcat6/lib/ext
wget -P $tmp/3 $3
unzip -o -d $tmp/3/tmp $tmp/3/*.zip
bundleDir=$(ls -d $tmp/3/tmp/*/ | xargs -l basename)
bundleTomcatDir=$(ls -d $tmp/3/tmp/$bundleDir/tomcat*/ | xargs -l basename)
cp $tmp/3/tmp/$bundleDir/$bundleTomcatDir/lib/ext/* /var/lib/tomcat6/lib/ext
chown -R tomcat6:tomcat6 /var/lib/tomcat6/lib/ext
# Next, as per:http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-tomcat-7-0
rm -f /var/lib/tomcat6/lib/ext/ccpp.jar
chown -R root:tomcat6 /var/lib/tomcat6/lib/ext


#Postgres JBDC connector (may be unnecessary? Noticed some Postgres named jars in the dependencies above.)
# assumes SINGLE jar, not zipped
mkdir -p $tmp/4
mkdir -p /var/lib/tomcat6/lib/ext
wget -P $tmp/4 $4
postgresDriverFileName=$(ls -f $tmp/4/*.jar | xargs -l basename)
cp $tmp/4/$postgresDriverFileName /var/lib/tomcat6/lib/ext
chown root:tomcat6 /var/lib/tomcat6/lib/ext/$postgresDriverFileName


# ROOT.xml context file
# as per the second, main howto reference at top and the following web page:
# http://www.liferay.com/community/wiki/-/wiki/Main/Database+Portal+Properties#section-Database+Portal+Properties-PostgreSQL
mkdir -p /var/lib/tomcat6/conf/Catalina/localhost/
echo "making /var/lib/tomcat6/conf/Catalina/localhost/ROOT.xml"
echo "<Context path=\"\">
<Resource
name=\"jdbc/LiferayPool\"
auth=\"Container\"
type=\"javax.sql.DataSource\"
driverClassName=\"driverClassName=org.postgresql.Driver\"
url=\"jdbc:postgresql://localhost:5432/lportal\"
username=\"\"
password=\"\"
maxActive=\"100\"
maxIdle=\"30\"
maxWait=\"10000\"
/>

<Resource
name=\"mail/MailSession\"
auth=\"Container\"
type=\"javax.mail.Session\"
mail.transport.protocol=\"smtp\"
mail.smtp.host=\"localhost\"
mail.store.protocol=\"imap\"
mail.imap.host=\"localhost\"
/>

<Realm
className=\"org.apache.catalina.realm.JAASRealm\"
appName=\"PortalRealm\"
userClassNames=\"com.liferay.portal.security.jaas.PortalPrincipal\"
roleClassNames=\"com.liferay.portal.security.jaas.PortalRole\"
debug=\"99\"
useContextClassLoader=\"false\"
/>
</Context>" > /var/lib/tomcat6/conf/Catalina/localhost/ROOT.xml
# ROOT.xml file modifications
clear
echo "Edit the /var/lib/tomcat6/confCatalina/localhost/ROOT.xml file and add"
echo "the correct username and password for the liferay user that will be created later"
echo "This user should be given full database privileges at first, then reduced after"
echo "install to only having select, update, delete, and insert privileges on the 'liferay' database"
echo "HINT: GET THE INFORMATION --BEFORE-- pressing a key"
echo ""
read -p "Press any key to continue... a new gedit editor will open with sudo privileges" -n1 -s
gedit /var/lib/tomcat6/conf/Catalina/localhost/ROOT.xml
echo""
chown root:tomcat6 /var/lib/tomcat6/conf/Catalina/localhost/ROOT.xml


# cataline.properties file modifications
echo "add ' ,\${catalina.home}/lib/ext/*.jar' to end 'common.loader' property value"
echo "don't forget the space and comma!"
gedit /var/lib/tomcat6/conf/catalina.properties
clear
echo ""
echo "add ' ,\${catalina.home}/lib/ext/*.jar' to end 'common.loader' property value"
echo "HINT: USE THE MOUSE to HIGHLIGHT and COPY from the above line before pressing a key"
echo "don't forget the space and comma!"
echo ""
read -p "Press any key to continue... a new gedit editor will open with sudo privileges" -n1 -s
gedit /var/lib/tomcat6/conf/catalina.properties
echo ""
chown root:tomcat6 /var/lib/tomcat6/conf/catalina.properties


mkdir -p /var/lib/tomcat6/conf/jaas.config
echo ""
echo "Making /var/lib/tomcat6/conf/jaas.config"
echo ""
echo "PortalRealm {
com.liferay.portal.kernel.security.jaas.PortalLoginModule required;
};" > /var/lib/tomcat6/conf/jaas.config
chown root:tomcat6 /var/lib/tomcat6/conf/jaas.config


#Set params in catalina.sh for tomcat to run liferay well
clear
echo "Edit the catalina.sh file to give the best functionality for the liferay"
echo "HINT: USE MOUSE TO HIGHLIGHT and copy the following. Insert it near the top of the file"
echo "where the commented out directions for using JAVA_OPTS are."
echo ""
echo "JAVA_OPTS=\"$JAVA_OPTS -Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config\""
read -p "Press any key to continue... a new gedit editor will open with sudo privileges" -n1 -s
gedit /usr/share/tomcat6/bin/catalina.sh
echo ""
chown root:root /usr/share/tomcat6/bin/catalina.sh


#Set params in server.xml for tomcat to run liferay well
clear
echo "Edit the server.xml file to give the best functionality for the liferay"
echo "HINT: USE MOUSE TO HIGHLIGHT and copy the following and the paste"
echo "it into the editor that will open and merge it with parameters in the"
echo "non ssl HTTP/1.1 connector port on 8080 already in existence"
echo ""
echo "<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port=\"8080\"
maxHttpHeaderSize=\"8192\"
maxThreads=\"150\"
minSpareThreads=\"25\"
maxSpareThreads=\"75\"
enableLookups=\"false\"
acceptCount=\"100\"
connectionTimeout=\"20000\"
disableUploadTimeout=\"true\"
URIEncoding=\"UTF-8\"
/>"
echo ""
read -p "Press any key to continue... a new gedit editor will open with sudo privileges" -n1 -s
gedit /var/lib/tomcat6/conf/server.xml
echo ""
chown tomcat6:root /var/lib/tomcat6/conf/server.xml


#drop and recreate role and database for liferay
su postgres
psql --command "DROP DATABASE lportal;"
psql --command "DROP ROLE liferay;"
psql --command "CREATE ROLE liferay WITH CREATEDB LOGIN PASSWORD 'choose one' ENCRYPTED;"
psql --command "CREATE DATABASE lportal OWNER liferay;"
exit

/etc/init.d/tomcat6 start
Dennis Gearon
RE: SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not foun
January 21, 2013 8:31 AM
Answer

Dennis Gearon

Rank: New Member

Posts: 5

Join Date: November 27, 2011

Recent Posts

Forgot to mention, the script is for Ubuntu10.x running Tomcat6 in the default directory locations