4 Replies Latest reply: Jan 13, 2012 4:29 PM by 552748 RSS

    Jdev 11g: Build 5188: WLS On Mac OSX - java.lang.OutOfMemoryError

    kenton.ho
      Hi All,

      To anyone that is trying to run JDev 11g (5188) on Mac OSX 10.5.5 and you find that you can't start your Embedded WLS because you get:
      <Dec 11, 2008 8:39:41 AM EST> <Error> <HTTP> <BEA-101216> <Servlet: "AsyncResponseServiceServlethttps" failed to preload on startup in Web application: "bea_wls9_async_response.war".
      java.lang.OutOfMemoryError: PermGen space
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
           at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
           Truncated. see log file for complete stacktrace
      You will probably need to do the following:

      1) Edit: ~/.jdeveloper/system11.1.1.0.31.51.88/DefaultDomain/bin/setDomainEnv.sh

      And look for:
      MEM_MAX_PERM_SIZE="-XX:MaxPermSize=128m"
      And replace with:
      #MEM_MAX_PERM_SIZE="-XX:MaxPermSize=128m"
      MEM_MAX_PERM_SIZE="-XX:MaxPermSize=256m"
      export MEM_MAX_PERM_SIZE

      USER_MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
      export USER_MEM_ARGS
      After you add that, you should be able to startup your Embedded WLS.

      Having said this, if you do continue running into java.lang.OutOfMemoryError: PermGen space, you might also need to increase the parameters in MEM_ARGS. If you do change these, also make sure that -Xms and -XX:MaxPermSize have the same size.

      I hope this helps!



      Kenton
        • 2. Re: Jdev 11g: Build 5188: WLS On Mac OSX - java.lang.OutOfMemoryError
          Lorenz
          Dear,
          using JDeveloper 11.1.1.3.0 (Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660) on Mac OS 10.6.5.
          - I changed setDomainEnv.sh as discribed below to 512m
          - still getting PermGen Space Error:
          ------------------------
          *** Using port 7101 ***
          /Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/bin/startWebLogic.sh
          [waiting for the server to complete its initialization...]
          .
          .
          JAVA Memory arguments: -Xms256m -Xmx512m
          .
          WLS Start Mode=Development
          .
          java version "1.6.0_22"
          Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
          Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
          CLASSPATH=/Users/oracle/Oracle/Middleware/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6dms.jar:/Users/oracle/Oracle/Middleware/patch_wls1033/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/Users/oracle/Oracle/Middleware/patch_jdev1111/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar:/Users/oracle/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/Users/oracle/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/Users/oracle/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.3.0.jar:/Users/oracle/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/Users/oracle/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/Users/oracle/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/Users/oracle/Oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar:/Users/oracle/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/Users/oracle/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar
          .
          PATH=/Users/oracle/Oracle/Middleware/wlserver_10.3/server/bin:/Users/oracle/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/bin:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin
          .
          ***************************************************
          * To start WebLogic Server, use a username and *
          * password assigned to an admin-level user. For *
          * server administration, use the WebLogic Server *
          * console at http://hostname:port/console *
          ***************************************************
          starting weblogic with Java version:
          Starting WLS with line:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xms256m -Xmx512m -Dweblogic.Name=DefaultServer -Djava.security.policy=/Users/oracle/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Djavax.net.ssl.trustStore=/Volumes/oracle/jdev/jdev11113/wlserver_10.3/server/lib/DemoTrust.jks -Dweblogic.nodemanager.ServiceEnabled=true -da -Dplatform.home=/Users/oracle/Oracle/Middleware/wlserver_10.3 -Dwls.home=/Users/oracle/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/Users/oracle/Oracle/Middleware/wlserver_10.3/server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain -Dcommon.components.home=/Users/oracle/Oracle/Middleware/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=/Users/oracle/Oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.domain.config.dir=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/config/fmwconfig -Doracle.server.config.dir=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/config/fmwconfig/servers/DefaultServer -Doracle.security.jps.config=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/config/fmwconfig/jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/config/fmwconfig/carml -Digf.arisidstack.home=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/config/fmwconfig/arisidprovider -Dweblogic.alternateTypesDirectory=/Users/oracle/Oracle/Middleware/oracle_common/modules/oracle.ossoiap_11.1.1,/Users/oracle/Oracle/Middleware/oracle_common/modules/oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=/Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/oracle/store/gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/Users/oracle/Oracle/Middleware/patch_wls1033/profiles/default/sysext_manifest_classpath:/Users/oracle/Oracle/Middleware/patch_jdev1111/profiles/default/sysext_manifest_classpath weblogic.Server
          <08.12.2010 15:56 Uhr MEZ> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 17.1-b03-307 from Apple Inc.>
          <08.12.2010 15:56 Uhr MEZ> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 >
          <08.12.2010 15:56 Uhr MEZ> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
          <08.12.2010 15:56 Uhr MEZ> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
          <08.12.2010 15:56 Uhr MEZ> <Notice> <LoggingService> <BEA-320400> <The log file /Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
          <08.12.2010 15:56 Uhr MEZ> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log00019. Log messages will continue to be logged in /Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log.>
          <08.12.2010 15:56 Uhr MEZ> <Notice> <Log Management> <BEA-170019> <The server log file /Users/oracle/.jdeveloper/system11.1.1.3.37.56.60/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log is opened. All server side log events will be written to this file.>
          <08.12.2010 15:56 Uhr MEZ> <Warning> <NodeManager> <BEA-300043> <Node manager native library not found - server process id not saved.>
          <08.12.2010 15:56 Uhr MEZ> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that libmuxer library is in :'/Users/oracle/Oracle/Middleware/patch_wls1033/profiles/default/native:/Users/oracle/Oracle/Middleware/patch_jdev1111/profiles/default/native:/Users/oracle/Oracle/Middleware/wlserver_10.3/server/native/macosx:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java'
          >
          <08.12.2010 15:56 Uhr MEZ> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
          <08.12.2010 15:56 Uhr MEZ> <Warning> <Store> <BEA-280101> <The persistent file store "_WLS_DefaultServer" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>
          <08.12.2010 15:56 Uhr MEZ> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:

          There are 1 nested errors:

          java.lang.OutOfMemoryError: PermGen space
               at java.lang.ClassLoader.findBootstrapClass(Native Method)
               at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:927)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:298)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
               at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
               at weblogic.management.provider.internal.ConfigImageSourceService.start(ConfigImageSourceService.java:41)
               at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

          >
          Exception in thread "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError: PermGen space
               at java.lang.ClassLoader.defineClass1(Native Method)
               at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
               at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
               at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
               at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
               at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
               at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
               at java.security.AccessController.doPrivileged(Native Method)
               at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
               at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
          ***************************************************************************
          The WebLogic Server encountered a critical failure
          Reason: PermGen space
          ***************************************************************************
          Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
          Process exited.
          -------------------
          Any idea?

          Kind regards
          Lorenz
          • 3. Re: Jdev 11g: Build 5188: WLS On Mac OSX - java.lang.OutOfMemoryError
            Lorenz
            Dear,
            found the error.
            If JAVA_VENDOR is not set, (which seems to happen ba default on MacOS) JAVA_VENDOR is unknown and MEM_ARGS are not used.
            To solve set JAVA_VENDOR in the beginning of file "setDomainEnv.sh":

            export JAVA_VENDOR="Sun"

            Kind regards
            Lorenz

            Edited by: Lorenz on Feb 2, 2013 6:26 AM
            • 4. Re: Jdev 11g: Build 5188: WLS On Mac OSX - java.lang.OutOfMemoryError
              552748
              lokeller 님이 작성:

              export SAVA_VENDOR="Sun"
              Typo in the above post, should be: export JAVA_VENDOR="Sun"