the same reason you can not start the admin first in a local environment
The admin application will actually start up locally no problem without 'site' running. The difference is that you cannot login or do anything until the site has been started up. This is because the hibernate ddl is set to 'create-drop' in site (see development.properties in the site project) and is also where all the import SQL files necessary to run the site and admin are referenced (while the files themselves are contained in core/src/main/resources/sql). This is what development.properties looks like in site:
Code: Select all
blPU.hibernate.hbm2ddl.auto=create-drop
blPU.hibernate.hbm2ddl.import_files=/sql/load_admin_security.sql,\
/sql/load_admin_users.sql,\
/sql/load_code_tables.sql,\
/sql/load_table_sequences.sql,\
/sql/load_content_structure.sql,\
/sql/load_catalog_data.sql,\
/sql/load_content_data.sql
blCMSStorage.hibernate.hbm2ddl.auto=update
blSecurePU.hibernate.hbm2ddl.auto=update
solr.index.repeat.interval=10000
The admin does not have this and so no tables are created and no import files are run.
There should be no reason that you have to restart the admin in order to log in unless for some reason the site and admin are pointing at separate databases. I regularly run on Tomcat deploying both applications at the same time (the admin as 'admin.war' and the site as 'ROOT.war'). Because I have it configured in this way, the admin.war file is deployed first and starts up without a problem, then the ROOT.war file is deployed and also starts up no problem, the Tomcat restart is completed and now I can do whatever I want with both site and admin. I would check your database configuration and also that you don't have anything wonky in your properties files.