powered by Jive Software

CCE in OpenFire 3.6.2 using LDAP

I’m trying to use LDAP with OpenFire 3.6.2 and when I’m configuring my user mapping… I get this:


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

Caused by:

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(setup_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.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
 at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
 at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:66)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:42)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:146)
 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
 at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
 at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
 at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

You need to be way more specific.

  • Server OS
  • What LDAP server
  • What are you entering for each step (screenshots)

Server OS: SuSe11

LDAP Server: OpenLDAP

Everything is practically default. It looks like a bug in the code… it’s a ClassCastException…

Could anything be left from a previous installation that would cause this?

so your LDAP server is the same server as you Openfire server? You also do not have an adminDN configured in that picture. You need to bind to LDAP with some user. You may also want to use the actual DNS host name for the LDAP server.

Yes, my LDAP server is on the same host as the OpenFire server. I’ve tried both ‘localhost’ and the respective domain… both work (the test settings button works). I never needed to put an admin information before and it’s worked fine. I put in one and it still fails.

It’s on the second page where the exception occurs (after hitting save & continue).

Any other thoughts? Is a JIRA bug needed?

I still think there is something wrong with your configuration. I have LDAP running with no issue and have helped several people with LDAP even with the latest build.

Ok, so how can I ensure that there are no any old files left that may be causing issues?

Ok, I tried to clear the database and no dice there.

The “Test Settings” button works great… I get to browse all my LDAP users.

It’s just when I hit Save & Continue that things don’t work. Outside of debugging the code itself… I have no idea what else I can do here.

Is this a clean install? What database are you using? Can you do a clean install.

My question is how you do that exactly?

I do an rpm -e openfire, drop the database tables.

Did I miss anything obvious?

I would manually delete any remaining openfire folder after that. Purging the tables should be enough for the db.

Since I have the same problem: Did the solution of todd work? (I really don’t want to start from scratch if it is not nessesary)

Best regards, Maddi

Maddi, the only way I was able to fix the problem was by purging the database (or using a new database).

I believe the OpenFire code is making some assumptions about stale data in the database which causes the CCE to double up. I haven’t had time to debug the problem but it does suck when you hit it. I can reproduce it everytime by installing OpenFire with LDAP (using OpenLDAP) and MySQL. If I than go to upgrade and reuse the same database, the CCE happens everytime.

So in the end, I recommend purging your database