本文介绍了无法将orbeon连接到我自己的mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了 http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/oracle-and-mysql-persistence-layers#TOC-MySQL2 .我正在使用Orbeon Forms 4.7和XAMPP v3.2.1.

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.

我的步骤是:

  1. 使用密码orbeon和新架构orbeon创建新用户orbeon.
  2. 在orbeon模式中创建用于Orbeon表单的表.
  3. 下载mysql-connector-java-5.1.33-bin.jar并将其复制到xampp \ tomcat \ lib中.
  4. 编辑Tomcat的server.xml,并在Orbeon Forms中添加

<Resource>元素,即:

 <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. 现在创建表单后,mysql中没有数据.

是否有解决方案或我做错的任何步骤?

推荐答案

根据您的步骤列表,您似乎错过了文档的"Orbeon Forms设置"部分.默认情况下,所有应用程序的所有表单(基于资源的示例除外)都配置为使用内置的eXist数据库.

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.

您可以使用:

<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"/>

或者,您可以仅配置特定的应用程序以使用mysql:

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

这篇关于无法将orbeon连接到我自己的mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 08:43