Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bob Fleischman
Tomcat6 - Windows64 - Service
May 16, 2008 12:08 PM
Answer

Bob Fleischman

Rank: Junior Member

Posts: 30

Join Date: April 8, 2008

Recent Posts

Has anyone tried to run Liferay in Tomcat6 as a Windows Service? (We are on Windows Server 2003 R2 - 64bit. We have the tomcat6.exe, tomcat6w.exe and tcnative.dll for 64 bit installed)

We have run Tomcat as a service for years for many applications. When we tried it with Liferay it failed.

Liferay/Tomcat runs fine from the startup.bat file but will not run from Tomcat6W.exe startup. The logging is little/no help. Basically it falls into a stack overflow when trying to load the Liferay objects in the Spring framework. We set the service to run as the same user as when we run the startup.bat file.

We did finally get this to work by changing the service to run from the Java.exe rather than the jvm.dll, however this took a LOT of work (about 2.5 full days of trial and error.)

Does anyone have a clue about why there is such a problem running as a normal tomcat service?

Thanks

Bob
robain massey
RE: Tomcat6 - Windows64 - Service
November 5, 2008 12:52 PM
Answer

robain massey

Rank: New Member

Posts: 3

Join Date: October 21, 2008

Recent Posts

I am having exactly the same problem with tomcat5. can you tell me which java.exe you are talking about. set it up on the java tap when editing the service right ? how about the actual problem, could you please share if you have found any details on this.

thanks
robain massey
RE: Tomcat6 - Windows64 - Service
November 5, 2008 10:00 PM
Answer

robain massey

Rank: New Member

Posts: 3

Join Date: October 21, 2008

Recent Posts

am using

service.bat install liferay
tomcat5.exe //US//liferay --StartMode=Java --StopMode=Java
tomcat5.exe //US//liferay --StartParams=-Dcatalina.base=c:\softwares\liferay#-Dcatalina.home=c:\softwares\liferay#-Djava.endorsed.dirs=c:\softwares\liferay\common\endorsed#-Djava.io.tmpdir=c:\softwares\liferay\temp#-Djava.class.path=c:\softwares\liferay\bin\bootstrap.jar#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=c:\softwares\liferay\conf\logging.properties#-XX:MaxPermSize=200m#-Xms128m#-Xmx1024m#-Djava.security.auth.login.config=c:\softwares\liferay\conf\jaas.config#-Dfile.encoding=UTF8#-Djava.awt.headless=true#org.apache.catalina.startup.Bootstrap#start
tomcat5.exe //US//liferay --StopParams=-Dcatalina.base=c:\softwares\liferay#-Dcatalina.home=c:\softwares\liferay#-Djava.endorsed.dirs=c:\softwares\liferay\common\endorsed#-Djava.io.tmpdir=c:\softwares\liferay\temp#-Djava.class.path=c:\softwares\liferay\bin\bootstrap.jar#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=c:\softwares\liferay\conf\logging.properties#-XX:MaxPermSize=200m#-Xms128m#-Xmx1024m#-Djava.security.auth.login.config=c:\softwares\liferay\conf\jaas.config#-Dfile.encoding=UTF8#-Djava.awt.headless=true#org.apache.catalina.startup.Bootstrap#stop
tomcat5.exe //US//liferay --StartPath c:\softwares\liferay\bin --Startup auto

which seems to work for me
thought might help others.

thanks
Bob Fleischman
RE: Tomcat6 - Windows64 - Service
November 24, 2008 12:55 PM
Answer

Bob Fleischman

Rank: Junior Member

Posts: 30

Join Date: April 8, 2008

Recent Posts

I just noticed there is an entry in the Wiki about how to run Liferay as a service under Windows.

Perhaps that will help you.

Bob
Luca Costa
RE: Tomcat6 - Windows64 - Service
February 12, 2009 5:35 AM
Answer

Luca Costa

Rank: Junior Member

Posts: 72

Join Date: March 5, 2008

Recent Posts

We fall in the same problem on the latest version:
tomcat 6, liferay 5.2.1, windows 2003 R2 64 bit.
tomcat 6 service with stack overflow when trying to load the Liferay objects in the Spring framework.

Can you post your configuration for the tomcat6w for Java.exe?
Thanks,
Luca
Martin Goldhahn
RE: Tomcat6 - Windows64 - Service
March 13, 2009 7:25 AM
Answer

Martin Goldhahn

Rank: Junior Member

Posts: 34

Join Date: November 23, 2007

Recent Posts

This seems to be the only way. We also tried several different options and ended up with using start/stop mode Java and putting all arguments in the "Arguments" box, for both start and stop.
Martin Goldhahn
RE: Tomcat6 - Windows64 - Service
May 5, 2009 5:41 AM
Answer

Martin Goldhahn

Rank: Junior Member

Posts: 34

Join Date: November 23, 2007

Recent Posts

I recompiled prunmgr.exe (tomcat6w.exe) and prunsrv.exe (tomcat6.exe) with debugging information and static linking. And this works like normal, i.e. Mode set to jvm. This looks like the compiler optimizer screws up. We also had problems with crashs from time to time. These seem to have gone away as well. I'm going to run the system a couple of days longer and see how it goes.
Wojciech Syski
RE: Tomcat6 - Windows64 - Service
May 10, 2009 1:53 PM
Answer

Wojciech Syski

Rank: New Member

Posts: 4

Join Date: June 17, 2008

Recent Posts

Could you please mail me your tomcat6.exe binaries for Windows 64bit (wos@swipnet.se) or make them available in some other way? I run into the same problem. Thanks
There is another option: use Yet Another Java Service Wrapper (YAJSW) http://yajsw.sourceforge.net/#mozTocId458943
YAJSW is a java centric implementation of the java service wrapper by tanuki (JSW). Liferay starts without problems. The advantage is that it is free and works fine with both 32/64 bits Windows (tested on XP and Server2008 64 bit)
Martin Goldhahn
RE: Tomcat6 - Windows64 - Service
May 16, 2009 1:40 PM
Answer

Martin Goldhahn

Rank: Junior Member

Posts: 34

Join Date: November 23, 2007

Recent Posts

Sorry for the late answer. I uploaded the binaries and instructions for how to build them from source on my web site (http://www.goldhahn.info/pmwiki.php/Software/TomcatBinaries)

The binaries work with StartMode/StopMode jvm, i.e. you can use the jvm.dll in "Java|Java Virtual Machine", put all the Jvm parameters in "Java Options" and just have "start" as the Startup Argument.
Nicolas Grué
RE: Tomcat6 - Windows64 - Service
November 12, 2009 9:14 AM
Answer

Nicolas Grué

Rank: New Member

Posts: 9

Join Date: February 20, 2007

Recent Posts

Thanks so much Martin
It worked fine for us too (same Windows server version)
Matt Fulford
RE: Tomcat6 - Windows64 - Service
December 14, 2010 9:35 AM
Answer

Matt Fulford

Rank: New Member

Posts: 12

Join Date: April 6, 2009

Recent Posts

Tomcat 6 ships with v1.0.2 of Commons Daemon (in the form of tomcat6.exe and tomcat6w.exe). It seems this version is not compatible on certain combinations of 64-bit Windows and JDK6.

To resolve this, simply download v1.0.4 from http://commons.apache.org/daemon/download_daemon.cgi, replace tomcat6.exe and tomcat6w.exe with prunsrv.exe and prunmgr.exe respectively, rename to tomcat6.exe and tomcat6w.exe and run service.bat.
Don Morrison
RE: Tomcat6 - Windows64 - Service
March 3, 2011 11:31 PM
Answer

Don Morrison

Rank: New Member

Posts: 2

Join Date: March 3, 2011

Recent Posts

Just wanted to add my two cents to Matt's suggestion for those finding this later. I can confirm that he's right on the money. This is the solution to the stack overflow errors with Tomcat 6 on Windows 64 machines:

An upgrade to Tomcat 6 >= 6.0.30 will include a newer version of procrun. They upgraded to 1.0.5 in .30.

I have a full account of my efforts to find the solution and this thread was the only thing that helped.

Thanks Matt!