2017-08-30 88 views
0

我配置了Orbeon 2017.1 PE以與Oracle 11g Apache Tomcat-7.0.34一起使用。我已經部署在tomcat/webapps中。它可以直接使用,但是當我嘗試配置使用Oracle作爲數據庫時,它會失敗。Orbeon Forms with Oracle(處理請求時發生錯誤)

  • 的license.xml是確定
  • 我已經創建了Oracle架構和執行的Oracle SQL腳本。這些表格已創建,但爲空。
  • 的字符集是AL32UTF8
  • 我已經把甲骨文的驅動程序在tomcat/lib目錄
  • 我context.xml中的上下文標籤內:

    <Context> 
    
        <!-- Default set of monitored resources --> 
        <WatchedResource>WEB-INF/web.xml</WatchedResource> 
    
        <!-- Uncomment this to disable session persistence across Tomcat restarts --> 
        <!-- 
        <Manager pathname="" />--> 
        <Resource name="jdbc/oracle" auth="Container" 
           type="javax.sql.DataSource" 
           initialSize="3" maxActive="10" maxIdle="20" 
           maxWait="30000" 
           validationQuery="select * from dual" 
           driverClassName="oracle.jdbc.OracleDriver" 
           poolPreparedStatements="true" 
           username="orbeon" 
           password="orbeon"   
        url="jdbc:oracle:thin:@//my.database.server:1521/service"/> 
    
        </Context> 
    
  • 我也改變/ webapps /下orbeon/WEB-INF/web.xml中 得到的配置/性能,prod.xml:

     <resource-ref> 
          <description>DataSource</description> 
          <res-ref-name>jdbc/oracle</res-ref-name> 
          <res-type>javax.sql.DataSource</res-type> 
          <res-auth>Container</res-auth> 
         </resource-ref> 
    

<resource-ref> 
    <description>DataSource</description> 
    <res-ref-name>jdbc/oracle</res-ref-name> 
    <res-type>javax.sql.DataSource</res-type> 
    <res-auth>Container</res-auth> 
    </resource-ref> 
  • 在/resource/config/properties.prod

    <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" 
         xmlns:oxf="http://www.orbeon.com/oxf/processors"> 
    
        <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="oracle"/> 
    </property> 
    

  • 然後,當我啓動Tomcat似乎確定:

    INFO: Deploying web application directory ........./apache-tomcat-7.0.34/webapps/orbeon 
    Starting Orbeon Forms 2017.1.201706222319 PE 
    Initializing Resource Manager with: { 
         "oxf.resources.factory":            "org.orbeon.oxf.resources.PriorityResourceManagerFactory", 
        "oxf.resources.priority.2":          "org.orbeon.oxf.resources.WebAppResourceManagerFactory", 
        "oxf.resources.priority.2.oxf.resources.webapp.rootdir":   "/WEB-INF/resources", 
        "oxf.resources.priority.6":           "org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory" 
    } 
        Using run mode: prod 
        Using properties file: oxf:/config/properties-prod.xml 
        This installation of Orbeon Forms 2017.1.201706222319 PE is licensed to: my name/my org/my email and expires on 2017-11-25 
        Property oxf.log4j-config not set. Skipping logging initialization. 
        Context listener - Context initialized. 
        initializing 
        configuring:  FilterSettings([email protected][Permits = 2],(/fr/.*)|(/xforms-server),(?!/([^/]+)/service/).+\.(gif|css|pdf|json|js|coffee|map|png|jpg|xsd|htc|ico|swf|html|htm|txt)) 
        d’ag. 30, 2017 9:24:39 AM org.apache.catalina.startup.HostConfig  deployDirectory 
        INFO: Deploying web application directory ..../apache-tomcat-7.0.34/webapps/manager 
        d’ag. 30, 2017 9:24:39 AM org.apache.catalina.startup.HostConfig deployDirectory 
        INFO: Deploying web application directory ..../apache-tomcat-7.0.34/webapps/examples 
        d’ag. 30, 2017 9:24:40 AM org.apache.coyote.AbstractProtocol start 
        INFO: Starting ProtocolHandler ["http-bio-8080"] 
        d’ag. 30, 2017 9:24:40 AM org.apache.coyote.AbstractProtocol start 
        INFO: Starting ProtocolHandler ["ajp-bio-8009"] 
        d’ag. 30, 2017 9:24:40 AM org.apache.catalina.startup.Catalina start 
        INFO: Server startup in 10512 ms 
        Servlet initialized. 
    
  • 當我去http://localhost:8080/orbeon在瀏覽器中只出現此消息:

    An error has occurred while processing the request. 
    
  • 和日誌:

    event: {"request": "1", "session": "36072B966078D374692205D2A8529ECB", "source": "limiter", "message": "start: nofilter", "path": "/home/", "method": "GET"} 
        not setting credentials headers because credentials are not found 
        event: {"request": "1", "session": "36072B966078D374692205D2A8529ECB", "source": "service", "message": "start: handle"} 
        /home/ - Received request 
        error caught {controller: "oxf:/apps/home/page-flow.xml", method: "GET", path: "/home/"} 
    
    +----------------------------------------------------------------------------------------------------------------------+ 
    |An Error has Occurred                          | 
    |----------------------------------------------------------------------------------------------------------------------| 
    |URL generator found null URL for config:                     | 
    |<config/>                            | 
    |----------------------------------------------------------------------------------------------------------------------| 
    | 
    

    ...和更大量記錄的東西......

我錯過了什麼?正在正確獲取properties-prod.xml。日誌中沒有任何數據庫連接錯誤。

謝謝你的幫助

更多信息:

當我引用properties.local或任何它的命名是問題的開始時間。如果我在web.xml中放入一個不作爲properties.local存在的文件,它可以工作,但使用Exist-db模式。我有沒有評論web.xml中有關存在數據庫的一些線?

+0

這很難遠程調試;)。但是讓我們從幾件事開始:1.在'WEB-INF/resources/config'中,你可以嘗試將你的'properties-prod.xml'重命名爲'properties-local.xml'嗎? (不要使用'properties-prod.xml',除非你想爲生產和非生產有不同的屬性。)2.不要使用'context.xml',把''放在Tomcat的'server.xml'中,如[本示例]中所示(https://doc.orbeon.com/installation/tomcat.html#custom-context-within-serverxml)。你會讓我們知道,如果它有幫助! – avernet

+0

完成。結果相同。 :-( 非常感謝 在web.xml文件中,有一個屬性指定了properties-prod.xml或properties-local的名稱。我已經更改爲本地並重命名了該文件。 我也更改了如下例所示: –

+0

Joan,你可以嘗試再次下載Orbeon Forms PE 2017.1的逐字拷貝,解壓縮它,把'properties-local.xml'放在'WEB-INF/config',*沒有其他更改*到任何文件,看看是什麼給你的? – avernet

回答

0

可能Oracle不是問題。由於數據庫仍然是空的,所以當您保存第一個表單時,您會看到有關持久層的錯誤消息。 但是您在啓動網頁時已經看到錯誤。
也許您已將UserDatabase配置爲進行身份驗證,並且未部署orbeon-auth.war?

+0

orbeon-auth被部署,並且我還沒有配置任何有關身份驗證的信息。 –

+0

我想評論一下web.xml中的一些關於存在的行-db?在properties-local.xml中插入: hoila

0

我被移植從orbeon CE兩種形式在PostgreSQL(Orbeon窗體2016.3.201612302139 CE)到orbeon PE與Oracle(Orbeon窗體2017.1.201706222319 PE)

移植第一種形式是順利;我只需要將postgresql中的數據源更改爲oracle。
然而,移植第二種形式的行爲與您的行爲類似: 在瀏覽器中,或者在窗體中顯示錯誤消息:
處理請求時發生錯誤。
在日誌是以下錯誤:

+-----------------------------------------------------------------+ 
|An Error has Occurred           | 
|-----------------------------------------------------------------| 
|assertion failed             | 
|-----------------------------------------------------------------| 

所以在瀏覽器中的消息是相同的經驗,在日誌中的錯誤卻是不同的。

我減少了表格,試圖找到原因。
令人驚訝的是它是一個計算中的xxf:lang()語句。
若要重現該問題,我可以創建一個新窗體並插入control-1 xxf:lang()作爲計算值或作爲初始值。
當我在CE中測試這個表單時,表單是可視化的。在PE中而不是形式消息:「處理請求時發生錯誤。」被可視化。

所以在我的情況下消息「處理請求時發生錯誤。」在第一時間也看起來像一個oracle問題,因爲我正在從postgresql移植到oracle。 但現在很明顯,這不是一個Oracle問題,而是取決於CE和PE軟件。
注意。我不得不安裝試用PE,因爲在CE中我不能用oracle進行測試。
所以我的反饋是:將表單從CE移植到PE時,可以有CE啓動但PE沒有的表單。

相關問題