2017-12-12

建SQLite数据库表时,遇到外键关联报错:foreign key mismatch

解决:发现是个粗心问题,关联的外键没有作为主键,原因是关联的外键由INT改为varchar字符型,取消主键自增的同时把主键也取消了


2017-12-12

mybatis配置SQLite的是时候数据源不正确

SSM项目启动时报错:the JDBC Driver has been forcibly unregistered.

参考:

http://blog.csdn.net/hj7jay/article/details/51686418    数据库阿里连接池 druid配置详解


2017-12-14

Mybatis访问sqlite数据库时,查询和插入没有效果,原因:

①SSM框架访问的sqlite数据库db文件和sqlite客户端工具sqlite expert professional访问的db文件不是同一个

②另外sqlite插入语句又主键自增的可设null值再插入数据库,自动会自增

 Message msg = new Message();
msg.setMsgno(null);
<insert id="addMsg" parameterType="Message">
insert into message(msgno,specno,senddate,notes) values(
#{msgno},
#{specno},
#{senddate},
#{notes}
)
</insert>

2017-12-14

报错

[WARN] Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class org.springframework.validation.DefaultMessageCodesResolver and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["content"]->org.springframework.validation.support.BindingAwareModelMap["org.springframework.validation.BindingResult.toolObj"]->org.springframework.validation.BeanPropertyBindingResult["messageCodesResolver"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.springframework.validation.DefaultMessageCodesResolver and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["content"]->org.springframework.validation.support.BindingAwareModelMap["org.springframework.validation.BindingResult.toolObj"]->org.springframework.validation.BeanPropertyBindingResult["messageCodesResolver"])
2017-12-14 10:27:44,755 [http-bio-8090-exec-2] [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver]-[WARN] Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class org.springframework.validation.DefaultMessageCodesResolver and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["content"]->org.springframework.validation.support.BindingAwareModelMap["org.springframework.validation.BindingResult.toolObj"]->org.springframework.validation.BeanPropertyBindingResult["messageCodesResolver"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.springframework.validation.DefaultMessageCodesResolver and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["content"]->org.springframework.validation.support.BindingAwareModelMap["org.springframework.validation.BindingResult.toolObj"]->org.springframework.validation.BeanPropertyBindingResult["messageCodesResolver"])
2017-12-14 10:27:44,755 [http-bio-8090-exec-2] [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Null ModelAndView returned to DispatcherServlet with name 'springmvc': assuming HandlerAdapter completed request handling
2017-12-14 10:27:44,755 [http-bio-8090-exec-1] [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Null ModelAndView returned to DispatcherServlet with name 'springmvc': assuming HandlerAdapter completed request handling
2017-12-14 10:27:44,756 [http-bio-8090-exec-2] [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Successfully completed request
2017-12-14 10:27:44,756 [http-bio-8090-exec-1] [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Successfully completed request
2017-12-14 10:27:44,757 [http-bio-8090-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Returning cached instance of singleton bean 'sqlSessionFactory'

解决,把Model换成Map<String,Object>


2017-12-18

java插入sqlite时间总是为

1899-12-30

解决

senddate=DateUtil.getDateToString(DateUtil.getStringToDate("s"));

日常bug整理--xxtz的更多相关文章

  1. 日常Bug排查-系统失去响应-Redis使用不当

    日常Bug排查-系统失去响应-Redis使用不当 前言 日常Bug排查系列都是一些简单Bug排查,笔者将在这里介绍一些排查Bug的简单技巧,同时顺便积累素材_. Bug现场 开发反应线上系统出现失去响 ...

  2. 日常Bug排查-消息不消费

    日常Bug排查-消息不消费 前言 日常Bug排查系列都是一些简单Bug排查,笔者将在这里介绍一些排查Bug的简单技巧,同时顺便积累素材_. Bug现场 某天下午,在笔者研究某个问题正high的时候.开 ...

  3. 日常Bug排查-抛异常不回滚

    日常Bug排查-抛异常不回滚 前言 日常Bug排查系列都是一些简单Bug排查,笔者将在这里介绍一些排查Bug的简单技巧,同时顺便积累素材_. Bug现场 最近有人反映java应用操作数据库的时候,抛异 ...

  4. 日常Bug排查-Nginx重复请求?

    日常Bug排查-Nginx重复请求? 前言 日常Bug排查系列都是一些简单Bug排查,笔者将在这里介绍一些排查Bug的简单技巧,其中不乏一些看起来很低级但很容易犯的问题. 问题现场 有一天运维突然找到 ...

  5. IE6常见bug整理

    By Diaoyude  | 发布时间: 09-08 09:47  | Hits:1,253 | Post in: WEB前端 , Div-Css 针对IE6常见的一些ie6bug,ie6png,E6 ...

  6. EasyUI特殊情况下的BUG整理

    前面有两篇: Easyui - combo[tree,box]下拉图标有间隙bug解决方法 http://blog.csdn.net/isea533/article/details/12996561 ...

  7. Bug整理——$(window).height()获取到$(document).height()的问题

    想看解决方案不想看无聊乏味的bug解决过程的同学,请直接跳转到页面底部~ 今天在做项目的过程中遇到了一个BUG,项目中需要获取到浏览器客户区的高度以方便做一些适应性调整,代码如下: $(documen ...

  8. 6、android开发中遇到的bug整理

    1.使用actionProvider时出现的问题 bug复现: 解决方案: //import android.support.v4.view.ActionProvider; import androi ...

  9. 日常bug及解决方法记录

    工作中经常会遇到一些Bug,时间长了有时候就忘记了,这样不好. 特地在这加一个随笔,把以后出现的有价值一点的bug记录在这里,提醒自己,也可以给刚入门的同学一些参考,避免这些坑. 1:界面已经销毁,代 ...

随机推荐

  1. [413D][搜索]D - Field expansion

    http://codeforces.com/contest/799/problem/D 解题关键:因为3^11>100000,所以若只把2单独拿出,最多只需要暴力2^11次,故只需要dfs一下即 ...

  2. mongodb插入时间

    插入时间: db.test.insert({time:new Date()}) 给mongodb插入日期格式的数据时发现,日期时间相差8个小时,原来存储在mongodb中的时间是标准时间UTC +0: ...

  3. Java Learning 001 新建一个Java工程 HelloWorld程序

    Java Learning 001 新建一个Java工程 HelloWorld程序 Step 1 . 在Eclipse 软件里,点击: File -> New -> Java Projec ...

  4. 将Linux 标准输出,错误输出重定向到文件

    1.想要把make输出的全部信息,输出到某个文件中,最常见的办法就是: make xxx > build_output.txt 此时默认情况是没有改变2=stderr的输出方式,还是屏幕,所以, ...

  5. 【机器学习】主题模型(二):pLSA和LDA

      -----pLSA概率潜在语义分析.LDA潜在狄瑞雷克模型 一.pLSA(概率潜在语义分析) pLSA:    -------有过拟合问题,就是求D, Z, W pLSA由LSA发展过来,而早期L ...

  6. Flask 入门(第二篇)

    1. 数据库 Flask 没有限定使用哪种数据库,不管是 SQL 还是 NoSQL.如果你不想自己编写负责的 SQL语句的话,你也可以使用 ORM,通过 SQLALchemy 即可实现. 1.1 SQ ...

  7. .Net Core WebApi返回日期格式的问题

    环境:.net core 2.1 webapi 问题简介: 返回DateTime,前端接收到的字符有时候为2018-01-01T12:01:01,有时候为2018-01-01T01:01:01.722 ...

  8. Spring Cloud 简介

    SpringCloud 简介 SpringCloud是一个基于SpringBoot实现的微服务架构开发工具.它为微服务架构中涉及的配置管理.服务治理.断路器.智能路由.微代理.控制总线.全局锁.决策竞 ...

  9. [Windows]获取当前时间(年/月/日/时/分/秒)

    struct tm* GetCurTime(time_t inTime) { struct tm* curTime = localtime(&inTime); curTime->tm_y ...

  10. 使用配置类而不使用XML文件(代替bean.xml)对spring进行配置

    以下类是一个配置类,它的作用和bean.xml是一样的注解: @Configuration 作用: 用于指定当前类是一个spring配置类,当创建容器时会从该类上加载注解. 获取容器时需要使用Anno ...