異常記錄

js錯誤

  1. Uncaught TypeError: Cannot read property
    常見於在渲染UI組件時對於狀態的初始化操作不當

  2. (unknown): Script error
    被瀏覽器的跨域策略限制時,會產生這類的腳本錯誤

  3. TypeError: ‘undefined’ is not a function
    調用未定義的函數時

  4. Uncaught RangeError: Maximum call stack
    調用一個不終止的遞歸函數;js庫衝突

  5. TypeError: Cannot read property ‘length’
    讀取未定義變量的長度屬性

  6. Uncaught TypeError: Cannot set property
    獲取或設置一個未定義變量的任何未定義的屬性

  7. ReferenceError: event is not defined
    訪問未定義的變量或超出當前範圍的變量

  8. Uncaught SyntaxError: Unexpected identifier
    語法錯誤,缺少符號

  9. Uncaught SyntaxError: Unexpected token ILLEGAL
    語法錯誤,引號不匹配

  10. Uncaught SyntaxError: Unexpected token o
    JSON.parse(s)中的s不是字符串

Java異常

  1. org.apache.catalina.session.StandardManager doLoad

tomcat的work目錄下面的東西刪一遍。

  1. java.lang.IllegalStateException

  2. org.hibernate.MappingException

hibernate映射文件錯誤

  1. java.lang.RuntimeException:

運行時異常,所有jvm異常的父類

  1. 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報錯

  1. 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

  1. Request Entity Too Large

請求體過大,多見於文件上傳時觸發,設置connector的maxPostSize爲大點的值即可,單位byte,默認值:2097152 (2 megabytes)。若想將其設爲無限制,則將其設置爲負數即可。

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxPostSize="209715200"/>

  1. 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"/>

該值設置過大,容易造成內存溢出的問題。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章