cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Tomcat 6 as Windows Service for Labs 3.0 Stable

mrose24
Champ in-the-making
Champ in-the-making
I currently have Alfresco Labs 3.0 Stable installed on a Windows 2003 Virtual Server.  I am running Java 6 Update 12.  I have created a Windows Service using the service.bat for tomcat6 and have gotten it to start, but after a couple minutes of running it stops due to a Java Exception.  Below are the logs from tomcat6:

stdout_2000303.log:
15:24:13,894  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
15:24:29,566  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
15:24:35,237  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
15:24:41,268 UserSmiley Frustratedystem INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\alf_data
15:24:41,315 UserSmiley Frustratedystem INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
15:24:41,768 UserSmiley Frustratedystem INFO  [admin.patch.PatchExecuter] No patches were required.
15:24:42,362 UserSmiley Frustratedystem INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
15:24:47,987 UserSmiley Frustratedystem INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_12-b04; maximum heap size 506.313MB
15:24:47,987 UserSmiley Frustratedystem INFO  [service.descriptor.DescriptorService] Alfresco started (Labs): Current version 3.0.0 (Stable 1526) schema 1002 - Installed version 3.0.0 (Stable 1526) schema 1002
15:25:27,938  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
java.lang.reflect.InvocationTargetException

catalina.2009-0303.log:
Mar 3, 2009 3:23:35 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 3, 2009 3:23:35 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2371 ms
Mar 3, 2009 3:23:35 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 3, 2009 3:23:35 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Mar 3, 2009 3:23:35 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Mar 3, 2009 3:23:42 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
Mar 3, 2009 3:25:16 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
Mar 3, 2009 3:25:27 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive studio.war

localhost.2009-0303.log:
Mar 3, 2009 3:23:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [C:\Alfresco\tomcat\webapps\alfresco\]
Mar 3, 2009 3:23:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Mar 3, 2009 3:25:19 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Mar 3, 2009 3:25:35 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.OutOfMemoryError: PermGen space
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
   at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at org.apache.myfaces.shared_impl.util.ClassUtils.classForName(ClassUtils.java:134)
   at org.apache.myfaces.shared_impl.util.ClassUtils.simpleClassForName(ClassUtils.java:160)
   at org.apache.myfaces.application.ApplicationImpl.addComponent(ApplicationImpl.java:272)
   at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:608)
   at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:148)
   at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
   at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
Mar 3, 2009 3:25:35 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext

jakarta_service_20090303.log:
[2009-03-03 15:23:30] [info] Starting service…
[2009-03-03 15:23:33] [info] Service started in 2328 ms.
[2009-03-03 15:25:46] [info] Run service finished.
[2009-03-03 15:25:46] [info] Procrun finished.

There are not any errors in the Event Viewer when the service stops running.  Please help as I would really like to get Alfresco running as a service so I do not have to stay logged in to the server at all times to keep the Alfresco Server running.

-Matt
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
A quick search for
java.lang.OutOfMemoryError: PermGen space
should help.

Mike

mrose24
Champ in-the-making
Champ in-the-making
A quick search for
java.lang.OutOfMemoryError: PermGen space
should help.

Mike

I have tried making changes to the JVM using the Alfresco Wiki but am still getting the OutOfMemoryError.  The following are the settings I am using for JAVA_OPTS:

JAVA_OPTS=-server -Xss1024k -Xms1G -Xmx2G -XX:MaxPermSize=128m -XX:NewSize=512m

I have tried rebooting the server multiple times and rerunning the service but am getting the same errors every time.

mikeh
Star Contributor
Star Contributor
You may need to go higher than 128m then - try 192?

http://wiki.alfresco.com/wiki/JVM_Tuning

Thanks,
Mike