Table ldap_ldap_config doesn't exist

Hello,

I’ve installed LDAP Add-on. When I’m launching the application and trying to follow the link ‘LDAP Config’ I receive the error “SQLException: Table ‘(my_db_name).ldap_ldap_config’ doesn’t exist”.

I tried to generate database scripts but there are no scripts referring table with such name.

Could somebody provide any recomendations how to deal with that?

Hi @slangman,

Please provide what LDAP addon version do you use in your project and what DB do you use in your project. Have you updated your DB after addon was installed?

Regards,
Evgeny

Hi @evgeny.zaharchenko

The addon version is 1.4.2. I use MariaDB. I tried to update the DB but there are no any create or update scripts for LDAP tables.
I found solution already: I created new database from Cuba studio. The scripts for LDAP tables were generated. Then I manually updated my existing database with these scripts.

Please also run following SQL on your DB:

INSERT INTO LDAP_MATCHING_RULE_ORDER(id,version,create_ts,created_by,order_) values('ff2ebe743836465b918560141a6a0548',0,curdate(),'admin',2147483647);
INSERT INTO LDAP_MATCHING_RULE_STATUS(id,version,create_ts,created_by,is_active) values('ff2ebe743836465b918560141a6a0548',0,curdate(),'admin',true);

INSERT INTO LDAP_MATCHING_RULE (id,version,create_ts,created_by,rule_type,description,is_terminal_rule,is_override_existing_roles,
is_override_exist_access_grp,matching_rule_order_id,matching_rule_status_id,roles_list)
values
('ff2ebe743836465b918560141a6a0548',0,now(),'admin','DEFAULT','Default rule',false,false,false,'ff2ebe743836465b918560141a6a0548','ff2ebe743836465b918560141a6a0548','Default LDAP role');

update LDAP_MATCHING_RULE set access_group_id = (select id from SEC_GROUP where name='Company') where id = 'ff2ebe743836465b918560141a6a0548';

INSERT INTO LDAP_LDAP_CONFIG (id,version,update_ts,updated_by,SCHEMA_BASE,LDAP_USER_OBJECT_CLASSES,OBJECT_CLASS_PROPERTY_NAME,ATTRIBUTE_PROPERTY_NAMES,
EMAIL_ATTRIBUTE,CN_ATTRIBUTE,SN_ATTRIBUTE,MEMBER_OF_ATTRIBUTE,POSITION_ATTRIBUTE,OU_ATTRIBUTE,LANGUAGE_ATTRIBUTE,INACTIVE_USER_ATTRIBUTE,USER_BASE,LOGIN_ATTRIBUTE,
GIVEN_NAME_ATTRIBUTE,MIDDLE_NAME_ATTRIBUTE,DEFAULT_ACCESS_GROUP_NAME)
values
('ff2ebe743836465b918560141a6a0548',0,curdate(),'admin','CN=Schema,CN=Configuration','person;inetOrgPerson','CN','systemMustContain;systemMayContain;mayContain;MustContain',
'mail','cn','sn','memberOf','employeeType','ou','preferredLanguage','userAccountControl','','sAMAccountName','givenName','middleName','Company');

@evgeny.zaharchenko
Thank you. Now everything works properly.