2008年8月15日

          使用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 閱讀(7892) | 評論 (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獲取不到結果.但瀏覽器直接訪問地址可以得到結果
          最終發現問題出現在firefox插件adblock上
          因為我的servlet寫成"/advertiser/page"
          adblock把結果給過濾
          因此jquery獲取不到給出Component returned failure code: 0x805e000a

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

          posted @ 2008-10-07 21:52 Gordian Yuan 閱讀(353) | 評論 (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 閱讀(1708) | 評論 (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 閱讀(1300) | 評論 (2)編輯 收藏

          Eclipse不能編譯Java文件?

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

          對比兩個項目的屬性發現失敗的項目缺少一個名為"Java Builder"的Builder
          一般在Eclipse新建項目都會有配置Java Builder
          但這個項目是使用m2eclipse的
          創建出來并沒有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 閱讀(2067) | 評論 (2)編輯 收藏

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

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 临颍县| 兴安盟| 扶沟县| 农安县| 凌海市| 加查县| 垦利县| 洪江市| 互助| 张家界市| 玛纳斯县| 海南省| 邢台市| 西峡县| 宾川县| 万州区| 会泽县| 府谷县| 白朗县| 呈贡县| 织金县| 茶陵县| 衡东县| 七台河市| 鹤岗市| 乃东县| 乐陵市| 东乌珠穆沁旗| 濮阳县| 锡林郭勒盟| 东乡族自治县| 鄯善县| 金湖县| 宾川县| 江源县| 民县| 镇雄县| 丰原市| 齐齐哈尔市| 竹山县| 资源县|