cancel
Showing results for 
Search instead for 
Did you mean: 

jco memory leak

Former Member
0 Kudos

Hello all,

I am currently using JCO 2.1.6 oN HP UX 11i to connect to a SAP WAS 6.40.

I see that my application is leaking in memory. After quite some troubleshooting, I managed to build a testbed showing that it seems that it is leaking in the memory DATA region. This is usually happenning when there is a leak in a JNI layer.

Did anyone experience a similar issue? Is there a more recent SL librray than the one provided with 2.1.6.

Also when the program is starting I am seeing the following issue.

/usr/lib/dld.sl: Can't find path for shared library: dsrlib.sl

/usr/lib/dld.sl: No such file or directory

The mapping from JCO object to java object is done using a program based on the principle of "sap2java".

An extract of my testbed is

public DataWrapper execute(String packageName, String functionName, Object inputParams)

throws JCO.Exception, IllegalArgumentException, MappingException {

IFunctionTemplate functionTemplate = null;

JCO.Function function = null;

JCO.ParameterList input = null;

String fName = functionName.trim().toUpperCase();

JCO.Client connection = null;

try {

connection = JCO.getClient("mypool", true);

functionTemplate = getFunctionTemplate(fName, connection);

JCO.Repository repository = new JCO.Repository("SID","mypool");

functionTemplate = repository.getFunctionTemplate(functionName);

// don't cache the function!!! (see documentation)

function = functionTemplate.getFunction();

if (inputParams != null) {

input = function.getImportParameterList();

setInput(input, inputParams);

}

/*

  • if ( tableParams != null && tableParams.length > 0 ){

  • JCO.ParameterList tables = function.getTableParameterList();

  • setTables(tables, tableParams); }

*/

// make the call to ABAP. All input parameter are already set

// in the function.

connection.execute(function);

return handleResponse(function, packageName);

}

finally {

if (connection!=null) {

JCO.releaseClient(connection);

}

functionTemplate = null;

function = null;

input = null;

connection = null;

}

}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It looks like I am the only one that is having similar issues.

After some investigation, this issue is being maxcimized by the load (120k transaction per ghour).

The leak is visible in the C heap.

Antoine