[转载]程序开发常见错误
(2011-06-19 14:28:13)
标签:
转载
谢谢
项目中遇到的错误
sql错误
找不到列
Unknown column 'fillMen' in 'field list'
2.列名在sql语句中写了2次
Column 'fillMan' specified
twice
3.下面2条 数据库插入对应的列都是int类型的 所插入的数据类型不符合要求时报错
Data truncated for column 'gatheringMoney' at row 1
Data truncation: Out of range value adjusted for column 'amount' at
row 1
4.
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP
columns is illegal if there is no GROUP BY clause
5.修改一个表时无法取得同一个表的数据
ERROR 1093 (HY000): You can't specify target table 'context' for
update in FROM
clause
6.主键 未自动增长
ERROR 1062 :
7.int 类型字符过长
com.mysql.jdbc.exceptions.MySQLDataException: '2.5026744582E10' in
column '1' is outside valid range for the datatype INTEGER.
8.没找到错误 没影响数据读取
java.sql.SQLException: Operation not allowed after ResultSet
closed
9.类型错误 最常见的是数字类型错误
Data truncated for column 'gatheringMoney' at row 1
10.换另一个项目时 数据库连接池没换 (未解)
Name java: is not bound in this Context
换了之后 似乎还是不行
=====
java:/comp/env/jdbc/ConnSqlSer
前面多了一个'/'
应为java:comp/env/jdbc/ConnSqlSer
=======
11.(未解)
java.sql.SQLException: QueryRunner requires a DataSource to be
invoked in this way, or a Connection should be passed in
12.executeQuery()方法改成execute()(未解)
Can not issue data manipulation statements with
executeQuery().
Can not issue data manipulation statements with
executeQuery().
struts错误
Failed to obtain specified collection 下拉框没值
警告: No FormBeanConfig found under 'yuanLiaoRuKuForm'
配置文件Form出错
Cannot find bean: "org.apache.struts.taglib.html.BEAN" in any
scope
>标签外面没有嵌套
>标签
No getter method for property: "outDate" of bean:
"com.System.storage.form.YuanliaoPandianForm"
在form里面没有定义 此字段的get方法
Cannot get a connection, pool error Timeout waiting for idle object
数据库错误
Operation not allowed after ResultSet closed 可能是结果集关闭了
//在Action里面调用的DAO类 没有进行重新实例化
2008-5-12 20:02:09 org.apache.struts.action.RequestProcessor
processException
警告: Unhandled Exception thrown: class
java.lang.NullPointerException
2008-5-12 20:02:09 org.apache.catalina.core.StandardWrapperValve
invoke
严重: Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at
com.System.storage.action.FinishedAction.finishedCheckAdd(FinishedAction.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
//在C标签里从一个对象里取值时 , 所请求的是对象里没有的属性
An error occurred while uating custom action attribute "value"
with value "