4 Replies Latest reply on Apr 13, 2012 4:06 AM by Dominik Grupp

    OutOfMemoryError error after setting a different file.encoding

    Dominik Grupp Newbie

      Hello,

       

      when trying to solve a problem regarding the encoding of letters (e.g. german "Umlaut" ä,ö,ü) to be saved accordingly in a mysql database I needed to change the encoding of Jboss and added

       

      export JAVA_OPTS=-Dfile.encoding=UTF-8

       

      to my profile. File boot.log displayed the result accordingly after startup of JBoss.

       

      Without that setting those special letters have not been saved in the database correctly. Now, with the setting the letters are saved correctly. However, after e.g. two deployments of my application hangs and a "java.lang.OutOfMemoryError: PermGen space" exception is printed to the log

         

      20:21:05,551 SCHWERWIEGEND [javax.enterprise.resource.webcontainer.jsf.config][contextInitialized] Critical error during deployment: : com.sun.faces.config.ConfigurationException:

        Source Document: vfs:/content/admshow.war/WEB-INF/lib/tomahawk20-1.1.11.jar/META-INF/faces-config.xml

        Cause: Class 'org.apache.myfaces.custom.tree2.HtmlTreeRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/myfaces/custom/tree2/HtmlTree

                at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:279) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:313) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:179) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:270) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.ValidatorConfigProcessor.process(ValidatorConfigProcessor.java:120) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.ConverterConfigProcessor.process(ConverterConfigProcessor.java:126) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:117) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.10.Final.jar:]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.10.Final.jar:]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]

                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]

      Caused by: java.lang.NoClassDefFoundError: org/apache/myfaces/custom/tree2/HtmlTree

                at java.lang.Class.getDeclaredConstructors0(Native Method) [classes.jar:1.6.0_29]

                at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [classes.jar:1.6.0_29]

                at java.lang.Class.getConstructor0(Class.java:2699) [classes.jar:1.6.0_29]

                at java.lang.Class.newInstance0(Class.java:326) [classes.jar:1.6.0_29]

                at java.lang.Class.newInstance(Class.java:308) [classes.jar:1.6.0_29]

                at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:268) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]

                ... 26 more

      Caused by: java.lang.ClassNotFoundException: org.apache.myfaces.custom.tree2.HtmlTree from [Module "deployment.admshow.war:main" from Service Module Loader]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                ... 32 more

       

      20:21:07,049 ERROR [org.apache.catalina.core.StandardContext][start] Context [/admshow] startup failed due to previous errors: java.lang.OutOfMemoryError: PermGen space

       

      20:21:07,051 ERROR [org.apache.catalina.core.StandardContext][start] Context [/admshow] startup failed due to previous errors

      20:21:08,119 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/admshow]][listenerStop] Exception sending context destroyed event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.OutOfMemoryError: PermGen space

       

      20:21:08,122 ERROR [org.jboss.msc.service.fail][startFailed] MSC00001: Failed to start service jboss.web.deployment.default-host./admshow: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./admshow: JBAS018040: Failed to start context

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]

                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]

       

      When trying to stop the server I get

       

      ^CJava HotSpot(TM) Client VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal Unknown Signal to handler- the VM may need to be forcibly terminated

       

      For test reasons I 2-3 times removed and added the setting to try out whether it really does cause the problem and it seems it does.

       

      What could be the reason? Would there be an alternative to configure a different encoding being used by JBoss?

       

      Regards,

       

      Michael