我配置了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中有關存在數據庫的一些線?
這很難遠程調試;)。但是讓我們從幾件事開始: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
完成。結果相同。 :-( 非常感謝 在web.xml文件中,有一個屬性指定了properties-prod.xml或properties-local的名稱。我已經更改爲本地並重命名了該文件。 我也更改了如下例所示: –
Joan,你可以嘗試再次下載Orbeon Forms PE 2017.1的逐字拷貝,解壓縮它,把'properties-local.xml'放在'WEB-INF/config',*沒有其他更改*到任何文件,看看是什麼給你的? – avernet