Index: lams_common/src/java/org/lamsfoundation/lams/util/XMPPUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/Attic/XMPPUtil.java,v diff -u -r1.1 -r1.1.6.1 --- lams_common/src/java/org/lamsfoundation/lams/util/XMPPUtil.java 15 Oct 2008 04:13:09 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/util/XMPPUtil.java 11 May 2009 02:35:01 -0000 1.1.6.1 @@ -30,14 +30,18 @@ // using the lams userId as xmpp username and password. manager.createAccount(user.getUserID().toString(), user.getUserID().toString()); } - + + return user.getUserID() + "@" + Configuration.get(ConfigurationKeys.XMPP_DOMAIN); } catch (XMPPException e) { - if (e.getXMPPError().getCode() != 409) { - logger.error(e); - return null; - } // else conflict error, user already exists + // if we get a room already created error, just debug print + if (e.getXMPPError().getCode() == 409) { + logger.debug(e); + }else{ + logger.error(e); + } + return null; } - return user.getUserID() + "@" + Configuration.get(ConfigurationKeys.XMPP_DOMAIN); + } /** @@ -85,8 +89,17 @@ return true; } catch (XMPPException e) { - logger.error(e); - logger.error(e.getXMPPError()); + // if we get a connection refused exception but the server is not configured correctly, just debug print + if (e.getXMPPError() != null && e.getXMPPError().getCode() == 502 && ( + Configuration.get(ConfigurationKeys.XMPP_DOMAIN).compareTo("") == 0 || + Configuration.get(ConfigurationKeys.XMPP_ADMIN).compareTo("") == 0 || + Configuration.get(ConfigurationKeys.XMPP_PASSWORD).compareTo("") == 0)) { + logger.debug(e); + } + // otherwise, we've got a problem + else{ + logger.error(e); + } return false; } }