Share the content if you found it is useful (You can share using 300 community websites) click "share" at the end of the post.

You are encouraged to leave a comment.








Wednesday, March 06, 2013

java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 16400.

Oracle Identity Management (OIM) configured with LDAP for fusion applications 11.1.4, throws error after 2 days of operations.

The error was as follows:

#### <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <670d968dbdc0c587:5f100921:13d343300e1:-8000-0000000000003fbf> <1362449848678>  java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 16400.
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 16400
        at weblogic.utils.io.UnsyncByteArrayOutputStream.resizeBuffer(UnsyncByteArrayOutputStream.java:59)
        at weblogic.utils.io.UnsyncByteArrayOutputStream.write(UnsyncByteArrayOutputStream.java:72)
        at java.io.DataOutputStream.writeShort(DataOutputStream.java:150)
        at weblogic.utils.classfile.ClassMember.write(ClassMember.java:98)
        at weblogic.utils.classfile.FieldTable.write(FieldTable.java:56)
        at weblogic.utils.classfile.ClassFile.write(ClassFile.java:403)
        at weblogic.utils.classfile.utils.CodeGenerator.getClassBytes(CodeGenerator.java:87)
        at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:70)
        at weblogic.rmi.internal.StubGenerator.hotCodeGenClass(StubGenerator.java:782)
        at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:766)
        at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:793)
        at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
        at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
        at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveStubInfo(RemoteObjectReplacer.java:193)
        at weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteObject(ServerHelper.java:404)
        at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:381)
        at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:255)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:412)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at weblogic.jndi.internal.JNDIImageSource.printContextInfo(JNDIImageSource.java:80)
        at weblogic.jndi.internal.JNDIImageSource.createDiagnosticImage(JNDIImageSource.java:57)
        at weblogic.diagnostics.image.ImageSourceWork.run(ImageSourceWork.java:111)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)



The error was due to setDomainEnv.sh which is called by startWeblogic.sh during Managed server start.


So search the setDomainEnv.sh which is used by which files.

[oracle@fusionapp bin]$ grep -r "setDomainEnv.sh" .
./secureWebLogic.sh:. ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
./nodemanager/wlscontrol.sh:        # setDomainEnv.sh script exists, so call it to set up the default
./nodemanager/wlscontrol.sh:        # No setDomainEnv.sh script available, so set up default environment
./nodemanager/wlscontrol.sh:SetDomainEnvScript=$DomainDir/bin/setDomainEnv.sh
./stopWebLogic.sh:. ${DOMAIN_HOME}/bin/setDomainEnv.sh ${exitFlag}
./startWebLogic.sh:. ${DOMAIN_HOME}/bin/setDomainEnv.sh $*



Fix:

Edit the lines in setDomainEnv.sh from DOMAIN_HOME/bin (IDMDomain/aserver/IDMDomain/bin)

XMS_SUN_64BIT="1280"
export XMS_SUN_64BIT
XMS_SUN_32BIT="1280"
export XMS_SUN_32BIT
XMX_SUN_64BIT="1280"
export XMX_SUN_64BIT
XMX_SUN_32BIT="1280"
export XMX_SUN_32BIT
XMS_JROCKIT_64BIT="1280"
export XMS_JROCKIT_64BIT
XMS_JROCKIT_32BIT="1280"
export XMS_JROCKIT_32BIT
XMX_JROCKIT_64BIT="1280"
export XMX_JROCKIT_64BIT
XMX_JROCKIT_32BIT="1280"
export XMX_JROCKIT_32BIT

if [ "${JAVA_VENDOR}" = "Sun" ] ; then
        WLS_MEM_ARGS_64BIT="-Xms1280m -Xmx1280m"
        export WLS_MEM_ARGS_64BIT
        WLS_MEM_ARGS_32BIT="-Xms1280m -Xmx1280m"
        export WLS_MEM_ARGS_32BIT
else
        WLS_MEM_ARGS_64BIT="-Xms1280m -Xmx1280m"
        export WLS_MEM_ARGS_64BIT
        WLS_MEM_ARGS_32BIT="-Xms1280m -Xmx1280m"
        export WLS_MEM_ARGS_32BIT
fi

if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
        CUSTOM_MEM_ARGS_64BIT="-Xms${XMS_JROCKIT_64BIT}m -Xmx${XMX_JROCKIT_64BIT}m"
        export CUSTOM_MEM_ARGS_64BIT
        CUSTOM_MEM_ARGS_32BIT="-Xms${XMS_JROCKIT_32BIT}m -Xmx${XMX_JROCKIT_32BIT}m"
        export CUSTOM_MEM_ARGS_32BIT
else
        CUSTOM_MEM_ARGS_64BIT="-Xms${XMS_SUN_64BIT}m -Xmx${XMX_SUN_64BIT}m"
        export CUSTOM_MEM_ARGS_64BIT
        CUSTOM_MEM_ARGS_32BIT="-Xms${XMS_SUN_32BIT}m -Xmx${XMX_SUN_32BIT}m"
        export CUSTOM_MEM_ARGS_32BIT
fi

MEM_PERM_SIZE_64BIT="-XX:PermSize=1280m"
export MEM_PERM_SIZE_64BIT

MEM_PERM_SIZE_32BIT="-XX:PermSize=1280m"
export MEM_PERM_SIZE_32BIT

if [ "${JAVA_USE_64BIT}" = "true" ] ; then
        MEM_PERM_SIZE="${MEM_PERM_SIZE_64BIT}"
        export MEM_PERM_SIZE
else
        MEM_PERM_SIZE="${MEM_PERM_SIZE_32BIT}"
        export MEM_PERM_SIZE
fi

MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=1280m"
export MEM_MAX_PERM_SIZE_64BIT

MEM_MAX_PERM_SIZE_32BIT="-XX:MaxPermSize=1280m"
export MEM_MAX_PERM_SIZE_32BIT

if [ "${JAVA_USE_64BIT}" = "true" ] ; then
        MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_64BIT}"
        export MEM_MAX_PERM_SIZE
else
 MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_32BIT}"
        export MEM_MAX_PERM_SIZE
fi

if [ "${JAVA_VENDOR}" = "Sun" ] ; then
        if [ "${PRODUCTION_MODE}" = "" ] ; then
                MEM_DEV_ARGS="-XX:CompileThreshold=8000 ${MEM_PERM_SIZE} "
                export MEM_DEV_ARGS
        fi
fi

Save and exit.


Bounce the Managed server. Look for the memory usage in weblogic control or through OS commands.

Cheers!!!



No comments:

Related Posts Plugin for WordPress, Blogger...

Let us be Friends...

Share |

Popular Posts

Recent Comments