0
votes

I want to use a external JDBC store as default store instead of the default LDAP store. Followed the documentation in this link.

http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store

Getting the following exception Appreciate any help.

An unknown exception occurred while starting LDAP server.java.lang.NullPointerException: Name is null

2
I experienced exactly the same with IS-4.0.0. wso2.org/jira/browse/IDENTITY-501 indicates that it has been fixed in 4.0.0; but it does not seem like it. Any guidance from wso2 IS team?user2030519

2 Answers

2
votes

You can configure WSO2 IS 4.0.0 with an external JDBC users store.The problem is due to an issue with the instructions in the documentation(1) as some configuration steps are missing there.I have created the jira [DOCUMENTATION-17] to track this doc issue. Please follow below steps to connect IS 4.0.0 with external jdbc users-store.

1) Change the UserStoreManager class to JDBCUserStoreManager from user-mgt.xml [IS_Home/repository/conf] and add the related database connection property to it as mentioned in (1)

2) Add 'passwordHashMethod' propert within JDBCUserStoreManager and set the value to 'SHA' or 'PLAIN_TEXT' in {IS_HOME}/repository/conf/user-mgt.xml. Eg: <Property name="passwordHashMethod">SHA</Property>

3) Set value of the 'MultiTenantRealmConfigBuilder' property to 'org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder' in {IS_HOME}/repository/conf/user-mgt.xml.

Eg: <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>

4) Enable JDBCTenantManager in tenant-mgt.xml and comment out the config section for CommonHybridLDAPTenantManager.

Once you did above configurations,you'll able to configure WSO2 Identity Server to an external jdbc user store successfully.

(1) http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store

1
votes

I was able to resolve this.

Start with a clean install of WSO2 IS 4.0.0 if possible.

Apart from following the directions given in the documentation to setup a JDBC datastore; you need to do the following :

  1. Enable JDBCTenantManager in tenant-mgt.xml and comment out CommonHybridLDAPTenantManager2
  2. Set the enable property to false for EmbeddedLDAP in embedded-ldap.xml