-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Labels
type: regressionA regression from a previous releaseA regression from a previous release
Milestone
Description
The fix for Issue #2147 means that calling org.springframework.boot.data.jdbc.autoconfigure.DataJdbcDatabaseDialect.values()
fails with a ClassNotFoundException
. This means that Spring Boot can no longer bind correctly:
Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.data.jdbc.dialect' to org.springframework.boot.data.jdbc.autoconfigure.DataJdbcDatabaseDialect
at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:418)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:377)
at org.springframework.boot.context.properties.bind.Binder.lambda$5(Binder.java:505)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:127)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:115)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:71)
at org.springframework.boot.context.properties.bind.Binder.lambda$7(Binder.java:508)
at org.springframework.boot.context.properties.bind.Binder.fromDataObjectBinders(Binder.java:517)
at org.springframework.boot.context.properties.bind.Binder.lambda$6(Binder.java:507)
at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:632)
at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:618)
at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:509)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:445)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:373)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:360)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:287)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:274)
at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:96)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:101)
... 146 more
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [org.springframework.boot.data.jdbc.autoconfigure.DataJdbcDatabaseDialect] for value [postgresql]
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:181)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:113)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:104)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:96)
at org.springframework.boot.context.properties.bind.Binder.bindProperty(Binder.java:491)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:434)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:373)
... 163 more
Caused by: java.lang.NoClassDefFoundError: microsoft/sql/DateTimeOffset
at org.springframework.data.jdbc.core.dialect.JdbcSqlServerDialect.<clinit>(JdbcSqlServerDialect.java:44)
at org.springframework.boot.data.jdbc.autoconfigure.DataJdbcDatabaseDialect.<clinit>(DataJdbcDatabaseDialect.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.lang.Class.getEnumConstantsShared(Class.java:3838)
at java.base/java.lang.Class.enumConstantDirectory(Class.java:3860)
at java.base/java.lang.Enum.valueOf(Enum.java:267)
at org.springframework.boot.convert.LenientObjectToEnumConverterFactory$LenientToEnumConverter.convert(LenientObjectToEnumConverterFactory.java:79)
at org.springframework.boot.convert.LenientObjectToEnumConverterFactory$LenientToEnumConverter.convert(LenientObjectToEnumConverterFactory.java:1)
at org.springframework.core.convert.support.GenericConversionService$ConverterFactoryAdapter.convert(GenericConversionService.java:406)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41)
... 170 more
Caused by: java.lang.ClassNotFoundException: microsoft.sql.DateTimeOffset
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 183 more
I think that DataJdbcDatabaseDialect
should either be updated to lazily obtain the Dialect
, or JdbcSqlServerDialect.SIMPLE_TYPES
should be moved to the simpleTypes()
method.
Metadata
Metadata
Assignees
Labels
type: regressionA regression from a previous releaseA regression from a previous release