问题
I have tried all steps described in http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/oracle-and-mysql-persistence-layers#TOC-MySQL2 . I am using Orbeon Forms 4.7 and XAMPP v3.2.1.
My steps are:
- Create a new user orbeon with password orbeon and new schema orbeon.
- Create the tables used for Orbeon Forms in the orbeon schema.
- Download mysql-connector-java-5.1.33-bin.jar and copy it in xampp\tomcat\lib.
- Edit Tomcat's server.xml, and within the for Orbeon Forms adding a
<Resource>
element, i.e.:
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
initialSize="3" maxActive="10" maxIdle="20" maxWait="30000"
driverClassName="com.mysql.jdbc.Driver"
poolPreparedStatements="true"
validationQuery="select 1 from dual"
testOnBorrow="true"
username="orbeon"
password="orbeon"
url="jdbc:mysql://localhost:3306/orbeon?useUnicode=true&characterEncoding=UTF8"/>
- Now after I create the form,there is no data in mysql.
Is there any solutions or any steps I done wrong?
回答1:
Based on your list of steps, it looks like you have missed the "Orbeon Forms setup" section of the docs. By default, all forms for all apps (except samples which are resource based) are configured to use the built-in eXist database.
You can use:
<property as="xs:string"
name="oxf.fr.persistence.provider.*.*.*"
value="mysql"/>
I noticed that with that configuration, the global library with the US Address section template disappears, so if you want that to show up, you need to also use:
<property as="xs:string"
name="oxf.fr.persistence.provider.orbeon.library.*"
value="exist"/>
Alternatively, you can just configure specific apps to use mysql:
<property as="xs:string"
name="oxf.fr.persistence.provider.hr.*.*"
value="mysql"/>
<property as="xs:string"
name="oxf.fr.persistence.provider.finance.*.*"
value="mysql"/>
Those aren't the only properties though. See the doc for the rest:
http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/oracle-and-mysql-persistence-layers#TOC-Orbeon-Forms-setup
来源:https://stackoverflow.com/questions/26750689/cannot-connect-orbeon-to-my-own-mysql