Using multiple databases in jmix as multi-tenant approach

Hi and thanks for your answer,

For your first question about updating specific databases.
Now I have a flag into a specific table on each database and when app starts checks for that specific flag and do some specific sql updatates if necessary so the database for tenant1,2,3 is up to date.
After the update is done with success the flag is put on false and that’s it, next time it will not checking anything.

Now about my business logic.

I have an erp with accounting, salary, sales, etc.
This erp it is used in different scenarious:

One is by accounting companies that have in custody from one company to deal with or ten’s of them or even more then a hundred in their portofolio.

Another scenarion is with companies that are not accounting but use the erp for their business processes. Some of them have also one or 2,3,4 companies that are own by same person/entity and have all the accounting in their location for all their companies. Some of these databases can be very big.

Another scenario is with one company that have different locations where they deal with erp and for some of them we have made separate servers and databases and instalations with replica scenarious due to their specific demands.
For example they do not want to depend on internet if something happens on their main locations so we have separate servers for their locations. Also for some of them this was our decision to have all the data in small databases for every location due to scalability, speed or other reasons.

So for all these scenarious we have separate tenant databases with same structure.
Having a single database with tenant_id column can work for some scenarious but not for all situations. There are pro and cons and for us cons where bigger then pros.

One reason is for some databases the grow very big and having separate databases is more scalable and easy to manage. If I need to backup one specific database it is much faster to have one small backup then to have a big bulk backup with all messed together that take long time.
Sometimes you need to bring customer data to your server to have some specific tests or dealing with bugs.

Also with one very big database all the queries, indexes are big and will make app slower with the passing of time.

Regards,
Camil Ghircoias

Hi everyone,

Thank you for your input.

I’ve prepared a minimalistic example following mostly the “simple” requirements from Mladen’s post above:

Please take a look and share your thoughts on what should be improved and whether this approach can be used in real life applications.

Regards,
Konstantin

3 Likes

It looks promising, we need some time to test it and keep you up to date.

Can y provide what is wrong when running the example

  • Execute the Recreate action for Main Data Store - Done, no errors, database is created
    But on tenant data store - there is no recreate option in context menu on tenant data store.
    So we got this error:
    Liquibase failed to start because no changelog could be found at ‘classpath:/db/changelog/db.changelog-master.yaml’.

Try to switch the DB Schema Management mode to Create and Update:
image

1 Like

As far as I see it works and it is a good point to start with.

About logical structure you provide, in my opinion one user should have rights for more than one tennant database so it will be better a mapping structure one to many not one user to one tennant database.

In this case the user connection form should have also database name prompted after user and password textbox. And the database to connect to should be from a list of databases tennants the user is mapped to.

Browser will keep session to the user and may be it will be possible to have multiple pages opened in the same browser, one for tenant 1 and one for tennant 2 as it will be same user and not different ones as with one user to one tennant approach ? What is your opinion ?

Thank you,
Camil Ghircoias

If you associate a user with multiple tenants, it immediately raises a problem of detecting what tenant is chosen for the user in the current session. So the DataSourceRepository should get the tenant not directly from the user, but from the session.

I will modify the example in such a way that the tenant will be stored in the session upon login, and DataSourceRepository will get it from there.

Regards,
Konstantin

Thanks.

I’ve updated jmix-projects/multidb-multitenancy-sample to set current tenant in session.

Please take a look and share your thoughts.

Hello,

I’ve looked at the example and I understand the logic, it works with this method setCurrentTenantInSession() so it it can be done a solution with one user login and multiple tenant databases.
We’ll give some more feedback when we’ll implement in a more complex solution, hope it will do it’s job.
I think this example should be in jmix documentation as it will help others also.
Thank you.

Thanks, looking forward to it.

Most probably we’ll include this example in the collection at GitHub - jmix-framework/jmix-samples-2: Examples of solving typical problems in Jmix applications.

1 Like

Hi,

We have changed the project a little bit as folowing:

  • remove tenant field from user entity.
  • created many to many relation user<->tenant.
  • on user screen posibility to add more than one tenant to which it has rights to see.
  • after login screen another screen will appear where you can choose tenant database and where it changes the current database with method you provided.

Here it is the modified version:
https://github.com/sorinfederiga/multidbmt

It works as expected but here are some of the problems I think we have to deal with later and all of them are related :
1.You cannot set the rights on screens separatly by tenant database, only by all of them. I suppose all the rights works the same so we have to make another layer of managining user rights separately. I am not sure if this can be done other than by doing in a inhouse solution.
2.This one is a little bit more tricky as on search box if you save one filter it will remain on all databases. This one it will raise some problems as it mess together different filters that are not suitable from one database tenant to another. I am not sure how it can be done yet.
3. Same is on reports but you can use directly with jasper and do it custom without the jmix addon so this is not so big deal.

What do you think ?

Regards Camil Ghircoias

Hi Camil,

All these issues stem from the fact that entities used by these features (ResourcePolicyEntity, ResourceRoleEntity, FilterConfiguration, Report and so on) are located in the main data store, which is shared. And there is no way to put them in the additional one, which is tenant-specific. So all configuration data is now shared between tenants.

I have an idea to rework the application in such a way that the Main Data Store will become tenant-specific, and an additional shared data store will contain users and tenants. So all built-in configuration entities will be tenant-specific. And if you need a shared entity, you will create it in the additional data store.

Is there any potential issue you foresee with this solution?

Regards,
Konstantin

I beleive this would be the right solution.
Users and tenants in one shared database and the rest database specific. That’s how i deal with specific database now in our winform app. One database for users and some general configuration like rights for one tenant database or another - and the rest like reports, rights on forms and menus all are set in specific database.
If you can make it this way it will solve the tenant problems.

Done. Now the main data store is used for tenant data and the additional shared one stores the lists of users and tenants.

Looking forward to your review and comments!

Regards,
Konstantin

Hi,
I’ve run the app and from what i saw it looks good.
Flow ui data is stored in tenant1,2,3 database not in main database. That is perfect.
Users are stored in shared database.
What method did you used to change where user data like flowui is saved ( from main database in specific tenant database 1,2,3 ) ?

Will do some more tests after the Easter vacation but things looks good so far.

Regards,
Camil

Interesting solution. I have a question, @krivopustov if I wanted to share the information of any table should be marked as @Store(name = "shared") to be used by all tenants?

Another thing, how would REST services work?

Nothing special. All standard Jmix subsystems (the core modules and add-ons) store data in the main data store. So as soon as it became tenant-specific (with the help of RoutingDatasource), the Flow UI settings and filters are now stored in tenant databases.

Yes. Then the entity will be stored in the additional data store shared between tenants.

Generic REST won’t work with tenant databases, all requests will go to the default main database. The proper handling of REST requests needs further R&D. We’ll address it later.

1 Like

I built application based on this project and it is working fine on localhost, but when i install this on server, it gives 404 error. below is catalina log -

server - tocat 10.0.21 zulujdk 17.03 (I have other app in flow witch is working on this configuration)

TE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-May-2024 07:50:11.811 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [compressableMimeType] to [text/html,text/xml,text/plain,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript,image/svg+xml]
24-May-2024 07:50:11.841 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [compressableMimeType] to [text/html,text/xml,text/plain,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript,image/svg+xml]
24-May-2024 07:50:11.974 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.0.21
24-May-2024 07:50:11.974 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 10 2022 21:53:12 UTC
24-May-2024 07:50:11.975 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.0.21.0
24-May-2024 07:50:11.975 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
24-May-2024 07:50:11.976 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0
24-May-2024 07:50:11.977 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
24-May-2024 07:50:11.977 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/zulu-17.0.3
24-May-2024 07:50:11.978 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.3+7-LTS
24-May-2024 07:50:11.978 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Azul Systems, Inc.
24-May-2024 07:50:11.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
24-May-2024 07:50:11.980 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
24-May-2024 07:50:11.982 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
24-May-2024 07:50:11.982 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
24-May-2024 07:50:11.984 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
24-May-2024 07:50:11.984 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
24-May-2024 07:50:11.985 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-May-2024 07:50:11.986 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UnlockExperimentalVMOptions
24-May-2024 07:50:11.986 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:G1PeriodicGCSystemLoadThreshold=0.3
24-May-2024 07:50:11.986 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:G1PeriodicGCInterval=900k
24-May-2024 07:50:11.986 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseStringDeduplication
24-May-2024 07:50:11.987 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseG1GC
24-May-2024 07:50:11.987 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmaxf0.3
24-May-2024 07:50:11.988 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xminf0.1
24-May-2024 07:50:11.988 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms32M
24-May-2024 07:50:11.989 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx614M
24-May-2024 07:50:11.989 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
24-May-2024 07:50:11.990 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-May-2024 07:50:11.990 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DReceiverIp=
24-May-2024 07:50:11.991 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DMagicPort=
24-May-2024 07:50:11.991 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseCompressedOops
24-May-2024 07:50:11.992 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djvm=tomcat
24-May-2024 07:50:11.992 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
24-May-2024 07:50:11.993 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=false
24-May-2024 07:50:11.994 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DjvmRid=
24-May-2024 07:50:11.994 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-May-2024 07:50:11.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
24-May-2024 07:50:11.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
24-May-2024 07:50:12.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
24-May-2024 07:50:12.014 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
24-May-2024 07:50:12.014 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
24-May-2024 07:50:12.015 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
24-May-2024 07:50:12.026 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.23] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.30]
24-May-2024 07:50:12.027 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.23] using APR version [1.4.8].
24-May-2024 07:50:12.027 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [false].
24-May-2024 07:50:12.032 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
24-May-2024 07:50:13.058 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
24-May-2024 07:50:13.148 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-May-2024 07:50:13.149 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1820] milliseconds
24-May-2024 07:50:13.270 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-May-2024 07:50:13.271 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.0.21]
24-May-2024 07:50:13.324 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
24-May-2024 07:50:14.078 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [745] ms
24-May-2024 07:50:14.082 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
24-May-2024 07:50:14.169 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-May-2024 07:50:14.175 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1025] milliseconds
24-May-2024 08:30:26.011 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
24-May-2024 08:30:26.013 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]
24-May-2024 08:30:26.022 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
24-May-2024 08:30:26.025 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
24-May-2024 08:30:26.086 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-80"]
24-May-2024 08:30:26.101 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
24-May-2024 08:30:26.106 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]
24-May-2024 08:30:26.107 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-May-2024 08:30:30.535 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [compressableMimeType] to [text/html,text/xml,text/plain,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript,image/svg+xml]
24-May-2024 08:30:30.553 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Connector] failed to set property [compressableMimeType] to [text/html,text/xml,text/plain,text/css,application/xml,application/xhtml+xml,application/rss+xml,application/javascript,application/x-javascript,image/svg+xml]
24-May-2024 08:30:30.639 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.0.21
24-May-2024 08:30:30.640 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 10 2022 21:53:12 UTC
24-May-2024 08:30:30.640 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.0.21.0
24-May-2024 08:30:30.640 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
24-May-2024 08:30:30.641 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0
24-May-2024 08:30:30.642 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
24-May-2024 08:30:30.647 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/zulu-17.0.3
24-May-2024 08:30:30.647 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.3+7-LTS
24-May-2024 08:30:30.647 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Azul Systems, Inc.
24-May-2024 08:30:30.648 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
24-May-2024 08:30:30.648 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
24-May-2024 08:30:30.650 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
24-May-2024 08:30:30.650 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
24-May-2024 08:30:30.651 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
24-May-2024 08:30:30.651 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
24-May-2024 08:30:30.652 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
24-May-2024 08:30:30.652 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UnlockExperimentalVMOptions
24-May-2024 08:30:30.653 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:G1PeriodicGCSystemLoadThreshold=0.3
24-May-2024 08:30:30.653 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:G1PeriodicGCInterval=900k
24-May-2024 08:30:30.653 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseStringDeduplication
24-May-2024 08:30:30.654 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseG1GC
24-May-2024 08:30:30.654 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmaxf0.3
24-May-2024 08:30:30.655 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xminf0.1
24-May-2024 08:30:30.655 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms32M
24-May-2024 08:30:30.655 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx614M
24-May-2024 08:30:30.656 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
24-May-2024 08:30:30.656 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
24-May-2024 08:30:30.656 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DReceiverIp=
24-May-2024 08:30:30.656 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DMagicPort=
24-May-2024 08:30:30.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseCompressedOops
24-May-2024 08:30:30.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djvm=tomcat
24-May-2024 08:30:30.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
24-May-2024 08:30:30.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=false
24-May-2024 08:30:30.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DjvmRid=
24-May-2024 08:30:30.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
24-May-2024 08:30:30.659 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
24-May-2024 08:30:30.660 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
24-May-2024 08:30:30.660 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
24-May-2024 08:30:30.660 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
24-May-2024 08:30:30.661 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
24-May-2024 08:30:30.661 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
24-May-2024 08:30:30.672 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.23] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.30]
24-May-2024 08:30:30.672 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.23] using APR version [1.4.8].
24-May-2024 08:30:30.672 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [false].
24-May-2024 08:30:30.676 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips 26 Jan 2017]
24-May-2024 08:30:31.773 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
24-May-2024 08:30:31.878 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-May-2024 08:30:31.880 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1795] milliseconds
24-May-2024 08:30:32.044 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-May-2024 08:30:32.045 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.0.21]
24-May-2024 08:30:32.099 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/ROOT.war]
24-May-2024 08:30:36.894 WARNING [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [6.0]. Default version will be used.
24-May-2024 08:30:36.906 WARNING [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [6.0]. Default version will be used.
24-May-2024 08:30:59.861 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
24-May-2024 08:31:00.404 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Error during ServletContainerInitializer processing
jakarta.servlet.ServletException: Failed to instantiate WebApplicationInitializer class
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:157)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5168)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1027)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2001)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:828)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:478)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1708)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:320)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:946)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
Caused by: java.lang.NoSuchMethodException: com.sheel.managehse.ManageHSEApplication.<init>()
at java.base/java.lang.Class.getConstructor0(Class.java:3585)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
at org.springframework.util.ReflectionUtils.accessibleConstructor(ReflectionUtils.java:185)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:154)
... 40 more
24-May-2024 08:31:00.426 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
24-May-2024 08:31:00.594 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/ROOT.war] has finished in [28,480] ms
24-May-2024 08:31:00.621 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
24-May-2024 08:31:00.743 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-May-2024 08:31:00.870 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [28990] milliseconds

Thanks in advance.