Hello All!
I was wondering if there is something I am missing when it comes to jdbcGroupProvider. Right now I can add all of the users to their groups and they show up on the buddy list, but they can’‘t be IMed. I’‘m wondering if this is because our username’‘s in the existing database arn’'t JIDs. For example, my username in the existing database is “jcampbell”
From my config file, I have the following for loadMembersSQL
<loadMembersSQL>SELECT username FROM users u WHERE CASE SUBSTR(work_phone, INSTR(work_phone, ‘‘x’’)+1, 1) WHEN 2 THEN ‘‘Administration’’ WHEN 3 THEN ‘‘Customer Care’’ WHEN 4 THEN ‘‘Sales’’ WHEN 6 THEN ‘‘Graphics’’ WHEN 7 THEN ‘‘Information Technology’’ WHEN 8 THEN ‘‘Presenters’’ ELSE ‘‘Other’’ END = ? AND user_record_status = ‘‘a’’;</loadMembersSQL>
When I load up the server and the Spark client, the following error appears in logs/error.log
2006.10.24 13:37:35 org.jivesoftware.wildfire.server.OutgoingServerSession.createOutgoingSession(Ou tgoingServerSession.java:259) Error trying to connect to remote server: jcampbell(DNS lookup: jcampbell:5269)
java.net.UnknownHostException: jcampbell
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jivesoftware.wildfire.server.OutgoingServerSession.createOutgoingSession(Ou tgoingServerSession.java:254)
at org.jivesoftware.wildfire.server.OutgoingServerSession.authenticateDomain(Outgo ingServerSession.java:140)
at org.jivesoftware.wildfire.server.OutgoingSessionPromise.createSessionAndSendPac ket(OutgoingSessionPromise.java:130)
at org.jivesoftware.wildfire.server.OutgoingSessionPromise.access$300(OutgoingSess ionPromise.java:40)
at org.jivesoftware.wildfire.server.OutgoingSssionPromise$1$1.run(OutgoingSessionP romise.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
So I tried to fix this by adding the servername to the username in my query:
<loadMembersSQL>SELECT CONCAT(username,’’@servername’’) FROM users u WHERE CASE SUBSTR(work_phone, INSTR(work_phone, ‘‘x’’)+1, 1) WHEN 2 THEN ‘‘Administration’’ WHEN 3 THEN ‘‘Customer Care’’ WHEN 4 THEN ‘‘Sales’’ WHEN 6 THEN ‘‘Graphics’’ WHEN 7 THEN ‘‘Information Technology’’ WHEN 8 THEN ‘‘Presenters’’ ELSE ‘‘Other’’ END = ? AND user_record_status = ‘‘a’’;</loadMembersSQL>
That seems to work and the buddy list is populated correctly, but I don’‘t know if it would have any other adverse affects or if that is the proper way to user loadMembersSQL. I had some other problems with presence not updating correctly and I’'m wondering if it is related to this rigging.