I had the same problem. The problem was the key column used a reserved keyword (key).
But, according to https://stackoverflow.com/questions/2889871/how-do-i-escape-reserved-words-used-as-column-names-mysql-create-table (martin smith answer), it is possible to used reserved keyword for column name with back tick escaping. So using this configuration, it is working : cas.serviceRegistry.jpa.properties.hibernate.globally_quoted_identifiers= true It will configure the hibernate property globally_quoted_identifiers which will quoted all identifiers in the sql query (https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/appendices/Configurations.html#_quoting_options) create table `SamlRegisteredService_AttributeNameFormats` ( `SamlRegisteredService_id` bigint not null, `value` varchar(255), `key` varchar(255) not null, primary key (`SamlRegisteredService_id`, `key`) ) engine=InnoDB Le lundi 31 juillet 2017 22:58:45 UTC+2, maxwell_g a écrit : > > We are upgrading from 5.0.1 to 5.1.2 and receive an error when the > database is initialized. The following is set within the > management.properties to perform the initialization: > > > > cas.serviceRegistry.jpa.ddlAuto=create > > cas.serviceRegistry.initFromJson=true > > We are using mssql-jdbc version 6.2.0.jre8 and get the following error: > > > > Hibernate: create table SamlRegisteredService_AttributeNameFormats > (SamlRegisteredService_id bigint not null, value varchar(255), key > varchar(255) not null, primary key (SamlRegisteredService_id, key)) > > 2017-07-31 14:28:51,031 WARN > [org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl] - > <GenerationTarget encountered exception accepting command : Error executing > DDL via JDBC Statement> > > org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing > DDL via JDBC Statement > > > > Is SamlRegisteredService_AttributeNameFormats a new table? > > Is this table required? > > > > Thanks for any insight into this!! > > > > Thanks Gary > > > > . > -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- 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 cas-user+unsubscr...@apereo.org. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/02bd9844-ebbf-464e-9809-a9e5b94475e0%40apereo.org.