cannot connect orbeon to my own mysql

最后都变了- 提交于 2019-12-24 03:14:07

问题


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:

  1. Create a new user orbeon with password orbeon and new schema orbeon.
  2. Create the tables used for Orbeon Forms in the orbeon schema.
  3. Download mysql-connector-java-5.1.33-bin.jar and copy it in xampp\tomcat\lib.
  4. 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&amp;characterEncoding=UTF8"/>
  1. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!