js錯誤
-
Uncaught TypeError: Cannot read property
常見於在渲染UI組件時對於狀態的初始化操作不當 -
(unknown): Script error
被瀏覽器的跨域策略限制時,會產生這類的腳本錯誤 -
TypeError: ‘undefined’ is not a function
調用未定義的函數時 -
Uncaught RangeError: Maximum call stack
調用一個不終止的遞歸函數;js庫衝突 -
TypeError: Cannot read property ‘length’
讀取未定義變量的長度屬性 -
Uncaught TypeError: Cannot set property
獲取或設置一個未定義變量的任何未定義的屬性 -
ReferenceError: event is not defined
訪問未定義的變量或超出當前範圍的變量 -
Uncaught SyntaxError: Unexpected identifier
語法錯誤,缺少符號 -
Uncaught SyntaxError: Unexpected token ILLEGAL
語法錯誤,引號不匹配 -
Uncaught SyntaxError: Unexpected token o
JSON.parse(s)中的s不是字符串
Java異常
tomcat的work目錄下面的東西刪一遍。
hibernate映射文件錯誤
運行時異常,所有jvm異常的父類
-
java.lang.IllegalArgumentException:
Can not find a java.io.InputStream with the name [downloadFile] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
action中缺少相應的方法
Struts報錯
- HTTP Status 404-There is no Action mapped for namespace[/] and action name [ActionName] associated with context path [/status]
- 未定義action;或拼寫錯誤;或大小寫不一致
- 多個status配置文件中的包名或命名空間衝突
- struts.xml文件名錯誤。一定要注意拼寫問題;
- struts.xml文件放置路徑錯誤。一定要將此文件放置在src目錄下。編譯成功後,要確認是否編譯到classes目錄中;
- struts.xml文件內容錯誤;
- 刪掉struts.xml的namespace。
Tomcat
- Request Entity Too Large
請求體過大,多見於文件上傳時觸發,設置connector的maxPostSize爲大點的值即可,單位byte,默認值:2097152 (2 megabytes)。若想將其設爲無限制,則將其設置爲負數即可。
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxPostSize="209715200"/>
- Request header is too large
從字面意思可知,是請求頭過大,設置connector的maxHttpHeaderSize爲大點的值即可,單位byte,默認值:8192 (8 KB)
設置maxHttpHeaderSize限制爲16KB,可根據需求適當加到更大
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxHttpHeaderSize="16384"/>
該值設置過大,容易造成內存溢出的問題。