Problems Publishing with Pictures and PostgreSQL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems Publishing with Pictures and PostgreSQL

Aaron Spike
Today I ran into a problem publishing a form using PostgreSQL. Further inspection revealed that the form fails to publish if there is an image display control on the form with an attached image. The image would save but not publish. Switching to MySQL both saving and publishing failed. But with MySQL the exception in the logs mentioned something about "Packet for query is too large". And I found that both save and publish work fine on MySQL with a smaller image file. PostgreSQL continues to fail publishing even with a smaller image. The top of the stack traces look like this:
 
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     +----------------------------------------------------------------------------------------------------------------------+
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |An Error has Occurred                                                                                                 |
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |Fatal error: Premature end of file.                                                                                   |
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |Application Call Stack                                                                                                |
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |oxf:/apps/fr/page-flow.xml                                                        |reading page model data output|  42|
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |······················································································································|
2015-02-24 12:52:50,832 ERROR PageFlowControllerProcessor  -     |element=<service path="/fr/service/(oracle|mysql|postgresql|db2|sqlserver)/crud/([^/]+/[^/]+/(form/[^/]+|(data|draft)/|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |model  =persistence/relational/crud.xpl                                                                               |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |oxf:/apps/fr/persistence/relational/crud.xpl                                      |executing processor           |  17|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |······················································································································|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |element=<p:processor name="fr:relational-crud"/>                                                                      |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |name   ={http://orbeon.org/oxf/xml/form-runner}relational-crud                                                        |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |Exception: org.orbeon.oxf.common.ValidationException                                                                  |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |org.orbeon.oxf.xml.XMLParsing$ErrorHandler         |fatalError                    |XMLParsing.java               | 215|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.util.ErrorHandlerWrapper      |fatalError                    |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.impl.XMLErrorReporter         |reportError                   |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.impl.XMLErrorReporter         |reportError                   |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.impl.XMLErrorReporter         |reportError                   |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.impl.XMLVersionDetector       |determineDocVersion           |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.parsers.XML11Configuration    |parse                         |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.parsers.XML11Configuration    |parse                         |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.parsers.XMLParser             |parse                         |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |orbeon.apache.xerces.parsers.AbstractSAXParser     |parse                         |                              |    |
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |org.orbeon.oxf.xml.XMLParsing                      |inputSourceToSAX              |XMLParsing.java               | 315|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,833 ERROR PageFlowControllerProcessor  -     |Exception: org.orbeon.oxf.common.OXFException                                                                         |


and

2015-02-24 12:52:50,847 ERROR XFormsServer  -     +----------------------------------------------------------------------------------------------------------------------+
2015-02-24 12:52:50,847 ERROR XFormsServer  -     |An Error has Occurred                                                                                                 |
2015-02-24 12:52:50,847 ERROR XFormsServer  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |xf:submission for submission id: fr-create-update-attachment-submission, error code received when submitting instance:|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     | 500                                                                                                                  |
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |Application Call Stack                                                                                                |
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |Exception: org.orbeon.oxf.xforms.submission.XFormsSubmissionException                                                 |
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |----------------------------------------------------------------------------------------------------------------------|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.orbeon.oxf.xforms.submission.XFormsModelSubmission|getReplacer                   |XFormsModelSubmission.java    | 729|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call                          |RegularSubmission.java        | 106|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call                          |RegularSubmission.java        |  76|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.submission.BaseSubmission    |submitCallable                |BaseSubmission.scala          |  89|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.submission.RegularSubmission |connect                       |RegularSubmission.java        | 129|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.orbeon.oxf.xforms.submission.XFormsModelSubmission|doSubmit                      |XFormsModelSubmission.java    | 460|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.orbeon.oxf.xforms.submission.XFormsModelSubmission|performDefaultAction          |XFormsModelSubmission.java    | 292|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply$mcV$sp                  |Dispatch.scala                | 137|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.event.Dispatch$              |withEvent$1                   |Dispatch.scala                |  38|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.event.Dispatch$              |dispatchEvent                 |Dispatch.scala                |  72|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.action.XFormsAPI$            |send                          |XFormsAPI.scala               | 275|
2015-02-24 12:52:50,848 ERROR XFormsServer  -     |org.orbeon.oxf.xforms.action.XFormsAPI$            |sendThrowOnError              |XFormsAPI.scala               | 292|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |.FormRunnerPersistence$$anonfun$saveAttachments$1$1|apply                         |FormRunnerPersistence.scala   | 248|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |.FormRunnerPersistence$$anonfun$saveAttachments$1$1|apply                         |FormRunnerPersistence.scala   | 247|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |scala.collection.immutable.Stream                  |foreach                       |Stream.scala                  | 547|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fr.FormRunnerPersistence$class      |saveAttachments$1             |FormRunnerPersistence.scala   | 247|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fr.FormRunnerPersistence$class      |putWithAttachments            |FormRunnerPersistence.scala   | 274|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fr.FormRunner$                      |putWithAttachments            |FormRunner.scala              |  18|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fb.PublishOps$class                 |publish                       |PublishOps.scala              |  31|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fb.FormBuilder$                     |publish                       |FormBuilder.scala             |  21|
2015-02-24 12:52:50,849 ERROR XFormsServer  -     |org.orbeon.oxf.fb.FormBuilder                      |publish                       |FormBuilder.scala             |    |

My first guess is that this is symptomatic of another mistake in the PostgreSQL persistence layer, but I'm not sure what it means that saving is successful but publishing fails. Any ideas?

Aaron Spike


This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Problems Publishing with Pictures and PostgreSQL

Alessandro  Vernet
Administrator
Hi Aaron,

The MySQL packet size issue is a matter of changing the max_allowed_packet, e.g. in /usr/local/Cellar/mysql/5.6.13/my.cnf, in the [mysqld] section, e.g. adding max_allowed_packet=100M, and restarting the MySQL server. But this is most likely unrelated to the issue you see on PostgreSQL.

For the PostgreSQL issue, I would use Charles to see what query fails, exactly, and then debug the relevant code, since the exception by itself doesn't seem to be very useful in this case.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet