Not reflecting changes in local.app.properties file when app is deployed

Good day
I am new to cuba studio.
I have a local.app.properties file that connects me to LDAP.

  1. When running my application on localhost, the changes in the local.app.properties file reflect and connect the application to the Active Directory.
  2. But, when i deploy the application, the changes set in the local.app.properties do not reflect and does not connect me to the Active directory. Please help with this problem.

Thank you in advance

Hi Indileni,
Standard approach is to use web-app.properties for ldap properties declaration, afaik changes in local.app.properties are reflected after app restart, not hot-deployed.
Would be nice to share error log from your servlet so it is visible where error really occurs.
Have you validated that server where is your app deployed is able to communicate to ldap? (telnet on 389 or other configured port)

Thank you @expresado for your response.

cuba.web.requirePasswordForNewUsers = false
cuba.web.ldap.enabled = true
cuba.web.ldap.urls = --server ip here–
cuba.web.ldap.base = dc=example,dc=com
cuba.web.ldap.user = cn=username,cn=User,dc=example,dc=com
cuba.web.ldap.password = password
cuba.web.standardAuthenticationUsers = admin
cuba.web.ldap.userLoginField = sAMAccountName

Above is a copy and paste of my local.app.properties file. I don’t clearly get your response. When i run my application from localhost, it works and i have a successfull connection to the Active Directory which i believe means that what i configured is correct. When i build war files that are used for deployment, somehow the local.app.properties file is not included in the .war files, because when i run the application from the server the configurations of the local.app.properties file are not reached.

Please keep response simple.

As I wrote in earlier post, if you want this properties bundled inside war file, please use web-app.properties file (modules/web/src/YOUR_PROJECT_PACKAGE/web-app.properties).
I am attaching web-app.properties example
web-app.properties (2.3 KB)

local.app.properties file is used to override “bundled” properties - CUBA Platform. Developer’s Manual
Therefore this is file that you create manually after war deploying to servlet.

Example structure of tomcat and local.app.properties file:
/opt/tomcat/webapps/app* - exploded war files
/opt/tomcat/conf/app/local.app.properties - file overriding web-app.properties contained inside app.war file
/opt/tomcat/conf/app-core/local.app.properties - file overriding app.properties contained inside app-core.war file

Thank you very much @expresado
Your response was very helpful.