Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CommunicationException

1 view
Skip to first unread message

Håkan Eriksson

unread,
Nov 23, 2000, 3:00:00 AM11/23/00
to

I wrote a small jndi klient accessing iDS 4.11.

It does the following in a loop:

a) create initial context.
b) lookup (using object factory)
c) close on initial context


when I run this sequence of actions it works really well,
but if I try to do it 500 times in a loop it will always throw
the following exception for the last few times in the loop:

javax.naming.CommunicationException: netscape.ldap.LDAPException: failed
to connect to server test.mv.sw.com:17193 (91); Cannot connect to the
LDAP server
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.naming.NamingException.<init>(NamingException.java:104)

at javax.naming.CommunicationException.<init>(Compiled Code)
at
com.netscape.jndi.ldap.common.ExceptionMapper.getNamingException(Compiled
Code)
at com.netscape.jndi.ldap.LdapService.connect(Compiled Code)
at com.netscape.jndi.ldap.LdapContextImpl.<init>(Compiled Code)
at
com.netscape.jndi.ldap.LdapContextFactory.getInitialContext(Compiled
Code)
at javax.naming.spi.NamingManager.getInitialContext(Compiled
Code)
at javax.naming.InitialContext.getDefaultInitCtx(Compiled Code)
at javax.naming.InitialContext.init(Compiled Code)
at javax.naming.InitialContext.<init>(Compiled Code)
at javax.naming.directory.InitialDirContext.<init>(Compiled
Code)

This always happends after approx. 490 rounds in the loop !

Could this be a configuration problem ?
Is there some kind of resource that I do not return ?
(close() on initial context is invoked).

Any help would be appreciated,
(I find this really scary)

Håkan

Mark Wilcox

unread,
Nov 26, 2000, 3:00:00 AM11/26/00
to qsv...@ese.ericsson.se
Without seeing the code, it possibly could be a socket bug in your JVM.

the correct steps should be.

1) create the context (which connects to the server)

2) if you need to perform operations in a loop, do them here.

3) close the context.

you might want to ask on the JNDI list as well, in particular with any code
samples.

Mark

0 new messages