Internal Server Error when deploying WAR file to Tomcat

After deploying WAR file to Tomcat on production server. I am getting a Java.lang.RuntimeException error:
Project contains screens with the same id: lms_Batch.browse

I have searched my project but not seeing where I have duplicated the screen id.
The same Project code works without the error on my development machine.

I have spent an entire day trying to figure out what is causing this error.
Please help, and thanks .

Here are my WAR settings:

buildgradle:

task buildWar(type: CubaWarBuilding) {
    appHome = 'C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps'
    singleWar = false
    includeContextXml = true
    includeJdbcDriver = true
    appProperties = ['cuba.automaticDatabaseUpdate': true]
}

Try to unpack the WAR and check that it doesn’t contain JARs of previous versions of your application. Execute clean task before buildWar.

Thank you Sir !

I got it working. I following your advice and executed a “Clean” task before doing the buildWar.