springboot关于日期报错No converter found capable of converting from type [java.util.Date] to type的解决
2021-01-30 20:44:37
在页面对时间操作时报错:nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.Date] to type [@org.springframework.format.annotation.DateTimeFormat java.sql.Date]]],提示无法将java.util.Date转换为DateTimeFormat java.sql.Date,经过简单分析,发现后者是我在实体类中加的注解@DateTimeFormat!本想格式化一下时间,没想到反而报错,是我草率了,将这个注解暂时注掉,时间可以正常显示了,只能说还是太年轻啊!
问题描述:
org.spr
ing
framework.core.
convert
.
Converter
NotFoundException: No
converter
found
ca
pable
of
convert
ing
from
type
[org.spr
ing
framework.data.jpa.repository.query.AbstractJpaQuery$Tuple
Converter
$TupleBackedMap] to
type
[com.pit.system.dto.SysUserRoleDto
Computers have gained a
ca
rdinal place in modern societies, thanks to higher efficiencies and miniaturisation. However, their dramatic progress will soon have to stop as the limits of miniaturisation are be
ing
reached. Furthermore, few people realise that those computers are, in fact, not as powerful as they seem to be. And while the world champion at Go lost to a computer, an average human still beats a computer at relatively easy tasks such as recognis
ing
an object in a picture.
Artificial intelligence is the key to more versatile comput
ing
machines
ca
pable
of solv
ing
such challeng
ing
tasks.
在anaconda虚拟环境下运行程序时,
报错
failed
ca
ll to cuInit: CUDA_ERROR_NO_DEVICE.
单独测试import tensorflow,可以成功调用GPU。
用ncvv -V,或nvidia-smi,都可以正常看到CUDA安装版本,及GPU使用情况。
上述分析说明,并非是GPU硬件、CUDA或TensorFlow-gpu安装问题,而应该是程序中的问题。
经检查,原因是在程序中,设置了CUDA_VISIBLE_DEVICES为1,但所使用的工作站没有设备号为1的GPU。
原之所以这样设置,是因为之前用的是公司工作站,有多个GPU大家分
The criti
ca
l find
ing
s associated with end-face total internal reflection (TIR) phenomemon we proved before are reported. In particular, these find
ing
s reveal that the end-face-TIR
ca
pable
rays experience enormous mode mix
ing
when encounter
ing
a roughened end face. As a result, 94% of the overall detectable power is contributed by this effect. With a smooth fiber end face, this figure is mere 52%. We interpret the mechanism behind these unusual phenomena and its signifi
ca
nce for the performance e
在使用 Spr
ing
Data JPA 时遇到
报错
:No
converter
found
ca
pable
of
convert
ing
from
type
[
java
.lang.Integer] to
type
[com.wchat.bean.Group]
报错
详细内容如下
org.spr
ing
framework.core.
convert
.
Converter
NotFoundException:...
思路:网上查找别人的说是版本引用问题,然后全局搜索(Ctrl+N)‘setMaxAliasesForCollections’竟然没查询到(查找到可以看到该版本和自己引用的版本是否一致)。
然后就想到直接可以在pom文件里查看jar之间的依赖关系图
今天在项目的启动类中,加上这行代码`@MapperS
ca
n("com.**.mapper")`后,启动项目时便报出下面的错误:No
converter
found
ca
pable
of
convert
ing
from
type
[
java
.lang.Str
ing
] to
type
[@org.spr
ing
framework.boot.context.properties.NestedConfigurationProperty org.apache.ibatis.session.Configuration]。
关于
java
.lang.NoSuchMethodError: org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(I)V
报错
的问题
这几天做一个项目的时候,出现了如下所示的错误:
07:17:04.750 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded exp
mongodb查询
报错
No
converter
found
ca
pable
of
convert
ing
from
type
[org.bson.BsonUndefined]
查询数据返回对象集合,出现了undifined数据,无法转换为实体类中的Str
ing
类型。
解决
办法
定位脏数据,删除或者修复数据
重点对脏数据如何产生进行排查,修改程序
mongodb查询undefined数据
db.getCollection('tableName').find({"fieldName":{$
如果你确定电脑的显卡及驱动支持opencl,
那么将C:\Windows\System32\OpenCL.dll
(n卡也可能是nvopencl.dll,A卡可以搜索下类似的文件,我自己是N卡没法测试)
(另外在C:\Windows\SysWOW64里也有个,不过我试的不行,system32的可以)
复制到john/run里并改名,替换原来的cygOpenCL-1.dll即可。
不过我用着这样还会出现独显测试失败无法运行的情况,这个实在没办法,也不想降级驱动,可以考虑使用hash
ca
t工具代替,比John符合
在接口中写入jpql语句想要查询表中的特定字段,接口中的代码如下:
@Query("select unitName, createTime, status, serviceCount, averageEval from UnitDetail")
List<UnitDetail> loadUnitDetailList();
使用postman测试时,存在错误信息如下:
·org.spr
ing
framework.core.
convert
.ConversionFailedExcep
Ca
used by: org.spr
ing
framework.core.
convert
.
Converter
NotFoundException: No
converter
found
ca
pable
of
convert
ing
from
type
[
java
.lang.Str
ing
] to
type
[
java
.sql.Driver]
at org.spr
ing
framework.core.
convert
.support.GenericConversionService.handle
Converter
...
今天在找转json的东西的时候,导了些jar包法相项目跑不动了,抱了这个错,好像是解析yaml的东西!
然后我把导入的东西都去掉了还是不行!可以说是满盘皆崩了!就很烦!
而且我感觉以后可能还会遇到这个问题,所以记录一下!
我百度了一下,大概就是jar包冲突了,可能我哪个包有这个包,
springboot
也有,然后就冲突了!
然后我全局找了一下,这个遗失的方法!ctrl+n 选symbols,然后这个方法是1.26版本的,boot里就是这个版本的,我找找还有什么地方有!
看了一下自己的pom里面是没有直接引