資源描述:
《Java編程中常見的錯(cuò)誤有哪些》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、Java編程中常見的錯(cuò)誤有哪些?sql錯(cuò)誤找不到列Unknowncolumn‘fillMen’in‘fieldlist’2.列名在sql語句中寫了2次Column‘fillMan’specifiedtwice3.下面2條數(shù)據(jù)庫插入對應(yīng)的列都是int類型的所插入的數(shù)據(jù)類型不符合要求時(shí)報(bào)錯(cuò)Datatruncatedforcolumn‘gatheringMoney’atrow1Datatruncation:Outofrangevalueadjustedforcolumn‘a(chǎn)mount’atrow14.MixingofGROUPcolumns(MIN(),MAX(),
2、COUNT(),…)withnoGROUPcolumnsisillegalifthereisnoGROUPBYclause5.修改一個(gè)表時(shí)無法取得同一個(gè)表的數(shù)據(jù)ERROR1093(HY000):Youcan’tspecifytargettable‘context’forupdateinFROMclause6.主鍵未自動(dòng)增長ERROR1062:7.int類型字符過長com.mysql.jdbc.exceptions.MySQLDataException:’2.5026744582E10′incolumn’1′isoutsidevalidrangefortheda
3、tatypeINTEGER.8.沒找到錯(cuò)誤沒影響數(shù)據(jù)讀取java.sql.SQLException:OperationnotallowedafterResultSetclosed9.類型錯(cuò)誤最常見的是數(shù)字類型錯(cuò)誤Datatruncatedforcolumn‘gatheringMoney’atrow110.換另一個(gè)項(xiàng)目時(shí)數(shù)據(jù)庫連接池沒換(未解)Namejava:isnotboundinthisContext換了之后似乎還是不行=====java:/comp/env/jdbc/ConnSqlSer前面多了一個(gè)’/’應(yīng)為java:comp/env/jdbc/Conn
4、SqlSer=======11.(未解)java.sql.SQLException:QueryRunnerrequiresaDataSourcetobeinvokedinthisway,oraConnectionshouldbepassedin12.executeQuery()方法改成execute()(未解)CannotissuedatamanipulationstatementswithexecuteQuery().CannotissuedatamanipulationstatementswithexecuteQuery().struts錯(cuò)誤Failed
5、toobtainspecifiedcollection下拉框沒值警告:NoFormBeanConfigfoundunder‘yuanLiaoRuKuForm’配置文件Form出錯(cuò)Cannotfindbean:“org.apache.struts.taglib.html.BEAN”inanyscope標(biāo)簽外面沒有嵌套標(biāo)簽Nogettermethodforproperty:“outDate”ofbean:“com.System.storage.form.YuanliaoPandianForm”在form里面沒有定義此字段
6、的get方法Cannotgetaconnection,poolerrorTimeoutwaitingforidleobject數(shù)據(jù)庫錯(cuò)誤OperationnotallowedafterResultSetclosed可能是結(jié)果集關(guān)閉了//在Action里面調(diào)用的DAO類沒有進(jìn)行重新實(shí)例化2008-5-1220:02:09org.apache.struts.action.RequestProcessorprocessException警告:UnhandledExceptionthrown:classjava.lang.NullPointerException200
7、8-5-1220:02:09org.apache.catalina.core.StandardWrapperValveinvoke嚴(yán)重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.System.storage.action.FinishedAction.finishedCheckAdd(FinishedAction.java:151)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeM
8、ethod)//在C標(biāo)簽里從一個(gè)對象里