I’ve recently setup a fresh install of Openfire 3.7.1 on fresh install of CentOS. It’s all working correctly and as epected “out of the box”. What I have been trying to accomplish is using an existing MS Sql Server database for authentication but not for user profiles or groups. I followed the guide found here http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html but after restarting the openfire service it seemed to ignore the changes I made in openfire.xml regarding the custom auth provider. So, using the web admin, I changed the system property “provider.auth.className” to the correct value and then all of the sudden in the web admin I could see the other settings that I had entered in openfire.xml. I thought “that was strange” but moved on because it seemed to have the settings I wanted. I restarted the openfire service and after doing so I could no longer login to the web admin console using the “admin” user, at first I thought that was a good thing because that user wouldn’t exist in the MS Sql Server DB. However, I couldn’t login as any user, even ones that I had specified in the system property “admin.authorizedJIDs”. Sorry for the verbose “back history” but here is where I found the problem I am stuck on. In the error.log I found that it was throwing the following exception every time the openfire service started.
2012.03.21 18:26:36 org.jivesoftware.openfire.auth.JDBCAuthProvider - Exception in JDBCAuthProvider
java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.jivesoftware.openfire.auth.JDBCAuthProvider.getConnection(JDBCAuthProvider. java:264)
at org.jivesoftware.openfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvid er.java:292)
at org.jivesoftware.openfire.auth.JDBCAuthProvider.authenticate(JDBCAuthProvider.j ava:151)
at org.jivesoftware.openfire.auth.AuthFactory.authenticate(AuthFactory.java:176)
at org.jivesoftware.openfire.net.XMPPCallbackHandler.handle(XMPPCallbackHandler.ja va:102)
at org.jivesoftware.openfire.sasl.SaslServerPlainImpl.evaluateResponse(SaslServerP lainImpl.java:120)
at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java :274)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:179)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:169)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Unknown Source)
Here are the settings that I have in the OFPROPERTY table (sensative info removed)…
jdbcAuthProvider.passwordSQL = SELECT Password FROM Users WHERE Username = ?
jdbcAuthProvider.passwordType = plain
jdbcProvider.connectionString = jdbc:jtds:sqlserver://[DBSERVER]:1433/[DBNAME];user=[DBUSER];password=[DBPASS]; appName=jive
jdbcProvider.driver = net.sourceforge.jtds.jdbc.Driver
Can anyone tell me what this exception means? Or what “url” it is referring to? I have searched a decent amount on these forums and I can find people with similar problems but they are not doing exactly what i’m doing. Thanks again to anyone who can/will help me figure this out!
Darren