AL32UTF8
, also as recommended by Oracle. You can see you database parameters by running the following query: select * from nls_database_parameters
, and the Database Character Set is identified by nls_characterset
.drop user orbeon cascade
.XMLType
values are stored by default using the binary XML storage. The binary XML storage has numerous benefits over the basic file storage. In many respect, it is the "proper" way to store XML. However, we found that Oracle fails to properly save some documents when the binary XML storage is used. In particular, when documents have attributes with long values (several thousands of characters), when retrieving the document, the value of some attributes is missing. For this reason, until this issue is solved by Oracle, we recommend you store XMLType
values as "basic file", per the above DDL.utf8mb4
character set instead of the utf8
character set. The reason being that MySQL's utf8
character set can only store UTF-8-encoded symbols that consist of 1 to 3 bytes, that is characters in the Unicode Basic Multilingual Plane, which means that none of the characters in the Supplementary Multilingual Plane, which include Emojis, could stored. However, the switch to the utf8mb4
character set will prevent you from creating some indexes on MySQL 5.6 where default key prefix limit is 767 bytes. Hence we recommend you use MySQL 5.7, which raised the index key prefix length limit to 3072 bytes for InnoDB tables. If in your situation upgrading to MySQL 5.7 isn't an option, you can explore enabling the innodb_large_prefix
configuration option on your MySQL 5.6, or changing the DDL that ships with Orbeon Forms to use utf8
instead of utf8mb4
.sql_mode
to ALLOW_INVALID_DATES
, or you might get errors while creating the database schema.latin1
and the default collation latin1_swedish_ci
. Since MySQL 8, the default character encoding is utf8mb4
and the default collation utf8mb4_0900_ai_ci
. So, if you're using MySQL 5.7 or earlier, you must specify the following 2 parameters when starting MySQL:orbeon
. Orbeon Forms will connect to MySQL as that user.orbeon
. This schema will contains the tables used to store your forms definitions and form data.server.xml
(not recommended by the Tomcat documentation because it is less flexible)orbeon.xml
) for the web app (recommended).<Resource>
element containing several configuration attributes. We provide examples below for all the databases covered.orbeon.xml
.<Context>
element:${HOST}
: the host Oracle server is running on, for example oracle.acme.com
${PORT}
: the port the Oracle server is running on, for example 1521
${INSTANCE}
: the instance name, for example orcl
${USERNAME}
: the user/schema, for example orbeon
${PASSWORD}
: the password, for example password
ojdbc6_g.jar
, xdb.jar
, and xmlparserv2.jar
) in the appropriate directory for your application server (on Tomcat: common/lib
or simply lib
, depending on the version). If you don't already have it, you can download the Oracle JDBC driver from the Oracle site.Resource
element pointing to the your Oracle instance (see also Tomcat datasource configuration above). In the example below, the Oracle server is running on localhost
, the instance name is globaldb
, and the user/schema is orbeon
with password orbeon
. Those values are highlighted in the configuration below, and you'll most likely want to change them to fit your setup.ojdbc5_g.jar
into server/default/lib/
.server/default/deploy/oracle-ds.xml
, for example:WEB-INF/jboss-web.xml
to:mysql-connector-java-5.1.39-bin.jar
(latest version as of 2016-06-20)common/lib
or simply lib
, depending on the version).localhost
port 3306, the schema is orbeon
, the username/password is orbeon
/orbeon
. Those values are highlighted in the configuration below, and you'll most likely want to change them to fit your setup. Also, on the JDBC URL you're telling the MySQL driver to use Unicode and the UTF-8 encoding when talking to the database, which we highly recommend you to do in order to avoid encoding issues with non-ASCII characters.sqljdbc4.jar
it contains to the appropriate directory for your application server (on Tomcat: common/lib
or simply lib
with newer Tomcat version).common/lib
or simply lib
, depending on the version).username
password
url
: including the server
and database
parts of the pathdb2jcc4.jar
it contains to the appropriate directory for your application server (on Tomcat: common/lib
or simply lib
, depending on the version).properties-local.xml
, you map an app / form / form type to the implementation of the persistence API you're using with the oxf.fr.persistence.provider.*.*.*
wildcard property. For instance, if using Oracle, set the property to:oracle
and mysql
providers. To use multiple schemas you need to define you own provider names. For instance, assume that you have two apps, hr
and finance
, and would like both the form definition and data for those apps to be stored in two separate schemas:hr-datasource
and finance-datasource
.properties-local.xml
, you use the following properties to define two providers hr
and finance
that you configure to use the desired persistence layer implementation (Oracle in this example) and data source:properties-local.xml
, you map the hr
and finance
app to the respective provider:bookshelf
table for the sample bookshelf form. You want that table to have 3 columns:title
corresponds to the title form field;author
corresponds to the author form field;document_id
corresponds to the column with the same name in orbeon_form_data
.bookshelf
table:bookshelf
table when form data is saved in orbeon_form_data
:orbeon
form bookshelf
, the trigger only does something if new.app = 'orbeon' and new.form = 'bookshelf'
. To enable auditing, the MySQL persistence layer never deletes or updates data; it only inserts new row. So your trigger only needs to be concerned about updates. On insert, you want to make sure you are not creating duplicates in your bookshelf
table, hence the delete
statement. When a newly inserted row has delete = 'N'
, this indicates that a user deleted that document, in which case you don't want to insert a row in your bookshelf
table, hence the if
test.