为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:docker-dm8
【操作系统】:Windows 10 专业版 21H1
【CPU】:Intel® Core™ i5-10210U CPU @ 1.60GHz 2.11 GHz
【问题描述】*:不支持JDK8 时间格式
<dependency>
<groupId>com.dameng</groupId>
<artifactId>Dm8JdbcDriver18</artifactId>
<version>8.1.1.49</version>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmDialect-for-hibernate5.3</artifactId>
<version>8.1.2.79</version>
</dependency>
Dm8JdbcDriver18使用支持JDK8版本的,数据类型为"TIME_SIGN" DATE NOT NULL
在后台处理里使用LocalDate进行传参,提示dm.jdbc.driver.DMException: Not support this type
nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='timeSign', mode=IN, javaType=class java.time.LocalDate, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #3 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: dm.jdbc.driver.DMException: Not support this type
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) ~[mybatis-spring-2.0.5.jar!/:2.0.5]
at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.executeBatch(SqlHelper.java:189) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.executeBatch(SqlHelper.java:211) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.saveOrUpdateBatch(SqlHelper.java:239) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.saveOrUpdateBatch(ServiceImpl.java:171) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at com.baomidou.mybatisplus.extension.service.IService.saveOrUpdateBatch(IService.java:89) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>) ~[mybatis-plus-extension-3.4.0.jar!/:3.4.0]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [spring-core-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) ~[spring-tx-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[spring-tx-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) [spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
同样的LocalDateTime,LocalTime也不支持,都会抛出 Cause: dm.jdbc.driver.DMException: Not support this type
所以localDate类型的怎么处理的?
这个问题有结论吗?
你这个版本有点老了,建议去下载新版本,然后验证下是否支持