Hi Arnab,
I realized it was just warnings and the error was that the mvn command could not create the directory. I fixed it with chmod and built the executable jar file successfully.
But now I move to the next step and try to run executable jar using command java -jar target/oxd-spring-4.2-SNAPSHOT.jar
That's what I get:
2021-05-10 10:50:24.272 ERROR 5810 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
org.h2.jdbc.JdbcSQLNonTransientException: Error while creating file "/home/user/Project/oxd-spring/src/main/resources/h2db" [90062-199]
2021-05-10 10:50:24.272 WARN 5810 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata : Error while creating file "/home/user/Project/oxd-spring/src/main/resources/h2db" [90062-199]
2021-05-10 10:50:24.281 INFO 5810 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2021-05-10 10:50:24.295 INFO 5810 --- [ main] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000422: Disabling contextual LOB creation as connection was null
2021-05-10 10:50:24.664 INFO 5810 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
org.h2.message.DbException: Log file error: "/home/user/Project/oxd-spring/src/main/resources/h2db/db/oxd_spring.trace.db", cause: "org.h2.message.DbException: Error while creating file ""/home/user/Project/oxd-spring/src/main/resources/h2db"" [90062-199]" [90034-199]
org.h2.message.DbException: Log file error: "/home/user/Project/oxd-spring/src/main/resources/h2db/db/oxd_spring.trace.db", cause: "org.h2.message.DbException: Error while creating file ""/home/user/Project/oxd-spring/src/main/resources/h2db"" [90062-199]" [90034-199]
2021-05-10 10:50:28.204 ERROR 5810 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
org.h2.jdbc.JdbcSQLNonTransientException: Error while creating file "/home/user/Project/oxd-spring/src/main/resources/h2db" [90062-199]
2021-05-10 10:50:28.205 WARN 5810 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 90062, SQLState: 90062
2021-05-10 10:50:28.205 ERROR 5810 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Error while creating file "/home/user/Project/oxd-spring/src/main/resources/h2db" [90062-199]
2021-05-10 10:50:28.209 WARN 5810 --- [ 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]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
2021-05-10 10:50:28.211 INFO 5810 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-05-10 10:50:28.219 INFO 5810 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-05-10 10:50:28.221 ERROR 5810 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution