I have set up Orbeon on a server. I would like to store form (definitions) and (submission) data in separate schemas/databases. Creating a form with the form builder works, creating a submission and saving it works. Both 'data' and 'form' are stored in the correct database. However, once I try to either view or edit an existing submission, I get a 404 error.
Using a common schema worked well, so I think there is either a missing config I need to set or Orbeon has a bug which does not select the correct database.
Do you have any ideas how to resolve this issue?
Thank you in advance!
In my tomcat server.xml
file:
<Context path="/orbeon" docBase="/usr/share/tomcat/webapps/orbeon" reloadable="false" override="true" allowLinking="true"> <Resource name="jdbc/mysql-data" driverClassName="com.mysql.jdbc.Driver" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="10" maxWait="30000" poolPreparedStatements="true" testOnBorrow="true" validationQuery="select 1" username="orbeon-data" password="secret" url="jdbc:mysql://localhost:3306/orbeon_data?useUnicode=true&characterEncoding=UTF8"/> <Resource name="jdbc/mysql-form" driverClassName="com.mysql.jdbc.Driver" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="10" maxWait="30000" poolPreparedStatements="true" testOnBorrow="true" validationQuery="select 1" username="orbeon-form" password="secret" url="jdbc:mysql://localhost:3306/orbeon_form?useUnicode=true&characterEncoding=UTF8"/> </Context>
My properties-local.xml
looks like this:
<property as="xs:string" name="oxf.fr.authentication.method" value="container"/> <property as="xs:string" name="oxf.fr.authentication.container.roles" value="orbeon-user orbeon-admin"/> <property as="xs:boolean" name="oxf.fr.authentication.user-menu.enable" value="true"/> <property as="xs:string" name="oxf.fr.authentication.container.roles.split" value=",|\s+"/> <property as="xs:boolean" name="oxf.fr.persistence.mysql-data.autosave" value="true"/> <property as="xs:boolean" name="oxf.fr.persistence.mysql-form.autosave" value="true"/> <property as="xs:boolean" name="oxf.fr.persistence.exist.active" value="false"/> <!-- form provider --> <property as="xs:anyURI" name="oxf.fr.persistence.form.uri" value="/fr/service/mysql"/> <property as="xs:string" name="oxf.fr.persistence.form.datasource" value="mysql-form"/> <!-- data provider --> <property as="xs:anyURI" name="oxf.fr.persistence.data.uri" value="/fr/service/mysql"/> <property as="xs:string" name="oxf.fr.persistence.data.datasource" value="mysql-data"/> <!-- provider usage --> <!-- property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/ --> <property as="xs:string" name="oxf.fr.persistence.provider.*.*.form" value="form"/> <property as="xs:string" name="oxf.fr.persistence.provider.*.*.data" value="data"/> <property as="xs:string" name="oxf.fr.persistence.provider.orbeon.builder.data" value="form"/>
I have tried to send you a "private email" not to publicize our server IP but I am not sure the email arrived, so I will post the logs here. If you want the server IP to check something, I can send it to you privately.
The orbeon logs:
2021-01-15 08:37:15,546 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "start: filter", "path": "/fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5", "method": "GET"} 2021-01-15 08:37:15,546 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "start: chain", "path": "/fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5", "method": "GET", "wait": "0"} 2021-01-15 08:37:15,561 WARN auth - not setting credentials headers because credentials are not found 2021-01-15 08:37:15,564 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "start: handle"} 2021-01-15 08:37:15,564 INFO ProcessorService - /fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5 - Received request 2021-01-15 08:37:15,569 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "start: filter", "path": "/xforms-server", "method": "POST"} 2021-01-15 08:37:15,569 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "start: chain", "path": "/xforms-server", "method": "POST", "wait": "0"} 2021-01-15 08:37:15,569 WARN auth - not setting credentials headers because credentials are not found 2021-01-15 08:37:15,569 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "start: handle"} 2021-01-15 08:37:15,569 INFO ProcessorService - /xforms-server - Received request 2021-01-15 08:37:15,577 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "xforms", "message": "ajax with update events", "uuid": "318831bfc8a8a662fbbd34ab909210fa4871875c"} 2021-01-15 08:37:15,577 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "xforms", "message": "before document lock", "uuid": "318831bfc8a8a662fbbd34ab909210fa4871875c"} 2021-01-15 08:37:15,577 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "xforms", "message": "got document lock", "path": "/xforms-server", "method": "POST", "uuid": "318831bfc8a8a662fbbd34ab909210fa4871875c", "wait": "0"} 2021-01-15 08:37:15,582 INFO lifecycle - event: {"request": "554", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "start: handle", "path": "/fr/service/persistence/crud/App3/Form3/form/form.xhtml", "method": "GET"} 2021-01-15 08:37:15,582 INFO ProcessorService - /fr/service/persistence/crud/App3/Form3/form/form.xhtml - Received request 2021-01-15 08:37:15,589 INFO lifecycle - event: {"request": "555", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "start: handle", "path": "/fr/service/mysql/crud/App3/Form3/form/form.xhtml", "method": "GET"} 2021-01-15 08:37:15,589 INFO ProcessorService - /fr/service/mysql/crud/App3/Form3/form/form.xhtml - Received request 2021-01-15 08:37:15,608 INFO ProcessorService - /fr/service/mysql/crud/App3/Form3/form/form.xhtml - Timing: 19 2021-01-15 08:37:15,608 INFO lifecycle - event: {"request": "555", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "end: handle", "time": "19 ms"} 2021-01-15 08:37:15,608 INFO ProcessorService - /fr/service/persistence/crud/App3/Form3/form/form.xhtml - Timing: 26 2021-01-15 08:37:15,608 INFO lifecycle - event: {"request": "554", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "end: handle", "time": "26 ms"} 2021-01-15 08:37:15,610 INFO PageFlowControllerProcessor - not found {controller: "oxf:/apps/fr/page-flow.xml", method: "GET", path: "/fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5", resource: "https://server.ip:8443/orbeon/fr/service/persistence/crud/App3/Form3/form/form.xhtml?document=1d7a6328af3febd838e834bc16b3f8cd33b4a0b5"} 2021-01-15 08:37:15,611 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "xforms", "message": "after cacheOrStore", "document cache current size": "3", "document cache max size": "50"} 2021-01-15 08:37:15,611 INFO ProcessorService - /xforms-server - Timing: 42 2021-01-15 08:37:15,611 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "end: handle", "time": "42 ms"} 2021-01-15 08:37:15,611 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "end: chain", "time": "42 ms"} 2021-01-15 08:37:15,611 INFO lifecycle - event: {"request": "553", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "end: filter", "time": "42 ms"} 2021-01-15 08:37:15,616 INFO PageFlowControllerProcessor - not found {controller: "oxf:/page-flow.xml", method: "GET", path: "/fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5", resource: "https://server.ip:8443/orbeon/fr/service/persistence/crud/App3/Form3/form/form.xhtml?document=1d7a6328af3febd838e834bc16b3f8cd33b4a0b5"} 2021-01-15 08:37:15,634 INFO ProcessorService - /fr/App3/Form3/edit/1d7a6328af3febd838e834bc16b3f8cd33b4a0b5 - Timing: 70 2021-01-15 08:37:15,634 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "service", "message": "end: handle", "time": "73 ms"} 2021-01-15 08:37:15,634 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "end: chain", "time": "88 ms"} 2021-01-15 08:37:15,634 INFO lifecycle - event: {"request": "552", "session": "629B0050D641D6919EDE7D2F6CBB110A", "source": "limiter", "message": "end: filter", "time": "88 ms"}
And the logs from the SQL server (I am not sure on which schema this was executed, which may be the source of the problem):
210115 8:37:15 281 Query select 1 281 Query SET autocommit=0 281 Query SELECT max(t.form_version) FROM orbeon_form_data t, ( SELECT max(last_modified_time) last_modified_time, app, form, form_version FROM orbeon_form_data WHERE app = 'App3' AND form = 'Form3' and document_id = '1d7a6328af3febd838e834bc16b3f8cd33b4a0b5' GROUP BY app, form, form_version ) m WHERE t.last_modified_time = m.last_modified_time AND t.app = m.app AND t.form = m.form AND t.form_version = m.form_version AND t.deleted = 'N' 281 Query rollback 281 Query rollback 281 Query SET autocommit=1
Thanks for your advice!
Best regards,
Adrian Szegedi
libs/orbeon-core.jar/META-INF/MANIFEST.MF
)
orbeon_form.orbeon_form_definition
table (I checked it) is returned:
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:array="http://www.w3.org/2005/xpath-functions/array" xmlns:exf="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:saxon="http://saxon.sf.net/" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fb="http://orbeon.org/oxf/xml/form-builder"> <xh:head> <xh:title>testing</xh:title> <xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true"> <!-- Main instance --> <xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id"> <form> <section-1><grid-1><control-1>21314242</control-1></grid-1> </section-1> </form> </xf:instance> <!-- Bindings --> <xf:bind id="fr-form-binds" ref="instance('fr-form-instance')"> <xf:bind id="section-1-bind" name="section-1" ref="section-1"><xf:bind id="grid-1-bind" ref="grid-1" name="grid-1"><xf:bind id="control-1-bind" name="control-1" ref="control-1" xxf:whitespace="trim"></xf:bind></xf:bind> </xf:bind> </xf:bind> <!-- Metadata --> <xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all"> <metadata> <application-name>App3</application-name> <form-name>Form3</form-name> <title xml:lang="en">testing</title> <description xml:lang="en"></description><created-with-version>2020.1.202012300129 PE</created-with-version> <updated-with-version>2020.1.202012300129 PE</updated-with-version><migration version="2019.1.0">{"migrations":[{"containerPath":[{"value":"section-1"}],"newGridElem":{"value":"grid-1"},"afterElem":null,"content":[{"value":"control-1"}],"topLevel":true}]}</migration></metadata> </xf:instance> <!-- Attachments --> <xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all"> <attachments></attachments> </xf:instance> <!-- All form resources --> <xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all"> <resources> <resource xml:lang="en"> <section-1> <label>Untitled Section</label> </section-1> <control-1> <label>App3t3</label> <hint></hint> <alert></alert> </control-1> </resource> </resources> </xf:instance> </xf:model> </xh:head> <xh:body> <fr:view> <fr:body xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <fr:section id="section-1-section" bind="section-1-bind"> <xf:label ref="$form-resources/section-1/label"></xf:label> <fr:grid id="grid-1-grid" bind="grid-1-bind"><fr:c y="1" x="1" w="6"> <xf:input id="control-1-control" bind="control-1-bind"> <xf:label ref="$form-resources/control-1/label"></xf:label> <xf:hint ref="$form-resources/control-1/hint"></xf:hint> <xf:alert ref="$fr-resources/detail/labels/alert"></xf:alert> </xf:input> </fr:c><fr:c y="1" x="7" w="6"></fr:c></fr:grid> </fr:section> </fr:body> </fr:view> </xh:body> </xh:html>
Thanks for your time and an early response!
Best regards,
Adrian
I have done just what you asked and directly opened the edit url (just with a document of of a fresher submission) & then waited 2 minutes for the first heartbeat. Honestly, I don't really see any more information in there than before, except the heartbeat. Can you make any more sense of it than I can?
2021-01-21 09:53:17,663 INFO ProcessorService - Context listener - Context initialized. 2021-01-21 09:53:17,719 INFO form-runner-auth - initializing 2021-01-21 09:53:17,721 INFO form-runner-auth - configuring: FilterSettings(None) 2021-01-21 09:53:17,725 INFO limiter - initializing 2021-01-21 09:53:17,726 INFO limiter - configuring: FilterSettings(java.util.concurrent.Semaphore@1750016[Permits = 4],(/fr/.*)|(/xforms-server),(?!/([^/]+)/service/).+\.(gif|css|pdf|json|js|coffee|map|png|jpg|xsd|htc|ico|swf|html|htm|txt)) 2021-01-21 09:54:18,201 INFO ProcessorService - Session listener - Session destroyed. 2021-01-21 09:54:31,000 INFO ProcessorService - Servlet initialized. 2021-01-21 09:54:31,029 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "limiter", "message": "start: filter", "path": "/fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1", "method": "GET"} 2021-01-21 09:54:31,031 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "limiter", "message": "start: chain", "path": "/fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1", "method": "GET", "wait": "0"} 2021-01-21 09:54:31,134 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "start: handle"} 2021-01-21 09:54:31,135 INFO ProcessorService - /fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1 - Received request 2021-01-21 09:54:32,717 INFO lifecycle - event: {"request": "2", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "start: handle", "path": "/fr/service/persistence/crud/App3/Form3/form/form.xhtml", "method": "GET"} 2021-01-21 09:54:32,717 INFO ProcessorService - /fr/service/persistence/crud/App3/Form3/form/form.xhtml - Received request 2021-01-21 09:54:32,856 INFO lifecycle - event: {"request": "3", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "start: handle", "path": "/fr/service/mysql/crud/App3/Form3/form/form.xhtml", "method": "GET"} 2021-01-21 09:54:32,856 INFO ProcessorService - /fr/service/mysql/crud/App3/Form3/form/form.xhtml - Received request 2021-01-21 09:54:32,936 INFO ProcessorService - /fr/service/mysql/crud/App3/Form3/form/form.xhtml - Timing: 80 2021-01-21 09:54:32,937 INFO lifecycle - event: {"request": "3", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "end: handle", "time": "81 ms"} 2021-01-21 09:54:32,948 INFO ProcessorService - /fr/service/persistence/crud/App3/Form3/form/form.xhtml - Timing: 231 2021-01-21 09:54:32,948 INFO lifecycle - event: {"request": "2", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "end: handle", "time": "233 ms"} 2021-01-21 09:54:32,961 INFO PageFlowControllerProcessor - not found {controller: "oxf:/apps/fr/page-flow.xml", method: "GET", path: "/fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1", resource: "https://orbeon.labourdigital.cloud:443/orbeon/fr/service/persistence/crud/App3/Form3/form/form.xhtml?document=0781b33cef0ac16ebd0cd15375a65990c6d119f1"} 2021-01-21 09:54:32,962 INFO PageFlowControllerProcessor - not found {controller: "oxf:/page-flow.xml", method: "GET", path: "/fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1", resource: "https://orbeon.labourdigital.cloud:443/orbeon/fr/service/persistence/crud/App3/Form3/form/form.xhtml?document=0781b33cef0ac16ebd0cd15375a65990c6d119f1"} 2021-01-21 09:54:33,140 INFO ProcessorService - /fr/App3/Form3/edit/0781b33cef0ac16ebd0cd15375a65990c6d119f1 - Timing: 2005 2021-01-21 09:54:33,140 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "service", "message": "end: handle", "time": "2,007 ms"} 2021-01-21 09:54:33,140 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "limiter", "message": "end: chain", "time": "2,109 ms"} 2021-01-21 09:54:33,140 INFO lifecycle - event: {"request": "1", "session": "8C70C4B653FA7CD4327C27D029341658", "source": "limiter", "message": "end: filter", "time": "2,129 ms"} 2021-01-21 09:56:22,117 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "limiter", "message": "start: filter", "path": "/xforms-server", "method": "POST"} 2021-01-21 09:56:22,117 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "limiter", "message": "start: chain", "path": "/xforms-server", "method": "POST", "wait": "0"} 2021-01-21 09:56:22,135 WARN auth - not setting credentials headers because credentials are not found 2021-01-21 09:56:22,135 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "service", "message": "start: handle"} 2021-01-21 09:56:22,136 INFO ProcessorService - /xforms-server - Received request 2021-01-21 09:56:22,299 DEBUG XFormsServer - ajax request {body: " <xxf:event-request xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> <xxf:uuid>ff23105bbcfc699736dd0ddf70b15b607c539569</xxf:uuid> <xxf:sequence/> <xxf:action> <xxf:event name="xxforms-session-heartbeat"/> </xxf:action> </xxf:event-request>"} 2021-01-21 09:56:22,303 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "xforms", "message": "ajax heartbeat", "uuid": "ff23105bbcfc699736dd0ddf70b15b607c539569"} 2021-01-21 09:56:22,306 DEBUG XFormsServer - start handling quick heartbeat Ajax response 2021-01-21 09:56:22,310 DEBUG XFormsServer - end handling quick heartbeat Ajax response {time (ms): "4", ajax response: " <xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms"></xxf:event-response>"} 2021-01-21 09:56:22,311 INFO ProcessorService - /xforms-server - Timing: 175 2021-01-21 09:56:22,311 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "service", "message": "end: handle", "time": "176 ms"} 2021-01-21 09:56:22,311 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "limiter", "message": "end: chain", "time": "194 ms"} 2021-01-21 09:56:22,311 INFO lifecycle - event: {"request": "4", "session": "5EB6B1E9E5548D2E9A852DEEA5D57AA3", "source": "limiter", "message": "end: filter", "time": "194 ms"}