Sztab 1.4 with basic Dashboard not working (SZ-41)
Artur Hefczyc opened 3 weeks ago

This is in reference to @rk email from 11/11/2025 with the subject "Sztab 1.4 with basic Dashboard".

I tried to run it according to instructions, basically running the command:

 $ ./run-all.sh

By the way such a command is a great way to allow anybody for a quick test deployment.

However, I am getting error/exception from the stab-backend about missing database: sztabdb. Here is stack trace with the exact error message:

sztab-backend  | Picked up JAVA_TOOL_OPTIONS: -XX:+UseG1GC -XX:MaxRAMPercentage=75.0 -XX:+FlightRecorder
sztab-backend  | OpenJDK 64-Bit Server VM warning: Option FlightRecorder was deprecated in version 13.0 and will likely be removed in a future release.
sztab-backend  |
sztab-backend  |   .   ____          _            __ _ _
sztab-backend  |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
sztab-backend  | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
sztab-backend  |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
sztab-backend  |   '  |____| .__|_| |_|_| |_\__, | / / / /
sztab-backend  |  =========|_|==============|___/=/_/_/_/
sztab-backend  |
sztab-backend  |  :: Spring Boot ::                (v3.5.6)
sztab-backend  |
sztab-backend  | 2025-11-17T23:20:08.004Z  INFO 1 --- [           main] com.sztab.Application                    : Starting Application using Java 21.0.9 with PID 1 (/app/sztab.jar started by root in /app)
sztab-backend  | 2025-11-17T23:20:08.008Z  INFO 1 --- [           main] com.sztab.Application                    : The following 1 profile is active: "session-auth"
sztab-backend  | 2025-11-17T23:20:10.412Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
sztab-backend  | 2025-11-17T23:20:10.552Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 122 ms. Found 7 JPA repository interfaces.
sztab-backend  | 2025-11-17T23:20:11.493Z  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8181 (http)
sztab-backend  | 2025-11-17T23:20:11.572Z  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
sztab-backend  | 2025-11-17T23:20:11.573Z  INFO 1 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.46]
sztab-backend  | 2025-11-17T23:20:11.619Z  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
sztab-backend  | 2025-11-17T23:20:11.621Z  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3554 ms
sztab-backend  | 2025-11-17T23:20:12.132Z  INFO 1 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
sztab-backend  | 2025-11-17T23:20:12.211Z  INFO 1 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 6.6.29.Final
sztab-backend  | 2025-11-17T23:20:12.249Z  INFO 1 --- [           main] o.h.c.internal.RegionFactoryInitiator    : HHH000026: Second-level cache disabled
sztab-backend  | 2025-11-17T23:20:12.525Z  INFO 1 --- [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
sztab-backend  | 2025-11-17T23:20:12.565Z  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
sztab-db       | 2025-11-17 23:20:12.715 UTC [44] FATAL:  database "sztabdb" does not exist
sztab-backend  | 2025-11-17T23:20:13.773Z  WARN 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 3D000
sztab-backend  | 2025-11-17T23:20:13.773Z ERROR 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : FATAL: database "sztabdb" does not exist
sztab-backend  | 2025-11-17T23:20:13.794Z  WARN 1 --- [           main] o.h.e.j.e.i.JdbcEnvironmentInitiator     : HHH000342: Could not obtain connection to query metadata
sztab-backend  |
sztab-backend  | org.hibernate.exception.GenericJDBCException: unable to obtain isolated JDBC connection [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:63) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:94) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:116) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:334) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:129) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:81) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.model.relational.Database.<init>(Database.java:45) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:226) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:194) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:171) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1442) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1513) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:419) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:400) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1873) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:970) ~[spring-context-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at com.sztab.Application.main(Application.java:27) ~[!/:na]
sztab-backend  | 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[na:na]
sztab-backend  | 	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[sztab.jar:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[sztab.jar:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[sztab.jar:na]
sztab-backend  | Caused by: org.postgresql.util.PSQLException: FATAL: database "sztabdb" does not exist
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2837) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:175) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:317) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:273) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.Driver.makeConnection(Driver.java:446) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.Driver.connect(Driver.java:298) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:144) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:370) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:207) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:488) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:97) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:111) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:126) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:485) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	... 40 common frames omitted
sztab-backend  |
sztab-backend  | 2025-11-17T23:20:13.830Z  WARN 1 --- [           main] org.hibernate.orm.deprecation            : HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
sztab-backend  | 2025-11-17T23:20:13.850Z  INFO 1 --- [           main] org.hibernate.orm.connections.pooling    : HHH10001005: Database info:
sztab-backend  | 	Database JDBC URL [Connecting through datasource 'HikariDataSource (null)']
sztab-backend  | 	Database driver: undefined/unknown
sztab-backend  | 	Database version: 12.0
sztab-backend  | 	Autocommit mode: undefined/unknown
sztab-backend  | 	Isolation level: undefined/unknown
sztab-backend  | 	Minimum pool size: undefined/unknown
sztab-backend  | 	Maximum pool size: undefined/unknown
sztab-backend  | 2025-11-17T23:20:13.861Z DEBUG 1 --- [           main] o.h.t.d.sql.spi.DdlTypeRegistry          : addDescriptor(2003, org.hibernate.type.descriptor.sql.internal.ArrayDdlTypeImpl@1ef04613) replaced previous registration(org.hibernate.type.descriptor.sql.internal.ArrayDdlTypeImpl@2d3d4a54)
sztab-backend  | 2025-11-17T23:20:13.862Z DEBUG 1 --- [           main] o.h.t.d.sql.spi.DdlTypeRegistry          : addDescriptor(6, org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType@215c6ec0) replaced previous registration(org.hibernate.type.descriptor.sql.internal.DdlTypeImpl@2b19b346)
sztab-db       | 2025-11-17 23:20:14.711 UTC [51] FATAL:  database "sztabdb" does not exist
sztab-backend  | 2025-11-17T23:20:15.467Z  INFO 1 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
sztab-backend  | 2025-11-17T23:20:15.494Z  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
sztab-db       | 2025-11-17 23:20:15.522 UTC [52] FATAL:  database "sztabdb" does not exist
sztab-backend  | 2025-11-17T23:20:16.531Z  WARN 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 3D000
sztab-backend  | 2025-11-17T23:20:16.532Z ERROR 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : FATAL: database "sztabdb" does not exist
sztab-backend  | 2025-11-17T23:20:16.563Z ERROR 1 --- [           main] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 2025-11-17T23:20:16.568Z  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 2025-11-17T23:20:16.583Z  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
sztab-backend  | 2025-11-17T23:20:16.622Z  INFO 1 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger :
sztab-backend  |
sztab-backend  | Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
sztab-backend  | 2025-11-17T23:20:16.655Z ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
sztab-backend  |
sztab-backend  | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1826) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:970) ~[spring-context-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.5.6.jar!/:3.5.6]
sztab-backend  | 	at com.sztab.Application.main(Application.java:27) ~[!/:na]
sztab-backend  | 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[na:na]
sztab-backend  | 	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[sztab.jar:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[sztab.jar:na]
sztab-backend  | 	at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[sztab.jar:na]
sztab-backend  | Caused by: jakarta.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:431) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:400) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:366) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1873) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.2.11.jar!/:6.2.11]
sztab-backend  | 	... 20 common frames omitted
sztab-backend  | Caused by: org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: database "sztabdb" does not exist] [n/a]
sztab-backend  | 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:63) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:94) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:74) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:39) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.internal.exec.ImprovedExtractionContextImpl.getJdbcConnection(ImprovedExtractionContextImpl.java:63) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.extract.spi.ExtractionContext.getQueryResults(ExtractionContext.java:43) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:39) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:66) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:60) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.internal.Helper.buildDatabaseInformation(Helper.java:185) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:93) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:280) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:144) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at java.base/java.util.HashMap.forEach(Unknown Source) ~[na:na]
sztab-backend  | 	at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:141) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:37) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:324) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:463) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1517) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:390) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:419) ~[spring-orm-6.2.11.jar!/:6.2.11]
sztab-backend  | 	... 24 common frames omitted
sztab-backend  | Caused by: org.postgresql.util.PSQLException: FATAL: database "sztabdb" does not exist
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2837) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:175) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:317) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:273) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.Driver.makeConnection(Driver.java:446) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at org.postgresql.Driver.connect(Driver.java:298) ~[postgresql-42.7.3.jar!/:42.7.3]
sztab-backend  | 	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:144) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:370) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:207) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:488) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:97) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:111) ~[HikariCP-6.3.3.jar!/:na]
sztab-backend  | 	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:126) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:485) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:46) ~[hibernate-core-6.6.29.Final.jar!/:6.6.29.Final]
sztab-backend  | 	... 44 common frames omitted
sztab-backend  |
sztab-backend exited with code 0

  • rk@tigase.net commented 3 weeks ago

    The error is entirely expected — the run-all.sh script depended on a pre-created PostgreSQL database named sztabdb, but I removed that script after moving to the new unified sztab Docker/Compose setup which weaves in PostgreSQL + sztab-backend + sztab-UI containers into a single working system. The new Compose files that replaced it auto-create the database correctly, but run-all.sh does not.

    In short: • run-all.sh is now obsolete and no longer maintained • It still points to the old environment, which expected sztabdb to exist • The current recommended workflow is the unified sztab/ compose setup (docker-compose up --build), which works end-to-end

    I will remove the script run-all.sh and instead put in place a new executable that will bring up the new env.

  • rk@tigase.net changed state to 'In Progress' 3 weeks ago
    Previous Value Current Value
    Open
    In Progress
  • Artur Hefczyc commented 3 weeks ago

    Thank you for explanation. However, I still cannot find a way to run the whole thing.

    I am trying to follow the README instructions instead.

    Here are some examples:

    sztab git:(wolnosc) cd deploy/docker
    docker compose up --build
    
    Compose can now delegate builds to bake for better performance.
     To do so, set COMPOSE_BAKE=true.
    [+] Building 0.0s (1/1) FINISHED                                                                               docker:desktop-linux
     => [sztab-backend internal] load build definition from Dockerfile                                                             0.0s
     => => transferring dockerfile: 2B                                                                                             0.0s
    failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
    

    Running:

    docker compose -f docker-compose.yml up --build
    

    Results with the same error that sztabdb does not exist.

    I am not sure where is the problem, maybe the documentation is not up to date.

  • rk@tigase.net commented 3 weeks ago

    Artur,

    I’ve been dealing with an unexpected TypeScript/UI issue over the last two days, which has delayed the release. The backend and deployment pieces are ready, but the UI needs to compile cleanly before I can ship a usable build.

    The concern about run-all.sh is resolved — that script is obsolete. The replacement is the new sztab orchestrator, which handles starting, stopping, cleanup, logs, and launching the frontend, so the “missing sztabdb” issue will not occur once the updated release is pushed.

    I’m working on stabilizing the UI now and will deliver the release today. I’ll keep you posted as soon as it’s ready.

    Regards, Rk

  • rk@tigase.net commented 1 week ago

    Resolution Summary

    This issue referred to problems running the legacy run-all.sh script from Sztab 1.4, where the backend failed at startup due to a missing database (sztabdb). The script attempted to orchestrate backend, frontend, and PostgreSQL containers, but it was fragile, unmaintained, and not aligned with the evolving system architecture.

    As of Sztab 1.6, the entire orchestration mechanism has been replaced with the new sztab orchestrator script (introduced in 1.5 and stabilized in 1.6). This script supersedes run-all.sh completely.

    Key Points

    • run-all.sh is deprecated and no longer supported.
    • The new sztab command provides:
      • Consistent environment setup
      • Automatic database initialization
      • Unified commands for up, down, logs, build, etc.
      • Stable backend + UI startup
      • ENV-based override options
    • All instructions now reference ./sztab up, not run-all.sh.
    • The failure described in this issue is not relevant to current releases because:
      • The database bootstrap is now handled automatically
      • Docker Compose configuration has been updated
      • Backend and UI container definitions have been refactored
      • Session-auth mode, DB schema init, and network bindings are all encapsulated by the new orchestrator

    Action Taken

    • Verified that Sztab 1.6 starts correctly via:
     % ./sztab up
    
    • Verified DB initialization, backend startup, and UI availability.
    • Confirmed that no part of the current system references run-all.sh.

    Final Status

    Issue closed as obsolete.
    run-all.sh has been fully replaced by the new sztab orchestrator in Sztab 1.6.
    No further action required.

  • rk@tigase.net changed state to 'Closed' 1 week ago
    Previous Value Current Value
    In Progress
    Closed
issue 1 of 1
Type
Bug
Priority
Blocker
Assignee
Version
none
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-41
Please wait...
Page is in error, reload to recover