Athena Framework執行個體的安裝

來源:互聯網
上載者:User
1.   重點

我想有了下面幾點的說明,您安裝和運行AthenaFramework的樣本肯定沒有多難的。希望對您有協助。

l  請一定閱讀了樣本的ReadMe檔案再去深入的做,這個檔案透露的資訊很多;

l  MySQL的版本請使用5.0,至少我在WindowXP平台下使用MySQL 5.6,在Linux下使用5.1都會報錯。5.6版本說type innodb的語法錯誤,因為5.6已經預設使用innodb引擎,而Ahtena Framework使用的還是老式的文法。

l  如果出現錯誤“Unknowncolumn 'E.entity_ID' in 'where clause'”,請先降低Athena Framework的版本,然後使用AthenaFramework的Console的Metadate的匯入/匯出功能:

使用匯入功能,將下載的例子 的DB檔案夾下面的employeedirmt-metadata.xml檔案匯入,這範例子需要用到的表就會自動的建立好,不然總會出現列找不到的。這個點是使用者說明中有給出,但是給出的地方太靠後了。

2.   第一步:將下載的例子匯入到Eclipse中

我的匯入結果如所示:

工程的路徑是:C:\Documentsand Settings\HZH\案頭\EmployeeDirMT\src

3.   第二步:修改eo-config.xml檔案

下面是我的修改結果:
<?xml version="1.0" encoding="UTF-8"standalone="no"?><eo-system
deletion-policy="hard"multitenancy="true"

<!-- deletion-policy表示刪除的方式,hard是將記錄刪除,soft則是僅僅將記錄標記為刪除。multitenancy是多租戶支援開關-->

xmlns="http://www.athenasource.org/schema/ieo-config"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.athenasource.org/schema/ieo-confighttp://www.athenasource.org/dist/schema/ieo-config.xsd">

<datasources default="default">

        <datasourcename="default">

               <database-type>MySQL</database-type>

               <host>127.0.0.1</host>

               <port>-1</port><!-- '-1' means using the default port -->

               <username>root</username>

               <password>hzh</password>

               <db> employeedir</db>

               <!—employeedir是資料庫的名稱-->

               <max-active>10</max-active>

               <max-idle>5</max-idle>

               <max-wait>5000</max-wait>

               <connection-timeout>300</connection-timeout>

        </datasource>

</datasources>

<propertyname="java-source-local-dir" value="C:\Documents andSettings\HZH\案頭\EmployeeDirMT\src"/>

<!—這裡給的目錄是AthenaFramework的Console工具根據資料庫表產生的JAVA代碼的存放位置-->

</eo-system>

4.   第三步:初始化資料庫

這個根據官方的手冊做就行了,主要就是注意重點中提出的第二點就可以了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.