I’m trying to configure Orbeon Forms to use SQL Server instead of SQLite, but I keep encountering this error:
2024-07-01T18:53:45,482 ERROR relational - Data source `sqlite` not configured
2024-07-01T18:53:45,484 ERROR XFormsServer - The following Orbeon Forms configurations are incomplete:
The database configuration is missing or incomplete.
Configuration Details
orbeon.xml:
<Resource
name="jdbc/sqlserver"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
auth="Container"
type="javax.sql.DataSource"
initialSize="3"
maxActive="10"
maxIdle="10"
maxWait="30000"
poolPreparedStatements="true"
validationQuery="select 1"
testOnBorrow="true"
username="orbeon_user"
password="my-password"
url="jdbc:sqlserver://localhost:1433;databaseName=OrbeonDB;trustServerCertificate=true"/>
web.xml:
<resource-ref>
<description>DataSource</description>
<res-ref-name>jdbc/sqlserver</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
properties-local.xml:
<properties>
<property as="xs:string" name="oxf.fr.persistence.provider" value="sqlserver"/>
<property as="xs:string" name="oxf.fr.persistence.sqlserver.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property as="xs:string" name="oxf.fr.persistence.sqlserver.url" value="jdbc:sqlserver://192.168.2.235;databaseName=OrbeonDB"/>
<property as="xs:string" name="oxf.fr.persistence.sqlserver.user" value="orbeon_user"/>
<property as="xs:string" name="oxf.fr.persistence.sqlserver.password" value="my-password"/>
</properties>
orbeon.properties:
oxf.xforms.log.level=info
oxf.fr.persistence.provider=sqlserver
I’ve placed the JDBC driver (mssql-jdbc-12.6.3.jre11.jar
) in both the Tomcat lib directory and the Orbeon WEB-INF/lib
.
Issue with Tomcat Startup
After these changes, Tomcat fails to start with the following error:
01-Jul-2024 23:24:04.429 SEVERE [Catalina-utility-2] org.apache.catalina.users.MemoryUserDatabase.backgroundProcess Error reloading memory user database [UserDatabase] from updated source [file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/conf/tomcat-users.xml]
org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 2; The markup in the document following the root element must be well-formed.
What I Tried:
- Verified all configurations.
- Placed the JDBC driver in the Tomcat lib directory.
- Restarted Tomcat multiple times.
What am I missing or doing wrong? Any help would be greatly appreciated!
Georgiana Iuliana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.