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. [51nod1138]正整数分解为几个连续自然数之和

    解题关键:注意为什么上界是$\sqrt {2n} $ 因为函数是关于m的递减函数,而结果必须为正整数 $a = \frac{{2n + m - {m^2}}}{{2m}} = \frac{n}{m} ...

  2. display与position之间的关系

    以防自己忘记写的 网上找的 positon 与 display 的相互关系 元素分为内联元素和区块元素两类(当然也有其它的),在内联元素中有个非常重要的常识,即内两元素是不可以设置区块元素所具有的样式 ...

  3. OpenGL 使用GLFW创建全屏窗口

    OpenGL 使用GLFW创建全屏窗口 GLFW库里面的glfwCreateWindow()函数是用来创建窗口的函数. 这样函数的原型是: GLFWwindow* glfwCreateWindow(i ...

  4. TCP三次握手四次挥手原理

    转自http://www.cnblogs.com/liuxiaoming/archive/2013/04/27/3047803.html TCP协议三次握手原理: 首先,给张图片,建立TCP三次握手的 ...

  5. iis应用程序池没有fromwork 4.0-----安装iis

    找到已经安装的目录  C:\Windows\Microsoft.NET\Framework\v4.0.30319  以管理员身份运行一下就ok 安装iis 控制面板-程序与功能-打开与关闭window ...

  6. C# 中的EventHandler实例详解-转

    //这里定义了一个水箱类 public class 水箱 {   //这是水箱的放水操作   public void 放水() { }   //这是水箱的属性   public double 体积; ...

  7. 2017-10-18 NOIP模拟赛

    纸牌游戏 #include<iostream> #include<cstdio> #include<ctime> #include<cstdlib> # ...

  8. JavaWeb:Cookie处理和Session跟踪

    JavaWeb:Cookie处理和Session跟踪 Cookie处理 什么是Cookie Cookie 是存储在客户端计算机上的文本文件,保留了各种跟踪信息.因为HTTP协议是无状态的,即服务器不知 ...

  9. 动手写一个简单版的谷歌TPU-矩阵乘法和卷积

    谷歌TPU是一个设计良好的矩阵计算加速单元,可以很好的加速神经网络的计算.本系列文章将利用公开的TPU V1相关资料,对其进行一定的简化.推测和修改,来实际编写一个简单版本的谷歌TPU.计划实现到行为 ...

  10. windows severs 2008r2 180天激活

    无需破解:Windows Server 2008 R2 至少免费使用 900天 1.首先安装后,有一个180天的试用期. 2.在180天试用期即将结束时,使用下面的评估序列号激活Svr 2008 R2 ...