0 Replies Latest reply on Jan 13, 2010 12:49 AM by divya s

    JNDI Problem:Connection closed with LDAP After some period of time

    divya s Newbie

      Hi,

       

      I am facing the problem with JNDI.I have made the connection with LDAP Server using JNDI.It's working fine.But after some period of time ,the connection get lost .

       

      AND THIS IS THE ERROR LOG:

       

       

      javax.naming.CommunicationException: connection closed [Root exception is java.io.IOException: connection closed]; remaining name 'uid=SuperAdmin,ou=admin,ou=SouthZone,dc=bsnl,dc=co,dc=in'
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1961)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1806)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Method.java:585)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.jboss.naming.ExternalContext$CachedContext.invoke(ExternalContext.java:558)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at $Proxy261.search(Unknown Source)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.jsp.BSNLApp.jsp.AppList_jsp._jspService(AppList_jsp.java:205)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2010-01-13 10:28:03,953 ERROR [STDERR]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at java.lang.Thread.run(Thread.java:595)
      2010-01-13 10:28:03,968 ERROR [STDERR] Caused by: java.io.IOException: connection closed
      2010-01-13 10:28:03,968 ERROR [STDERR]  at com.sun.jndi.ldap.LdapClient.ensureOpen(LdapClient.java:1558)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:504)
      2010-01-13 10:28:03,968 ERROR [STDERR]  at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1944)

       

      I have attached jboss-service.xml file in wich i have added a section for LDAP Bind.

       

      I have to resolve this issue as earliest.

       

      Plz Help me.

       

      Thanks & Regards,

       

      Divya.