随笔分类 -  开发中常见的问题集

MyBatis的参数,不能传入null
摘要:今天在调试的过程中发现一个bug,把传入的参数写到查询分析器中执行没有问题,但是在程序中执行就报错:org.springframework.jdbc.UncategorizedSQLException : Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for... 阅读全文

posted @ 2017-01-24 13:27 peter.peng 阅读(2702) 评论(0) 推荐(0)

json 得到时分秒为00:00:00,拿不到时分秒 解决办法
摘要:数据库查询时间没有了时分秒的解决办法 问题出处,公司一个项目中使用动态sql方式查询Oracle数据库,在展示时Date类型字段只展示日期,无时分秒。 分析: 1、众所周知Oralce的日期类型有很多种,Date ,Timestamp等。其中Date类型对用的是java.sql.Date类型,Tim 阅读全文

posted @ 2016-09-14 16:59 peter.peng 阅读(3845) 评论(0) 推荐(0)

Maven Project configuration is not up-to-date with pom.xml错误解决方法
摘要:导入一个Maven项目之后发现有一个如下的错误:Project configuration is not up-to-date with pom.xml. Run project configuration update其实这个问题解决非常简单:在项目上右键——【Maven】——【Update Pr... 阅读全文

posted @ 2015-06-11 13:53 peter.peng 阅读(275) 评论(0) 推荐(0)

Write operations are not allowed in read-only mode
摘要:使用Spring提供的Open Session In View而引起Write operations are not allowed in read-only mode (FlushMode.NEVER) 错误解决:在没有使用Spring提供的Open Session In View情况下,因需要在... 阅读全文

posted @ 2014-12-02 10:40 peter.peng 阅读(477) 评论(0) 推荐(0)

eclipse(STS,myeclipse)老是报ThreadPoolExecutor$Worker.run()
摘要:资料地址:http://stackoverflow.com/questions/6290470/eclipse-debugger-always-blocks-on-threadpoolexecutor-without-any-obvious-exceptieclpise debug 模式的线程经常会... 阅读全文

posted @ 2014-11-17 15:00 peter.peng 阅读(550) 评论(0) 推荐(0)

Tomcat 自动上传的删除文件
摘要:解决方案:在sever.xml中的Context中建一个虚拟路径,指定到服务器硬盘中的其他位置,比如放在d:的某个目录下。同时可以将这个路径映射成为你当前工程名后面带个目录,比如说 /tsmart/control。如果访问http://localhost:8080/tsmart/control/xx... 阅读全文

posted @ 2014-11-17 14:50 peter.peng 阅读(462) 评论(0) 推荐(0)

org.hibernate.PersistentObjectException: detached entity passed to persist异常
摘要:再用jpa+spring+struts2开发的是时候遇到一个问题(采用了注解的方式,xml配置的道理是一样的),当我在注册用户的时候,注册第一个用户没有问题,但注册第二个用户开始就会抛出一个异常:javax.persistence.PersistenceException: org.hibernat... 阅读全文

posted @ 2014-10-24 15:02 peter.peng 阅读(6356) 评论(0) 推荐(0)