Open reecexlm opened 10 months ago
The anchor platform requires a database, but it has the in-memory H2 database configured by default. It seems like this database type doesn't work anymore though, and I got the same stack trace when configuring it to use sqlite.
What version are you using?
latest
What did you do?
I tested this out and it looks like using the default (H2) or configuring it to use sqlite results in the same stack trace. Logs in the thread.
What happened?
Stack Trace
anchor-platform-sep-server-1 | 23:50:42.064 ERROR - o.s.o.j.LocalContainerEntityManagerFactoryBean - Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 anchor-platform-sep-server-1 | 23:50:42.068 WARN - o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - 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.MappingException: No Dialect mapping for JDBC type: 1111 anchor-platform-sep-server-1 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. anchor-platform-sep-server-1 | 23:50:42.268 ERROR - o.s.b.SpringApplication - Application run failed anchor-platform-sep-server-1 | 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.MappingException: No Dialect mapping for JDBC type: 1111 anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.9.jar!/:2.7.9] anchor-platform-sep-server-1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.9.jar!/:2.7.9] anchor-platform-sep-server-1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.9.jar!/:2.7.9] anchor-platform-sep-server-1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.9.jar!/:2.7.9] anchor-platform-sep-server-1 | at org.stellar.anchor.platform.SepServer.start(SepServer.java:43) ~[platform-2.5.1-plain.jar!/:?] anchor-platform-sep-server-1 | at org.stellar.anchor.platform.ServiceRunner.startSepServer(ServiceRunner.java:87) ~[classes!/:?] anchor-platform-sep-server-1 | at org.stellar.anchor.platform.ServiceRunner.main(ServiceRunner.java:39) ~[classes!/:?] anchor-platform-sep-server-1 | at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] anchor-platform-sep-server-1 | at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] anchor-platform-sep-server-1 | at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] anchor-platform-sep-server-1 | at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] anchor-platform-sep-server-1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[anchor-platform-runner.jar:?] anchor-platform-sep-server-1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[anchor-platform-runner.jar:?] anchor-platform-sep-server-1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[anchor-platform-runner.jar:?] anchor-platform-sep-server-1 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[anchor-platform-runner.jar:?] anchor-platform-sep-server-1 | Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 anchor-platform-sep-server-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:421) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | ... 24 more anchor-platform-sep-server-1 | Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 anchor-platform-sep-server-1 | at org.hibernate.dialect.TypeNames.get(TypeNames.java:71) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.dialect.TypeNames.get(TypeNames.java:103) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:404) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.mapping.Column.getSqlType(Column.java:238) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.StandardTableExporter.getSqlCreateStrings(StandardTableExporter.java:93) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.StandardTableExporter.getSqlCreateStrings(StandardTableExporter.java:31) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:326) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:169) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:138) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:124) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:168) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:85) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:335) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:471) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1498) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.25.jar!/:5.3.25] anchor-platform-sep-server-1 | ... 24 more
What did you expect to see instead?