Liferay 4.3, Mysql 5, JDK6, Tomcat 6 HELP

34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
I am trying to install liferay 4.3 with the following:

Mysql5 - which is running and working perfectly
jdk6
and tomcat 6

Following the instuctions here:
http://content.liferay.com/4.3/doc/installation/liferay_4_installation_guide/onepage/#d0e1063

My catalina.out file gives me this:

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
Aug 8, 2007 9:43:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre1.6.0_02/lib/i386/client:/usr/java/jre1.6.0_02/lib/i386:/usr/java/jre1.6.0_02/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Aug 8, 2007 9:43:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 8, 2007 9:43:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1195 ms
Aug 8, 2007 9:43:24 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 8, 2007 9:43:24 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
Aug 8, 2007 9:43:24 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not found! Class not added.
Aug 8, 2007 9:43:24 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalRole not found! Class not added.
Aug 8, 2007 9:43:24 PM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
Loading jar:file:/usr/local/apache-tomcat-6.0.13/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/usr/local/apache-tomcat-6.0.13/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/usr/local/apache-tomcat-6.0.13/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Loading jar:file:/usr/local/apache-tomcat-6.0.13/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/cache-single-vm.properties
Starting Liferay Enterprise Portal 4.3.0 (Owen / Build 4300 / June 26, 2007)
Aug 8, 2007 9:43:38 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalPrincipal not found! Class not added.
Aug 8, 2007 9:43:38 PM org.apache.catalina.realm.JAASRealm parseClassNames
SEVERE: Class com.liferay.portal.security.jaas.PortalRole not found! Class not added.
Aug 8, 2007 9:43:38 PM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
Aug 8, 2007 9:43:38 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 8, 2007 9:43:38 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 8, 2007 9:43:38 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/45 config=null
Aug 8, 2007 9:43:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14574 ms
Aug 8, 2007 10:37:39 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Aug 8, 2007 10:37:39 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.SocketException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486)
at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283)
at org.apache.jk.server.JkMain.pause(JkMain.java:681)
at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
at org.apache.catalina.connector.Connector.pause(Connector.java:1074)
at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:616)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:659)
Aug 8, 2007 10:37:40 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina



Can someone please help me? I have been beating my head against the wall for 3 days now trying to get this to work. I am about ready to abandon the project altogether. Does anyone have this setup working????????
32081, modified 18 Years ago. Regular Member Posts: 115 Join Date: 5/22/07 Recent Posts
Chris -
I am using Liferay 4.3, JDK6, Tomcat 6 with HSQL for testing and it works fine for me.

bash-2.05$ ./catalina.sh version
<snip>
Server version: Apache Tomcat/6.0.13
Server built: May 5 2007 03:39:58
Server number: 6.0.13.0
OS Name: SunOS
OS Version: 5.9
Architecture: sparc
JVM Version: 1.6.0_02-b05
JVM Vendor: Sun Microsystems Inc.

I havent tried using it with Mysql but I dont suspect that is the problem you are running into.

James
34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
Your right. It's not an mysql problem.

I can't even get the Liferay 4.3, Tomcat 6 with HSQL working any longer. I used to have it working. UGGGGGGG!!!!!

Could you give me a link to the JDK6 that you are using?

Thank you so much for your help James. Help is rather slow coming on this community forum.
32081, modified 18 Years ago. Regular Member Posts: 115 Join Date: 5/22/07 Recent Posts
Chris Schultz:
Your right. It's not an mysql problem.

I can't even get the Liferay 4.3, Tomcat 6 with HSQL working any longer. I used to have it working. UGGGGGGG!!!!!

Could you give me a link to the JDK6 that you are using?

Thank you so much for your help James. Help is rather slow coming on this community forum.


My guess is you hosed your Tomcat/Liferay installation somehow or maybe the environment variables do not get setup properly. How do you start Tomcat up? You could just download/install the Liferay package again.

I downloaded JDK6 from here: http://java.sun.com/javase/downloads/index.jsp

I choose the first option 'JDK 6 Update 2'

James
34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
My environmental variables seem to be showing up ok.

echo $JAVA_HOME

shows the correct location of my jdk directory.... Going to try a clean install and see what happens.
32081, modified 18 Years ago. Regular Member Posts: 115 Join Date: 5/22/07 Recent Posts
Chris Schultz:
My environmental variables seem to be showing up ok.

echo $JAVA_HOME

shows the correct location of my jdk directory.... Going to try a clean install and see what happens.


Just for future reference the best way to check if the environment is setup is by running 'catalina.sh version' it will print out a number of environment variables including the app versions that you are using.

FYI the 1st exception you are seeing 'java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina' is from bootstrap.jar which resides in the Tomcat /bin directory - which is why I think either the jar was hosed or some environment variable is off (e.g. CATALINA_HOME).

James
34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
Clean install has my liferay 4.3 + tomcat 6 + jdk6 working correctly.

Now, how do I use mySQL 5 database?
32081, modified 18 Years ago. Regular Member Posts: 115 Join Date: 5/22/07 Recent Posts
Chris Schultz:
Clean install has my liferay 4.3 + tomcat 6 + jdk6 working correctly.

Now, how do I use mySQL 5 database?


The setup should be similar to your previous Liferay versions:

1) modify tomcat-dir/conf/Catalina/localhost/ROOT.xml and add the mysql configuration. Dont forget to remove the hsql config.
2) put the mysql connector jar in tomcat-dir/lib/ext

That should be it.

James
34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
Thanks James!

Got it working. I am going to post a detailed write up on how to do it.
17711, modified 18 Years ago. Expert Posts: 280 Join Date: 6/27/06 Recent Posts
Hey guys, I'm having trouble with getting 4.3.1 to work with mysql.

In ROOT.xml if I swap back to hypersonic, liferay starts up perfectly.

When I swap over to mysql, it gives all kinds of errors.
I am using Java 5.0 though, Tomcat 6, Mysql 5.0.

I have the mysql jdbc connector in tomcat/common/lib/ext under the name: mysql-connector-java-5.0.7-bin.jar

ROOT.xml:

<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
username="root"
password="pw"
maxActive="20"
/>

Here is the first error:
SEVERE: StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
at com.liferay.portal.servlet.LuceneServlet.init(LuceneServlet.java:88)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CompanyLocalServiceFactory' defined in class path resource [META-INF/portal-spring.xml]: Cannot resolve reference to bean 'com.liferay.portal.service.CompanyLocalService.transaction' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CompanyLocalService.transaction' defined in class path resource [META-INF/portal-spring.xml]: Cannot resolve reference to bean 'liferayTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayTransactionManager' defined in class path resource [META-INF/data-source-spring.xml]: Cannot resolve reference to bean 'liferaySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferaySessionFactory' defined in class path resource [META-INF/data-source-spring.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate dialect class
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)


etc, etc.

As far as I know, you need to just edit ROOT.xml and drop in the mysql jdbc driver, but everything is breaking for me. Anyone got any ideas?

Thanks!
-Ed
32081, modified 18 Years ago. Regular Member Posts: 115 Join Date: 5/22/07 Recent Posts
Ed -
Looks like you set it up right. Did you remember to initialize the mysql database?

James
17711, modified 18 Years ago. Expert Posts: 280 Join Date: 6/27/06 Recent Posts
Hey James, I'm pretty sure I did.

I created lportal database and ran the create-mysql.sql script, it has all the tables that are supposed to be there (account, address, blogs, etc.).

I can connect and browse around the database, so it's definitely running, as well as installed as a service.

If there's anything after the create script, I didn't do that.

There's not too much that can be involved, i wonder if it's a conflict between java and the driver or ... something.

I'm using jdk 1.5.0_12 with jdbc: mysql-connector-java-5.0.7-bin.jar, which is the only java version 5 connector there is.

Error starting dialect....I'm stumped.
35051, modified 18 Years ago. New Member Posts: 2 Join Date: 8/13/07 Recent Posts
Hello Ed F.

one quick check. Is the & you used in the mysql connection string in HTML entity style like &ampamp;
I tried to use the normal ampersand and it also gave me dialect errors. Maybe this is also your case.

Hope this helps.

Grtz. John
17711, modified 18 Years ago. Expert Posts: 280 Join Date: 6/27/06 Recent Posts
Hey John, thanks for that. I remember running into that problem a long time ago, but ya it is encoded:

url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
17711, modified 18 Years ago. Expert Posts: 280 Join Date: 6/27/06 Recent Posts
found it. In build.properties it lists the jdbc drivers. So, first off the name of my driver was wrong, yet still I had no luck.

Amazingly, in build.user.properties i overwrote the jdbc driverse list with:

jdbc.drivers=mysql.jar

and pachow, works like a charm.
34561, modified 18 Years ago. New Member Posts: 14 Join Date: 8/8/07 Recent Posts
James Hong:

Just for future reference the best way to check if the environment is setup is by running 'catalina.sh version' it will print out a number of environment variables including the app versions that you are using.


Thanks for that info btw! I am a total linux noob.