javax.naming.CommunicationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • JNDI/LDAP - authentication hit and miss
    via by 807596,
  • When attempting to access the application in Crowd that contains the problem directory, the following error is thrown: {noformat} javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:172) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at com.atlassian.crowd.console.filter.CrowdDelegatingFilterProxy.doFilter(CrowdDelegatingFilterProxy.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at com.atlassian.crowd.console.filter.CrowdOpenSessionInViewFilter.doFilterInternal(CrowdOpenSessionInViewFilter.java:26) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:81) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) {noformat} However, the actualy exception in Crowd is: {noformat} 2008-04-09 17:36:00,073 http-8095-Processor7 ERROR [codehaus.xfire.handler.DefaultFaultHandler] Fault occurred! org.springframework.dao.DataRetrievalFailureException: Unable to communicate with LDAP server; nested exception is javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] Caused by: javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] at com.sun.jndi.ldap.Connection.<init>(Connection.java:204) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118) at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:44) at com.sun.jndi.ldap.pool.Connections.<init>(Connections.java:97) at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:114) at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:310) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1572) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) {noformat} Wrapping a try/catch around {{ldapTemplate.search(baseDN, filter.encode(), searchControls, handler, requestControl);}} in SpringLDAPConnector.java's pageSearchResults method seems to fix the issue. May not be the best approach for a patch though. :)
    via by Donna McGahan [Atlassian],
  • When attempting to access the application in Crowd that contains the problem directory, the following error is thrown: {noformat} javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:172) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at com.atlassian.crowd.console.filter.CrowdDelegatingFilterProxy.doFilter(CrowdDelegatingFilterProxy.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at com.atlassian.crowd.console.filter.CrowdOpenSessionInViewFilter.doFilterInternal(CrowdOpenSessionInViewFilter.java:26) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:81) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) {noformat} However, the actualy exception in Crowd is: {noformat} 2008-04-09 17:36:00,073 http-8095-Processor7 ERROR [codehaus.xfire.handler.DefaultFaultHandler] Fault occurred! org.springframework.dao.DataRetrievalFailureException: Unable to communicate with LDAP server; nested exception is javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] Caused by: javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] at com.sun.jndi.ldap.Connection.<init>(Connection.java:204) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118) at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:44) at com.sun.jndi.ldap.pool.Connections.<init>(Connections.java:97) at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:114) at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:310) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1572) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) {noformat} Wrapping a try/catch around {{ldapTemplate.search(baseDN, filter.encode(), searchControls, handler, requestControl);}} in SpringLDAPConnector.java's pageSearchResults method seems to fix the issue. May not be the best approach for a patch though. :)
    via by Donna McGahan [Atlassian],
  • OID whith BPEL
    via by 557818,
  • connection timed out during password reset LDAP
    via by Unknown author,
    • javax.naming.CommunicationException: HOSTSERVER.DOMAINNAME.com:389 [Root exception is java.security.AccessControlException: access denied (java.net.SocketPermission HOSTSERVER.DOMAINNAME.com resolve)] at com.sun.jndi.ldap.Connection.<init>(Connection.java:204) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:119) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1668) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2599) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,