2008年8月13日

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

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

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

          關(guān)于Eclipse3.4-Ganymede內(nèi)置SVN不能使用

          當(dāng)使用Eclipse3.4-Ganymede內(nèi)置的SVN嘗試檢出項目時出現(xiàn)
          Selected SVN connector library is not available or cannot be loaded.
          原因在于Eclipse3.4并沒有內(nèi)置默認(rèn)的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連接器也無法使用 應(yīng)該是缺少某個組件

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

          Hibernate初始化時在OneToOneSecondPass類中出現(xiàn)NullPointerException

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

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

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

          Eclipse不能編譯Java文件?

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

          對比兩個項目的屬性發(fā)現(xiàn)失敗的項目缺少一個名為"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>
          卻引來更嚴(yán)重的ClassNotFoundException


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

          Eclipse關(guān)閉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
          來關(guān)閉這個警告

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

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

          導(dǎo)航

          統(tǒng)計

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 胶州市| 阜新市| 宁强县| 咸阳市| 隆德县| 东台市| 鄯善县| 昌图县| 长垣县| 丰都县| 遵义县| 德令哈市| 缙云县| 顺昌县| 淮安市| 馆陶县| 三都| 军事| 墨竹工卡县| 固安县| 青河县| 曲松县| 五指山市| 玉山县| 内丘县| 简阳市| 营口市| 甘谷县| 台江县| 泗洪县| 永靖县| 中牟县| 伊宁县| 乌拉特后旗| 洛扎县| 霍林郭勒市| 新蔡县| 榆林市| 罗江县| 旺苍县| 上林县|