Symantec Scan Engine 5.2.x Java API fails when scanning large files.

Article:TECH153635  |  Created: 2011-02-17  |  Updated: 2012-05-07  |  Article URL http://www.symantec.com/docs/TECH153635
Article Type
Technical Solution


Issue



The Symantec Scan Engine 5.2.x Java API fails when scanning large files, over 700MB.  Specifically the Java API fails with a Out of memory exception. 


Error



Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at com.symantec.scanengine.api.RequestImpl.readResult1(Unknown Source)
        at com.symantec.scanengine.api.RequestImpl.finish(Unknown Source)
        at com.symantec.scanengine.api.StreamScanRequestImpl.scanFile(Unknown
Source)
        at BenCustom.main(BenCustom.java:234)
Java Result: 1


Cause



This issue appears to be caused when the Symantec Scan Engine Java SDK attempts to allocate enough buffer space for the entire size of the file.  This is causing the out of memory error in the SSE Java SDK.


Solution



The issue is caused by incorrect memory allocation within the Java SDK code.  A Defect was submitted to the Engineering team for this, and the issue has been addressed in the SDK provided with the 5.2.11 build of Symantec Scan Engine. 




Article URL http://www.symantec.com/docs/TECH153635


Terms of use for this information are found in Legal Notices