Page 1 of 1
Tomcat – java.lang.OutOfMemoryError
Posted: Wed Feb 25, 2015 1:09 am
by codylomax
Tomcat web server often suffers from java.lang.OutOfMemoryError: PermGen space whenever you deploy and undeploy your web application couple of time. No matter you are using tomcat6, tomcat7 or using bundled tomcat in Netbeans or Eclipse you will face this error now and then while developing web application on tomcat server. I thought there is 2 Solution for OutOfMemoryError in Java. Outofmemoryerror I am getting this error too frequently I don’t know why. Give me some solution.
falcon marketing
Re: Tomcat – java.lang.OutOfMemoryError
Posted: Sat Mar 14, 2015 9:50 am
by kkoyman
I have the same problem.
I have the following error printed in the eclispe
Code: Select all
INFO: Initializing Spring root WebApplicationContext
[ WARN] 16:38:42 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
[ WARN] 16:38:45 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyClassTransformer) is not being registered with the persistence unit.
[ WARN] 16:38:45 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.convert.EntityMarkerClassTransformer) is not being registered with the persistence unit.
[ WARN] 16:38:45 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyClassTransformer) is not being registered with the persistence unit.
[ WARN] 16:38:49 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [blSandBoxElements]; using defaults.
Mar 14, 2015 4:39:01 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'mycompany'
[ WARN] 16:39:01 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
Mar 14, 2015 4:39:03 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(F:\17_Recent\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\admin\WEB-INF\lib\jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Mar 14, 2015 4:39:10 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Mar 14, 2015 4:39:10 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'blAdmin.root' = [F:\17_Recent\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\admin\]
Mar 14, 2015 4:39:10 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [F:\17_Recent\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\admin\WEB-INF\log4j.xml]
Mar 14, 2015 4:39:10 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Mar 14, 2015 4:39:20 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.OutOfMemoryError: PermGen space
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:602)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:225)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:336)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.broadleafcommerce.common.web.extensibility.MergeContextLoaderListener.contextInitialized(MergeContextLoaderListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
... 8 more
Mar 14, 2015 4:39:20 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: java.lang.OutOfMemoryError: PermGen space
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
Exception in thread "PoolCleaner[838994469:1426343909457]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "PoolCleaner[736718356:1426343950113]" java.lang.OutOfMemoryError: PermGen space
help will be highly appreciated.
Re: Tomcat – java.lang.OutOfMemoryError
Posted: Tue Mar 24, 2015 12:57 am
by phillipuniverse
@kkoyman make sure you set the Permgen space as a VM argument: -XX:MaxPermSize=256M