Expand my Community achievements bar.

ES4 Memory Leak?


Level 1

We recently upgraded to ES4 in our application where we do Tiff2PDF conversions through the API

The Java heap on the Application Server (WAS) grows over time, where we now proactively recycle.  We did not make any implemenation changes to the API for the ES4 upgade, are there any known changes needed that may be causing this leak?

Below is the API example and a visual of the heap growth.



//Convert Tiff To Pdf
fileInputStream = new FileInputStream( imageFolderLocation + tiffFileName );
inputDocument = new Document( fileInputStream );
CreatePDFResult result = generatePdfServiceClient.createPDF( inputDocument, tiffFileName, "Standard", "Standard OCR", null, null, null );
resultDocument = new Document( result.getCreatedDocument().getInputStream() );
resultDocument.copyToFile( new File( outputFileName ) );

//merge converted pdfs into single document
mergeDdx =
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="MergedPDFResult">
<PDF source="DocList"/>

        List<Document> pdfInputs = new ArrayList<Document>();
        for( String pdfInputFileName : pdfInputFileNames )
            Document document = new Document( new File( pdfInputFileName ), true );
            pdfInputs.add( document );

        Map<String, Object> assemblerInputs = new HashMap<String, Object>();
        assemblerInputs.put( "DocList", pdfInputs );

        AssemblerOptionSpec assemblerSpec = new AssemblerOptionSpec();
        assemblerSpec.setFailOnError( true );

            AssemblerResult jobResult = assemblerServiceClient.invokeDDX(mergeDdx, assemblerInputs, assemblerSpec );
            mergedDocument = this.extractDocumentFromResult( jobResult );

            mergedDocument.copyToFile( new File( mergedDocumentFileName ) );

            for( Document document : pdfInputs )
        catch( OperationException oe )
                    .error( "Could not assemble PDF document." );
            String message = this.getExceptionContents( oe );
            FormsException fe = new FormsException( message );
            throw new FormsException( "Could not assemble PDF document.", fe );

1 Reply