# AuthenticationManager implementation does not exists

**URL:** <https://community.ofelia.com/t/authenticationmanager-implementation-does-not-exists/7062>\
**Category:** Q&A\
**Created:** [3 March 2016 14:12 UTC](https://community.ofelia.com/t/authenticationmanager-implementation-does-not-exists/7062 "2016-03-03T14:12:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.lapierre](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@g.lapierre](https://community.ofelia.com/u/g.lapierre)\
**Post date:** [3 March 2016 14:12 UTC](https://community.ofelia.com/t/authenticationmanager-implementation-does-not-exists/7062/1 "2016-03-03T14:12:05Z")

</div>

I am trying to create a custom AuthenticationManager implementation.

I started by a copy/paste of StandardAuthenticationManagerImpl (which basically does nothing!) and created a nice custom-auth.jar file.

I put that jar in workspace/tomcat/lib and modified the auth.AuthenticationManager property in authenticationManager-config.properties.

When I start the portal from the studio I have two options:

- if I did not add console common-server in tomcat lib I get HTTP 500 when trying to open the portal with org/bonitasoft/console/common/server/auth/AuthenticationManager (classnotfound exception in tomcat log)

- if I create the jar with its dependencies (or add console common-server to tomcat/lib) the error is `org.bonitasoft.console.common.server.auth.AuthenticationManagerNotFoundException: The AuthenticationManager implementation com.mycompany.AuthenticationManagerImpl does not exist!`

I checked the jar file and the .class for AuthenticationManagerImpl is in the file and being in tomcat/lib should be in the classpath.

What did I miss?

---

<div class="post-metadata">

**Author:** ![g.lapierre](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@g.lapierre](https://community.ofelia.com/u/g.lapierre)\
**Post date:** [9 March 2016 09:29 UTC](https://community.ofelia.com/t/authenticationmanager-implementation-does-not-exists/7062/2 "2016-03-09T09:29:24Z")

</div>

I finally understood my problem. The problem is the order of class loading. If the custom auth manager implementation is added to tomcat/lib then the jar containing org.bonitasoft.console.common.server.auth.AuthenticationManager is not yet loaded (it is provided by the tomcat app). Adding common-server to tomcat/lib leads to ClassCastExceptions because AuthenticationManager is loaded twice!

To solve this I put my custom jar into webapps/bonita/WEB-INF/lib along with bonita provided jars and it works.

---

<div class="post-metadata">

**Author:** ![anil\_kumar.tummidi\_1](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anil\_kumar.tummidi\_1](https://community.ofelia.com/u/anil_kumar.tummidi_1)\
**Post date:** [20 July 2019 09:25 UTC](https://community.ofelia.com/t/authenticationmanager-implementation-does-not-exists/7062/3 "2019-07-20T09:25:04Z")

</div>

@g.lapierre …can you eloborate on how you solved the issue a little, bcoz even after placing the all3 jars common-console,server and custom jar in web-inf/lib, still getting the same Error.

2019-07-20 14:51:39.696 +0530 SEVERE: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita].[loginService] Servlet.service() for servlet [loginService] in context with path [/bonita] threw exception [javax.servlet.ServletException: org.bonitasoft.console.common.server.auth.AuthenticationManagerNotFoundException: The AuthenticationManager implementation help.bpms.bonita.authentication.ldap.LdapAuthenticationManagerImpl does not exist!] with root cause  
org.bonitasoft.console.common.server.auth.AuthenticationManagerNotFoundException: The AuthenticationManager implementation help.bpms.bonita.authentication.ldap.LdapAuthenticationManagerImpl does not exist!
