jerryWebSpider
jerryWebSpider copied to clipboard
运行后下载完一个压缩包后必定报错
报错内容:
ERROR 6893 --- [pool-1-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Duplicate entry '0' for key 'PRIMARY'
ERROR 6893 --- [pool-1-thread-1] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
ERROR 6893 --- [pool-1-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Data truncation: Data too long for column 'stack_dump' at row 1
ERROR 6893 --- [pool-1-thread-1] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.DataException: could not execute statement]
spider_task表:
报错内容:
ERROR 6893 --- [pool-1-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Duplicate entry '0' for key 'PRIMARY' ERROR 6893 --- [pool-1-thread-1] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement] ERROR 6893 --- [pool-1-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Data truncation: Data too long for column 'stack_dump' at row 1 ERROR 6893 --- [pool-1-thread-1] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.DataException: could not execute statement]
spider_task表:
到数据库里把tuwan_images表中id为0的记录的id改为任意非0值,然后把spider_task表对应的tuwanDownloadTask记录的status置为0,然后重新运行下载程序即可。 ps:我也不知道为什么id为0的记录那条无法更新,我是手动把第0条记录该掉就ok了
org.springframework.data.repository.core.support.AbstractEntityInformation
/*
* (non-Javadoc)
* @see org.springframework.data.repository.core.EntityInformation#isNew(java.lang.Object)
*/
public boolean isNew(T entity) {
ID id = getId(entity);
Class<ID> idType = getIdType();
if (!idType.isPrimitive()) {
return id == null;
}
if (id instanceof Number) { // 这里的判断导致了你所遇到的问题
return ((Number) id).longValue() == 0L;
}
throw new IllegalArgumentException(String.format("Unsupported primitive id type %s!", idType));
}
兔玩图库更新咋办啊?大佬
兔玩图库更新咋办啊?大佬
看了下,目前没什么好的方法,只能刷存货了,2333