Thanks Dmitriy for your response and recommendation. Both work fine.
Thanks. Ayé Rayé Le samedi 18 février 2017 23:01:02 UTC+1, Dmitriy Kopylenko a écrit : > > Make sure that this property is set to “update”: > > *cas.serviceRegistry.jpa.ddlAuto=update* > > Or even better, in production never rely on this Hibernate feature to mess > with your DB schema during bootstrap. I’d recommend, creating the schema > via this Hibernate mechanism once in dev/test environment then “export” the > DDL by native RDBMS means and manually create/maintain this DB schema in > production. Set this prop in prod to > *cas.serviceRegistry.jpa.ddlAuto=none* > > Cheers, > D. > > > From: Ayé Rayé <[email protected]> <javascript:> > Reply: [email protected] <javascript:> <[email protected]> <javascript:> > Date: February 18, 2017 at 2:19:34 PM > To: CAS Community <[email protected]> <javascript:> > Subject: [cas-user] Cas 5.0.2 et Cas Services Management : tables > containing services registry are deleted every time I stop tomcat > > Hello hello, > > I did a CAS 5.0.2 installation with Cas Services Management installed with > persistent services on MariaDB database. It seems to me that everything > works well except that: > Each time the Tomcat is stopped, the tables in the database containing the > services registry are deleted. When I start the Tomcat, the tables are > recreated and of course my previous additions of services are lost. > > What did I miss in my setup? Thanks for your help. > > > *In cas.properties* > cas.serviceRegistry.jpa.healthQuery=SELECT 1 FROM > INFORMATION_SCHEMA.SYSTEM_VARIABLES > # cas.serviceRegistry.jpa.isolateInternalQueries=false > cas.serviceRegistry.jpa.url=jdbc:mysql:// > 127.0.0.1:3307/cas-service-registry > # cas.serviceRegistry.jpa.failFast=true > cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL5Dialect > # cas.serviceRegistry.jpa.leakThreshold=10 > # cas.serviceRegistry.jpa.batchSize=1 > # cas.serviceRegistry.jpa.defaultCatalog= > # cas.serviceRegistry.jpa.defaultSchema= > cas.serviceRegistry.jpa.user=root > # cas.serviceRegistry.jpa.ddlAuto=create-drop > cas.serviceRegistry.jpa.password=root > cas.serviceRegistry.jpa.autocommit=true > cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver > cas.serviceRegistry.jpa.idleTimeout=5000 > > # cas.serviceRegistry.jpa.pool.suspension=false > # cas.serviceRegistry.jpa.pool.minSize=6 > # cas.serviceRegistry.jpa.pool.maxSize=18 > # cas.serviceRegistry.jpa.pool.maxIdleTime=1000 > # cas.serviceRegistry.jpa.pool.maxWait=2000 > > > in *management.properties* > *cas.serviceRegistry.initFromJson=false* > > *cas.serviceRegistry.jpa.healthQuery=SELECT 1 FROM > INFORMATION_SCHEMA.SYSTEM_VARIABLES* > *# cas.serviceRegistry.jpa.isolateInternalQueries=false* > * > cas.serviceRegistry.jpa.url=jdbc:mysql://127.0.0.1:3307/cas-service-registry > <http://127.0.0.1:3307/cas-service-registry>* > *# cas.serviceRegistry.jpa.failFast=true* > * cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL5Dialect* > *# cas.serviceRegistry.jpa.leakThreshold=10* > *# cas.serviceRegistry.jpa.batchSize=1* > *# cas.serviceRegistry.jpa.defaultCatalog=* > *# cas.serviceRegistry.jpa.defaultSchema=* > * cas.serviceRegistry.jpa.user=root* > * cas.serviceRegistry.jpa.ddlAuto=* > * cas.serviceRegistry.jpa.password=root* > * cas.serviceRegistry.jpa.autocommit=true* > * cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver* > * cas.serviceRegistry.jpa.idleTimeout=5000* > > *# cas.serviceRegistry.jpa.pool.suspension=false* > *# cas.serviceRegistry.jpa.pool.minSize=6* > *# cas.serviceRegistry.jpa.pool.maxSize=18* > *# cas.serviceRegistry.jpa.pool.maxIdleTime=1000* > *# cas.serviceRegistry.jpa.pool.maxWait=2000* > > > -- > - CAS gitter chatroom: https://gitter.im/apereo/cas > - CAS mailing list guidelines: > https://apereo.github.io/cas/Mailing-Lists.html > - CAS documentation website: https://apereo.github.io/cas > - CAS project website: https://github.com/apereo/cas > --- > You received this message because you are subscribed to the Google Groups > "CAS Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/368d3011-07ab-4f83-879d-d7674cc2dab1%40apereo.org > > <https://groups.google.com/a/apereo.org/d/msgid/cas-user/368d3011-07ab-4f83-879d-d7674cc2dab1%40apereo.org?utm_medium=email&utm_source=footer> > . > > -- - CAS gitter chatroom: https://gitter.im/apereo/cas - CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html - CAS documentation website: https://apereo.github.io/cas - CAS project website: https://github.com/apereo/cas --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/b1f2610b-6d3c-45b1-85d6-001258d27ed0%40apereo.org.
