Hello again,
I'm wondering if causal-rest-api could also work with h2 instead of mySQL and HSQL?
I'm asking because it was easiest to set up h2 while setting up causal-web, while adding a configuration file and a dependency to the pom.xml file as in here.
With the same settings running causal-rest-api generates the error below:
$ java -jar causal-rest-api-1.0.0.jar
2019-09-03 18:15:05.488 INFO 10011 --- [ main] e.p.d.c.c.r.a.CausalRestApiApplication : Starting CausalRestApiApplication v1.0.0 on fwn-bborg-129-125-75-99 with PID 10011 (/home/p287664/software/causal-rest-api/target/causal-rest-api-1.0.0.jar started by p287664 in /home/p287664/software/causal-rest-api/target)
2019-09-03 18:15:05.496 INFO 10011 --- [ main] e.p.d.c.c.r.a.CausalRestApiApplication : The following profiles are active: scheduler,h2
2019-09-03 18:15:05.640 INFO 10011 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@619a5dff: startup date [Tue Sep 03 18:15:05 CEST 2019]; root of context hierarchy
2019-09-03 18:15:07.449 INFO 10011 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'requestContextFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class]] with [Root bean: class [org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2019-09-03 18:15:07.663 INFO 10011 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'managementServletContext' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.class]]
2019-09-03 18:15:08.779 INFO 10011 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-09-03 18:15:09.160 INFO 10011 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ce16ab12] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-03 18:15:09.799 INFO 10011 --- [ main] org.eclipse.jetty.util.log : Logging initialized @5895ms to org.eclipse.jetty.util.log.Slf4jLog
2019-09-03 18:15:09.992 INFO 10011 --- [ main] e.j.JettyEmbeddedServletContainerFactory : Server initialized with port: 9000
2019-09-03 18:15:09.999 INFO 10011 --- [ main] org.eclipse.jetty.server.Server : jetty-9.4.7.v20170914
2019-09-03 18:15:10.559 INFO 10011 --- [ main] org.eclipse.jetty.server.session : DefaultSessionIdManager workerName=node0
2019-09-03 18:15:10.560 INFO 10011 --- [ main] org.eclipse.jetty.server.session : No SessionScavenger set, using defaults
2019-09-03 18:15:10.566 INFO 10011 --- [ main] org.eclipse.jetty.server.session : Scavenging every 660000ms
2019-09-03 18:15:10.575 INFO 10011 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring embedded WebApplicationContext
2019-09-03 18:15:10.577 INFO 10011 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4941 ms
2019-09-03 18:15:11.518 INFO 10011 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'edu.pitt.dbmi.ccd.causal.rest.api.conf.JerseyConfig' to [/*]
2019-09-03 18:15:11.523 INFO 10011 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2019-09-03 18:15:11.525 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
2019-09-03 18:15:11.525 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-09-03 18:15:11.525 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-09-03 18:15:11.527 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-09-03 18:15:11.527 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-09-03 18:15:11.527 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2019-09-03 18:15:11.527 INFO 10011 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2019-09-03 18:15:11.536 INFO 10011 --- [ main] o.e.jetty.server.handler.ContextHandler : Started o.s.b.c.e.j.JettyEmbeddedWebAppContext@6c779568{/ccd-api,[file:///tmp/jetty-docbase.4294236600939947476.9000/],AVAILABLE}
2019-09-03 18:15:11.537 INFO 10011 --- [ main] org.eclipse.jetty.server.Server : Started @7635ms
2019-09-03 18:15:12.682 INFO 10011 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2019-09-03 18:15:15.713 WARN 10011 --- [ main] ationConfigEmbeddedWebApplicationContext : 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/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
2019-09-03 18:15:15.722 INFO 10011 --- [ main] org.eclipse.jetty.server.session : Stopped scavenging
2019-09-03 18:15:15.726 INFO 10011 --- [ main] o.e.jetty.server.handler.ContextHandler : Stopped o.s.b.c.e.j.JettyEmbeddedWebAppContext@6c779568{/ccd-api,[file:///tmp/jetty-docbase.4294236600939947476.9000/],UNAVAILABLE}
2019-09-03 18:15:15.755 INFO 10011 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-09-03 18:15:15.777 ERROR 10011 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEASE]
at edu.pitt.dbmi.ccd.causal.rest.api.CausalRestApiApplication.main(CausalRestApiApplication.java:41) [classes!/:1.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [causal-rest-api-1.0.0.jar:1.0.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [causal-rest-api-1.0.0.jar:1.0.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [causal-rest-api-1.0.0.jar:1.0.0]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [causal-rest-api-1.0.0.jar:1.0.0]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:360) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:382) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:371) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:336) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
... 24 common frames omitted
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table "oauth_client_details" ("client_id" varchar(255) not null, "access_token_validity" "INT(11)", "additional_information" varchar(4096), "authorities" varchar(255), "authorized_grant_types" varchar(255), "autoapprove" varchar(255), "client_secret" varchar(255), "refresh_token_validity" "INT(11)", "resource_ids" varchar(255), "scope" varchar(255), "web_server_redirect_uri" varchar(255), primary key ("client_id"))]
at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.schema.internal.SchemaMigratorImpl.createTable(SchemaMigratorImpl.java:236) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:167) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:472) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
... 31 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Unknown data type: "INT(11)"; SQL statement:
create table "oauth_client_details" ("client_id" varchar(255) not null, "access_token_validity" "INT(11)", "additional_information" varchar(4096), "authorities" varchar(255), "authorized_grant_types" varchar(255), "autoapprove" varchar(255), "client_secret" varchar(255), "refresh_token_validity" "INT(11)", "resource_ids" varchar(255), "scope" varchar(255), "web_server_redirect_uri" varchar(255), primary key ("client_id")) [50004-199]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[h2-1.4.199.jar!/:na]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[h2-1.4.199.jar!/:na]
at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.199.jar!/:na]
at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parseColumnWithType(Parser.java:5524) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parseColumnForTable(Parser.java:5254) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parseTableColumnDefinition(Parser.java:7932) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parseCreateTable(Parser.java:7832) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parseCreate(Parser.java:5818) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parsePrepared(Parser.java:846) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parse(Parser.java:788) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.parse(Parser.java:760) ~[h2-1.4.199.jar!/:na]
at org.h2.command.Parser.prepareCommand(Parser.java:683) ~[h2-1.4.199.jar!/:na]
at org.h2.engine.Session.prepareLocal(Session.java:627) ~[h2-1.4.199.jar!/:na]
at org.h2.engine.Session.prepareCommand(Session.java:565) ~[h2-1.4.199.jar!/:na]
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1292) ~[h2-1.4.199.jar!/:na]
at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:165) ~[h2-1.4.199.jar!/:na]
at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:126) ~[h2-1.4.199.jar!/:na]
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222]
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) ~[tomcat-jdbc-8.5.23.jar!/:na]
at com.sun.proxy.$Proxy116.executeUpdate(Unknown Source) ~[na:na]
at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56) ~[hibernate-core-5.0.12.Final.jar!/:5.0.12.Final]
... 41 common frames omitted
If it is not much to ask, a workaround with h2 would really be appreciated, as it has been quite straight forward to work with it thus far. Else, would you kindly be able to provide a hint into configuring mySQL? I tried to download a server from here, but I see this application (MySQL Workbench) in my PC (shared university PC, so no root access); but I'm not sure where to go

My due gratitudes, and apologies for the volume of these issues.
Kind regards,
Azza
Hello again,
I'm wondering if
causal-rest-apicould also work withh2instead ofmySQLandHSQL?I'm asking because it was easiest to set up
h2while setting up causal-web, while adding a configuration file and a dependency to thepom.xmlfile as in here.With the same settings running
causal-rest-apigenerates the error below:If it is not much to ask, a workaround with h2 would really be appreciated, as it has been quite straight forward to work with it thus far. Else, would you kindly be able to provide a hint into configuring mySQL? I tried to download a server from here, but I see this application (MySQL Workbench) in my PC (shared university PC, so no root access); but I'm not sure where to go
My due gratitudes, and apologies for the volume of these issues.
Kind regards,
Azza