OutOfMemoryError using Netscape LDAP API

C

Christian Breu

Hello,

I'm getting java.lang.OutOfMemoryError and already tried the various
java -X compiler memory options, but they won't help.

I'm writing thousands of Entries in a LDAP Directory using the
Netscape LDAP API. This is essentially the code:

LDAPSearchResults res;
LDAP Connection iCon;
//Searching...
res = iCon.search("o=gd",
LDAPConnection.SCOPE_SUB,
filter,
null,
false,
iCons );

valueString = ...;

while (res.hasMoreElements()) {
LDAPModificationSet mods = new LDAPModificationSet();
LDAPAttribute attrName = new LDAPAttribute "gFullName",valueString
);
mods.add( LDAPModification.ADD, attrName );
iCon.modify(attrDN, mods );
}
mods = null;
attrName = null;

After 1000-2000 runs it crashes.

Can anybody please help !!!???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top