2008年8月13日

          使用Firebug的console導致IE提示對象未定義錯誤

          1.安裝Firebug Lite
          具體安裝方法查看Firebug Lite的主頁
          http://getfirebug.com/lite.html

          2.添加一段javascript到頁面中
          if (!window.console || !console.firebug)

          {
              var names 
          = ["log""debug""info""warn""error""assert""dir""dirxml",
              
          "group""groupEnd""time""timeEnd""count""trace""profile""profileEnd"];

              window.console 
          = {};
              
          for (var i = 0; i < names.length; ++i)
                  window.console[names[i]] 
          = function() {}
          }

          或直接下載firebugx.js
          http://getfirebug.com/firebug/firebugx.js


          posted @ 2008-10-15 14:36 Gordian Yuan 閱讀(7898) | 評論 (3)編輯 收藏

          JQuery failure code 0x805e000a

          [Exception... "Component returned failure code: 0x805e000a [nsIXMLHttpRequest.open]" nsresult: "0x805e000a (<unknown>)" location: "JS frame :: http://localhost:8080/scripts/jquery.js :: anonymous :: line 2699" data: no]

          Exception提示是jquery獲取不到結果.但瀏覽器直接訪問地址可以得到結果
          最終發(fā)現問題出現在firefox插件adblock上
          因為我的servlet寫成"/advertiser/page"
          adblock把結果給過濾
          因此jquery獲取不到給出Component returned failure code: 0x805e000a

          解決辦法
          把advertiser改名成vertiser,這樣即使用戶使用firefox和adblock也可以訪問

          posted @ 2008-10-07 21:52 Gordian Yuan 閱讀(356) | 評論 (0)編輯 收藏

          關于Eclipse3.4-Ganymede內置SVN不能使用

          當使用Eclipse3.4-Ganymede內置的SVN嘗試檢出項目時出現
          Selected SVN connector library is not available or cannot be loaded.
          原因在于Eclipse3.4并沒有內置默認的SVN連接器.

          解決辦法
          自己安裝一個SVN連接器,通過在線安裝EclipsePlugin的辦法安裝SVN連接器
          下面是安裝地址
          http://www.polarion.org/projects/subversive/download/eclipse/2.0/ganymede-site/

          注意:
          安裝SVN的前提是使用Eclipse3.4-Ganymede的J2EE的版本
          Eclipse3.4-Ganymede的Java版本即使安裝SVN連接器也無法使用 應該是缺少某個組件

          posted @ 2008-08-20 13:34 Gordian Yuan 閱讀(1713) | 評論 (0)編輯 收藏

          Hibernate初始化時在OneToOneSecondPass類中出現NullPointerException

          啟動項目,Hibernate隨即報錯
          Caused by: java.lang.NullPointerException
              at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
          解決辦法
          OneToOne并使用外鍵生成器的時候需要持久化對象聲明的順序.被依賴的需要先聲明

          這個異常是出現在我一個類依賴另一個類來生成主鍵的時候產生
          這時候應該注意的是mapping class的聲明順序,
          例如下面,如果Role類依賴User的某個屬性(例如我的情況是Role使用foreign key generator根據User的主鍵生成Role的主鍵)
          這時候就需要先聲明User然后聲明Role,否則會出現上面的異常.
          <hibernate-configuration>
          <session-factory>
          <mapping class="model.User" />
          <mapping class="model.Role" />
          </session-factory>
          </hibernate-configuration>

          posted @ 2008-08-15 16:33 Gordian Yuan 閱讀(1305) | 評論 (2)編輯 收藏

          Eclipse不能編譯Java文件?

          當我想要使用Eclipse生成serialVersionUID的時候,Eclipse彈出出錯信息.
          The following problem occurred.
          could not find class file.
          make sure the file is compilable.
          同時項目中的Java文件出錯時會出現的紅叉叉也不再出現

          對比兩個項目的屬性發(fā)現失敗的項目缺少一個名為"Java Builder"的Builder
          一般在Eclipse新建項目都會有配置Java Builder
          但這個項目是使用m2eclipse的
          創(chuàng)建出來并沒有JavaBuilder
          取而代之的是一個AspectJ Builder

          解決辦法:

          還沒有

          抱歉這個問題還在困擾著我

          嘗試過自行添加一個JavaBuilder
          到workspace項目中打開.project文件添加下面代碼
          <buildSpec>
             <buildCommand>
                <name>org.eclipse.jdt.core.javabuilder</name>
                <arguments>
                </arguments>
             </buildCommand>
          </buildSpec>
          卻引來更嚴重的ClassNotFoundException


          posted @ 2008-08-15 16:13 Gordian Yuan 閱讀(2072) | 評論 (2)編輯 收藏

          Eclipse關閉No grammar constraints (DTD or XML schema) detected for the document警告

          "Warning: No grammar constraints (DTD or XML schema) detected for the document."
          可以在Eclipse工具欄中
          Windows - Preferences - XML - XML Files - Validate files - Indicate when no grammar is specified
          選擇ignore
          來關閉這個警告

          posted @ 2008-08-13 10:53 Gordian Yuan 閱讀(9117) | 評論 (5)編輯 收藏

          <2008年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          導航

          統(tǒng)計

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 永年县| 麻城市| 辽宁省| 兰州市| 府谷县| 论坛| 仪征市| 尼玛县| 贵南县| 广元市| 普兰县| 格尔木市| 盱眙县| 平阴县| 鄂托克前旗| 灌南县| 漯河市| 黄浦区| 靖州| 济阳县| 曲沃县| 册亨县| 南皮县| 喜德县| 通河县| 通州市| 登封市| 成安县| 库尔勒市| 博白县| 高淳县| 新竹市| 扬州市| 云梦县| 西乌珠穆沁旗| 郴州市| 垣曲县| 华蓥市| 师宗县| 塘沽区| 左云县|