天天看點

pentaho在oracle中的部署

一、編譯bi-platform-assembly/manual_assembly.xml下的assemble目标

獲得bi-platform-assembly/manual-stage目錄,在manual-stage目錄的build.xml中包括了所需要的的各種目标(target)

編譯build.xml,編譯後manual-stage/bulid目錄如下:

pentaho在oracle中的部署

二、配置bulid/pentaho-ears/jboss/no-protal/oracle10g/pentaho.ear

1)将pentaho.ear以及裡面的war包全部解壓,已友善修改。并且将pentaho.ear釋出到jboss(要用jboss4.2.3,對于jboss4.2.0的會出現hibernate錯誤)下。

2)将方言庫copy到對應的位置

copy quartz-all-1.5.2.jar(該quartz版本對應pentaho bi 1.7) 到pentaho.ear//lib/目錄下,并将原有quartz-1.5.2.jar删除。

當然也可以考慮保留原有的jar,将quartz-oracle-1.5.2.jar(隻有一個專門針對oracle的方言類)複制到pentaho.ear/lib目錄中

3)在quartz.properties中主要使用的一個叫myDS的資料源,該資料源指向應用容器jndi資料源,原有配置為:

       org.quartz.dataSource.myDS.jndiURL = java:Quartz

是以在容器中配置Quartz資料源,此處為JBoss,Quartz資料源定義在:jboss釋出目錄的Quartz-ds.xml中

修改pentaho.ear/PentahoHibernate-ds.xml和quartz-ds.xml中的資料庫連接配接

4)移除pentaho.ear/lib中的bsh-*.jar和gwt-dev-linux.jar檔案這兩個檔案導緻bsh自動部署。

bsh的自動執行是因為jboss在部署ear的時候,ear中的bsh-1.3.0.jar和ear一塊被解壓縮開,由于jboss預設情況下,會自動執行*.bsh檔案,是以導緻這個現象的出現)。

gwt-dev*.jar裡面包含了一個servlet類,導緻容器的servlet類沖突

5)将oracle驅動ojdbc.jar複制到pentaho.ear/lib目錄下

6)修改pentaho.ear/pentaho.war/WEB-INF/web.xml,指向正确的pentaho-solutions路徑,本機修改後如下

<context-param>

              <param-name>solution-path</param-name>

              <param-value>D:/pentaho/pentaho-solutions</param-value>

       </context-param>

pentaho在oracle中的部署

三、配置$PENTAHO_HOME/pentaho-solutions

1、配置方言:Quartz /system/quartz/quartz.properties

org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate

2、注意在sessionStartupActions.xml中删除不需要自動啟動的actions

3、

a)修改pentaho-solutions/system/hibernate/hibernate-settings.xml 檔案 将内容改為符合oracle10g的内容

       <config-file>system/hibernate/oracle10g.hibernate.cfg.xml</config-file>

       <managed>false</managed>

b)将oracle10g.hibernate.cfg.xml 複制到/WEB-INF/classes目錄下面 取代原有的hibernate.cfg.xml,并修改oracle10g.hibernate.cfg.xml中資料庫連接配接

c)修改system/hibernate/hibernate-jboss-managed.xml 将内容改為符合oracle10g的内容

       <mapping resource="hibernate/oracle10g.hbm.xml" />

d)修改applicationContext-acegi-security-jdbc.xml檔案

e)修改applicationContext-acegi-security-hibernate.properties檔案

4、配置pentahoObjects.spring.xml中的内容修改ISolutionRepository内容,選擇是通過檔案還是資料庫方式來存儲solution

四、建立使用者和表,啟動jboss服務

       運作$PENTAHO_HOME /data/oracle10g/下的sql檔案建立使用者和表以及表空間

在啟動jboss服務前,先啟動$PENTAHO_HOME/data/start_hypersonic.bat(因為要使用hsql中的SamplyDate資料庫)

       啟動jboss服務,通路http://localhost:8080/pentaho

bug

Quartz的實作過程中自主嘗試使用jdbc 事務復原,而在managed datasource的模式下,這導緻問題,因為managed datasource不允許應用程式自主復原???

在Quartz.properties中配置用jobStore解決這個問題 修改294開始