By: Victor Victorov user 06 May 2021 at 5:11 p.m. CDT

7 Responses
Victor Victorov gravatar
I tried to set up SSO on my virtual machine using the manual https://www.gluu.org/docs/oxd/tutorials/spring/. I have installed Java (version: 11.0.11), Maven (3.6.3) and Gluu Server with oxd. But in the fourth point of the category "Run" i have an error form maven. I can show all logs but main error is "[WARNING] Could not transfer metadata org.gluu:gluu-core-bom:4.2.0-SNAPSHOT/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Transfer failed for http://repo1.maven.org/maven2/org/gluu/gluu-core-bom/4.2.0-SNAPSHOT/maven-metadata.xml 501 HTTPS Required org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata org.gluu:gluu-core-bom:4.2.0-SNAPSHOT/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Transfer failed for http://repo1.maven.org/maven2/org/gluu/gluu-core-bom/4.2.0-SNAPSHOT/maven-metadata.xml 501 HTTPS Required" I checked this error on maven web-page and realized that it was all because of using "http" instead of "https" while building the executable jar (mvn clean package -Dmaven.test.skip=true) Did I understand the error correctly and how can I fix it?

By Michael Schwartz Account Admin 08 May 2021 at 5:41 p.m. CDT

Michael Schwartz gravatar
arnab, can you take a look?

By Arnab Dutta staff 10 May 2021 at 11:49 a.m. CDT

Arnab Dutta gravatar
Hi Victor, Thanks for reporting the issue. The logs you have pasted are just warnings. The built should be successful even after the warnings. Could you please share the entire built log. Regards Arnab

By Victor Victorov user 10 May 2021 at 12:59 p.m. CDT

Victor Victorov gravatar
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

By Arnab Dutta staff 11 May 2021 at 1:51 a.m. CDT

Arnab Dutta gravatar
> Error while creating file "/home/user/Project/oxd-spring/src/main/resources/h2db" [90062-199] > I think it's again permission issue at `/home/user/Project/oxd-spring/src/main/resources/h2db` so oxd-spring is not able to create database file. Please provide permission using chmod and check. Regards Arnab

By Victor Victorov user 11 May 2021 at 2:13 a.m. CDT

Victor Victorov gravatar
Yes, I understand that I must provide permission not only for user and group. I used chmod and that's works Browser display the start page, current oxd-id and button "Login with Gluu". Then I click the button and catch an error "session_selection_required" The End-User is required to select a session at the Authorization Server. The End-User MAY be authenticated at the Authorization Server with different associated accounts, but the End-User did not select a session. This error MAY be returned when the prompt parameter in the Authorization Request is set to none to request that the Authorization Server should not display any user interfaces to the End-User, but the Authorization Request cannot be completed without displaying a user interface to prompt for a session to use. But I can't understand which parameter is set to none. Is it from oxd-spring/src/main/resources/application.properties ?

By Arnab Dutta staff 12 May 2021 at 6:13 a.m. CDT

Arnab Dutta gravatar
Please check `Authentication mode` on auth server (refer attachment). The value of `oxd.server.acr-values` property in application.properties should match ``Authentication mode` value of auth server. For example: oxd.server.acr-values=simple_password_auth

By Victor Victorov user 12 May 2021 at 11:53 a.m. CDT

Victor Victorov gravatar
Thanks a lot, Arnab! Application works, you really help me. Good luck