AnsweredAssumed Answered

Java Heap Error

Question asked by gohenderson on May 22, 2009
Latest reply on May 22, 2009 by gohenderson
I've done a *ton* of trouble shooting trying to get Alfresco going.

I've gotten far, but right now my problem is this: I get a Java Heap Error in both the catalina.out and alfresco.log files and TOP reports java as using 99.9% of the CPU. I've set Xms=768m and Xmx=1024m for export in JAVA_OPTS and CATALINA_OPTS in the alfresco start script. I've also noticed that JAVA seems to use no more than about 450m (as reported by TOP, under VIRT). So, I'm guessing that JAVA_OPTS and CATALINA_OPTS are being set somewhere else (after the alfresco run script).

ALFRESCO.LOG
Thu May 21 20:30:42 EDT 2009 Starting Alfresco …
20:31:59,730 INFO  [org.alfresco.config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
20:33:28,270 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.jaxws.EndpointImpl–1934862993': Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.regex.Pattern.compile(Pattern.java:1452)
        at java.util.regex.Pattern.<init>(Pattern.java:1133)
        at java.util.regex.Pattern.compile(Pattern.java:823)
        at java.lang.String.split(String.java:2293)
        at java.lang.String.split(String.java:2335)
        at org.apache.ws.commons.schema.constants.Enum.setValue(Enum.java:44)
        at org.apache.ws.commons.schema.constants.Enum.<init>(Enum.java:27)
        at org.apache.ws.commons.schema.XmlSchemaForm.<init>(XmlSchemaForm.java:44)
        at org.apache.ws.commons.schema.XmlSchemaElement.<init>(XmlSchemaElement.java:96)
        at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1336)
        at org.apache.ws.commons.schema.SchemaBuilder.handleSequence(SchemaBuilder.java:926)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexContentExtension(SchemaBuilder.java:866)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexContent(SchemaBuilder.java:721)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:636)
        at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:167)
        at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:83)
        at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:424)
        at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:418)
        at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:142)
        at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:93)
        at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:336)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:354)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:514)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:405)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:188)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:116)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:168)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:336)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:251)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:201)

CATALINA.OUT
May 21, 2009 8:30:55 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 21, 2009 8:30:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5898 ms
May 21, 2009 8:30:56 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 21, 2009 8:30:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
May 21, 2009 8:30:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
20:31:09,867  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
May 21, 2009 8:31:09 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
May 21, 2009 8:31:13 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.
20:31:59,730  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
20:33:28,270  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.jaxws.EndpointImpl–1934862993': Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.regex.Pattern.compile(Pattern.java:1452)
        at java.util.regex.Pattern.<init>(Pattern.java:1133)
        at java.util.regex.Pattern.compile(Pattern.java:823)
        at java.lang.String.split(String.java:2293)
        at java.lang.String.split(String.java:2335)
        at org.apache.ws.commons.schema.constants.Enum.setValue(Enum.java:44)
        at org.apache.ws.commons.schema.constants.Enum.<init>(Enum.java:27)
        at org.apache.ws.commons.schema.XmlSchemaForm.<init>(XmlSchemaForm.java:44)
        at org.apache.ws.commons.schema.XmlSchemaElement.<init>(XmlSchemaElement.java:96)
        at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1336)
        at org.apache.ws.commons.schema.SchemaBuilder.handleSequence(SchemaBuilder.java:926)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexContentExtension(SchemaBuilder.java:866)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexContent(SchemaBuilder.java:721)
        at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:636)
        at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:167)
        at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:83)
        at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:424)
        at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:418)
        at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:142)
        at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:93)
        at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:336)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:354)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:514)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:405)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:188)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:116)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:168)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:336)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:251)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:201)
May 21, 2009 8:33:28 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 21, 2009 8:33:28 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

Any ideas why I'm having this problem?

Outcomes