My Oracle Support Banner

Exporting Portal Greater Than 2 GB Fails With the Error BadZipfile: Bad magic number for file header or Out of Memory Error (Doc ID 1966993.1)

Last updated on JUNE 11, 2024

Applies to:

Oracle WebCenter Portal - Version and later
Oracle WebCenter Portal for OCI - Version and later
Information in this document applies to any platform.


Exporting a Portal of a size around 3 GB via UI or the following command

exportWebCenterPortals(appName='webcenter', fileName='<FILENAME>.par', names='<PORTAL_NAME>', offlineDuringExport=1, exportPortalContent=1, exportConnections=1)

fails with:
BadZipfile: Bad magic number for file header


Getting out of memory error:

File "<FMW_HOME>/wc/common/wlst/", line 236, in exportWebCenterPortals
File "<FMW_HOME>/wc/common/script_handlers/", line 100, in exportWebCenterPortals
File "<FMW_HOME>/wlserver_10.3/common/wlst/modules/jython-modules.jar/Lib/", line 328, in read
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [C, larger than Java heap
      at java.lang.String.<init>(
      at org.python.core.PyString.from_bytes(Unknown Source)
      at org.python.core.PyFile$ Source)
      at org.python.core.PyFile.file_read(Unknown Source)
      at org.python.core.PyFile$1exposed_read.__call__(Unknown Source)


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.