powered by Jive Software

Java error when setting up LDAP with Active Directory

Hello, I’m new to Openfire and I’m setting up a server for the first time to test this with Spark. We currently already have an Openfire 3.6.4 server that we’ve been using for years with the Pandion client, however, Pandion is no longer supported and has been giving us many problems lately, so we’re looking to use Spark now. To avoid any impact on our 1000+ users, we’re setting up a new server to test with and once everything looks fine, we’ll switch everyone over to that one.

Anyway, I’m at the 2nd step of the LDAP setup (Profile Settings) and when I click “Save & Continue”, I get the following error:

HTTP ERROR 500

Problem accessing /setup/setup-ldap-user.jsp. Reason:

org.jivesoftware.openfire.user.DefaultUserProvider cannot be cast to org.jivesoftware.openfire.ldap.LdapUserProvider

In step 1, the server type, host, port and Base DN are all identical to what is being used on our current server. We created a new user account for AD authentication and the username is the form of domain\username. When I click the “Test Settings” button, nothing happens. I can then click “Save & Continue” to proceed to step 2, where I don’t change any settings (screenshot attached) and then when I try to proceed to step 3, I get that error message.

Can anyone please shed any light on why I would be getting this error?

1 Like

I notice that there are other LDAP issues that people have experienced over time that have not been answered including one for the exact same issue I’m having. If anyone could provide any assistance, that would be greatly appreciated. Here is the full Java error that I’m getting. Let me know if I can provide anymore information.

2014.04.03 11:06:58 org.eclipse.jetty.servlet.ServletHandler - /setup/setup-ldap-user.jsp

java.lang.ClassCastException: org.jivesoftware.openfire.user.DefaultUserProvider cannot be cast to org.jivesoftware.openfire.ldap.LdapUserProvider

at org.jivesoftware.openfire.admin.setup.setup_002dldap_002duser_jsp._jspService(s etup_002dldap_002duser_jsp.java:203)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1359)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 7)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:94 1)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186 )

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875 )

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:250)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:149)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)

at org.eclipse.jetty.server.Server.handle(Server.java:349)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.j ava:936)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)

at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51 )

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.jav a:586)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java :44)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598 )

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)

at java.lang.Thread.run(Unknown Source)

To add to this, I have tried using the hostname, FQDN and IP address of our primary DC which is what we use on our old server as well printers for LDAP lookups. I also tried two different accounts that were created for LDAP authentication, one of which is currenlty used on our old server. When I click the Test button on the first or second step, it just appears to refresh the page. One difference I failed to mention is that our old server is WS2008 Standard 32bit, while our new one is WS2008 R2 Standard 64bit. I’m not sure if that would matter or not.

Message was edited by: Shawn

I updated the prototype.js file from version 1.7.0 to 1.7.1 and now I’m able to test the LDAP settings successfully. The file is located in C:\Program Files (x86)\Openfire\plugins\admin\webapp\js and it can be downloaded from http://prototypejs.org/download/.

I was hoping this was going to resolve my Java error, but it did not. Still waiting for some help on this one.

After much troubleshooting, I was able to get this to work. I believe the issue was due to me accidentally pointing the new server to the old database, which is currently in production. This caused other issues with the old database that we’ve since resolved.

The solution was to build the server from scratch, purge the new database and rename it so that it wasn’t so similar to the old one (Openfire vs Openfire2). After that, I no longer received the error and I was able to setup the Openfire server.