Error on upload File and Save

16 views
Skip to first unread message

jrabasilio

unread,
Jan 8, 2019, 2:18:00 PM1/8/19
to orb...@googlegroups.com
Hei Alex,

I have a form with a label and a upload file.
when save the form with out file, saved ok, but when i put file in upload
file the form gives one error
"There was an error communicating with the database. Please contact the
application administrator."

And in server log is
"2019-01-08 14:54:56,637 ERROR
[org.orbeon.oxf.xforms.processor.XFormsServer] (ajp-/0.0.0.0:8909-1)
xforms-submit-error - xf:submission: binary serialization with anyURI type
failed reading URL.
"

This error not occur in all installations.
My orbeon version is the Orbeon Forms 2018.1 , but update for the lasted
version and error is same.

Thanks


--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

unread,
Jan 8, 2019, 6:38:32 PM1/8/19
to orb...@googlegroups.com
Hi João,

Are you using the built-in eXist database, or did you setup Orbeon Forms
with a relational database? If so, which one? And could you attach your
`orbeon.log` with that error?

‑Alex

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

jrabasilio

unread,
Jan 9, 2019, 1:11:53 PM1/9/19
to orb...@googlegroups.com

I Use mysql database.

I send my orbeon log.

thanks
orbeon.log <http://discuss.orbeon.com/file/t375602/orbeon.log>

Alessandro Vernet

unread,
Jan 9, 2019, 1:18:25 PM1/9/19
to orb...@googlegroups.com
Hi João,

Mmmh… the most relevant error related the problem you're describing is:
> xforms-submit-error - xf:submission: binary serialization with anyURI type
> failed reading URL

But that isn't telling us much. So we have more information in the log,
could you please try to set your logging as described in the Development
configuration section of the XForms Logging page, stop your server, remove
the `orbeon.log`, restart the server, reproduce the issue and attach the
`orbeon.log` you get?

https://doc.orbeon.com/configuration/advanced/xforms-logging.html

‑Alex

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

jrabasilio

unread,
Jan 10, 2019, 7:34:52 PM1/10/19
to orb...@googlegroups.com
hi,

Log file from orbeon.

The problem only ocorre in two installations, not in all, whos is more
strange.
The configuration in all installations is the same.
The orbeon version 2018.01

thank

orbeon_(1).log <http://discuss.orbeon.com/file/t375602/orbeon_%281%29.log>

Alessandro Vernet

unread,
Jan 11, 2019, 7:04:17 PM1/11/19
to orb...@googlegroups.com
Hi João,

Thank you for the log. When you upload a file, before it is saved to the
database, the file is stored on the server in a temporary file. When saving,
the temporary file is read and sent to the persistence API. In your case, it
seems that reading the temporary file fails. Can you see why this could
happen on your system?

If not, maybe you can start by enabling the XForms inspector (property
below), load the form, attach the file, and before saving in `fr-form-model`
/ `fr-form-instance` see what the temporary URL is, and check that the file
is indeed there on the server. You'll let us know what you find.

<property as="xs:boolean" name="oxf.epilogue.xforms.inspector"
value="true"/>

‑Alex

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

Alessandro Vernet

unread,
Jan 18, 2019, 1:08:23 PM1/18/19
to orb...@googlegroups.com
Hi João, in case this is a problem with a temporary file, did you get a
chance to check if the file exists based on the path in the XForms
Inspector, as suggested in my previous message?

jrabasilio

unread,
Jan 28, 2019, 2:31:38 PM1/28/19
to orb...@googlegroups.com
Hi Alex,

I'm Activate debug mode, and the result is, the file exist in temporary
folder, and have size and content.

The result is
<form xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
fr:data-format-version="4.0.0">
<section-1>
<control-1>1222</control-1><control-2
filename="orbeon.log" mediatype="application/octet-stream"
size="330474">file:/C:/Users/Nuno%20Rodrigues/AppData/Local/Temp/xforms_upload_8821225627882611592.tmp?filename=orbeon.log&amp;mediatype=application%2Foctet-stream&amp;size=330474&amp;mac=943797e6f5f349f6d9795f3d7600992cfd02bc11</control-2>
</section-1>
</form


And image show file in temporary folder.
<nabble_img src="image-2019-01-28-10-51-40-269.png" border="0"/>

Is very strange this error only when update the orbeon for the version
2018.01

Thanks

Alessandro Vernet

unread,
Jan 29, 2019, 7:13:40 PM1/29/19
to orb...@googlegroups.com
Hi João,

So the file is there, but you're getting the following error quoted below in
the log, and this is only happening on some systems, after upgrading to
2018.1. Is this correct?

-Alex


> xforms-submit-error - xf:submission: binary serialization with anyURI type
> failed reading URL



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

jrabasilio

unread,
Jan 30, 2019, 12:38:01 PM1/30/19
to orb...@googlegroups.com
Alex,

Yes, this happen when update to 2018.1 , and is only in some installations.

Thanks

Alessandro Vernet

unread,
Jan 30, 2019, 5:18:49 PM1/30/19
to orb...@googlegroups.com
OK João, we've done some changes to the code so the original exception is
kept, and I hope we can see more information about that exception in the
log. I'll follow-up soon with a link to a build with that change that you
can run to test this.

‑Alex

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

Alessandro Vernet

unread,
Feb 7, 2019, 6:02:13 PM2/7/19
to orb...@googlegroups.com
Hi João,

We've changed the way we handle this exception, so the reason why it happens
should be logged. Could you try to reproduce the issue with attached nightly
build, and attach a file with what you have in the `orbeon.log`, as done
previously? (And of course, use this build for this testing only; it isn't a
release and hasn't been tested.)

https://s3.amazonaws.com/orbeon-builds/orbeon/orbeon-forms/4754/4754.2/build/distrib/orbeon-2018.2.1.201902072242-CE.war

Alessandro Vernet

unread,
Feb 15, 2019, 1:34:56 PM2/15/19
to orb...@googlegroups.com
Hi João, did you get a chance to try the build linked in my previous message?
If so, did you see any telling message in the `orbeon.log` when that
exception happens?

jrabasilio

unread,
Mar 1, 2019, 5:37:53 PM3/1/19
to orb...@googlegroups.com
Hi Alex,

Sorry for the delay to answer you.
I run the version that you send and error is the same,
in log i see a database-error, but if not have upload field the form is
save fine in data base.
In my project i only replace lib folder, for new lib (extracted from the
.war you sent)

i send the log

thanks for you time


server.log <http://discuss.orbeon.com/file/t375602/server.log>
orbeon.log <http://discuss.orbeon.com/file/t375602/orbeon.log>

Alessandro Vernet

unread,
Mar 6, 2019, 2:06:55 PM3/6/19
to orb...@googlegroups.com
Hi João,

Thank you for the `orbeon.log`; now I see the following message, which is
more telling:

URL scheme `File` not allowed

I am intrigued by the uppercase "F"; before the file is uploaded, the scheme
should start with `file:/` with a lowercase "f". Could that be the problem?
And if so, why would we have an uppercase "F"? But first, let's check that
hypothesis: could you enable the XForms inspector with the property below,
load your form, switch the model dropdown to `fr-form-model`, attach a file,
and let us know what you see as URL in element that corresponds to the file
you just uploaded?

<property as="xs:boolean" name="oxf.epilogue.xforms.inspector"
value="true"/>

‑Alex

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

Alessandro Vernet

unread,
Mar 13, 2019, 12:16:39 PM3/13/19
to orb...@googlegroups.com
Hi João,

Did you get a chance to check what the URL is in the data? If so, what did
you find?

Daniel Barros

unread,
May 5, 2020, 12:43:36 PM5/5/20
to orb...@googlegroups.com
Hi Alessandro, Is there an answered for this?

I'm having this problem when I change the type of an Upload from base64 to
anyURI, same for the Attachment. Actually, what is the difference between
the Upload and the Attachment.

I'm running the Orbeon on SAP Commerce Hybris.

Many Thanks,

Daniel.

Alessandro Vernet

unread,
May 5, 2020, 11:28:08 PM5/5/20
to orb...@googlegroups.com
Hi Daniel,

This is a pretty old discussion. Are you using Form Builder? If so, you
should leave the `type="xf:anyURI"`. If this doesn't help, could you restate
the problem you are having?

And what do you mean by "the difference between the Upload and the
Attachment". In Form Builder, in the "Attachments", there are 2 controls:
"File Attachment" and "Image Attachment".

‑Alex

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

Daniel Barros

unread,
May 6, 2020, 2:11:44 AM5/6/20
to orb...@googlegroups.com
Hi Alessandro,

Thanks for your reply. If you prefer to create a new post, please, let me
know.

We have changed messages before as I work with the SAP Commerce/Hybris
Citizen Engagement.

So we are having a problem with a customer, where we are trying to change
the attachments from being saved directly into the XML as a base64 to save
it as anyURI, however, I'm getting an error message.

Please, see the attached orbeon.log.

This Hybris version is using the Orbeon Forms 2017.1.1.201709122316 PE.

In Hybris we get the following log:

#####
WARN [hybrisHTTP8] [PageNotFound] No mapping found for HTTP request with
URI
[/xyformsweb/fr/service/hybris/crud/publicsector/Request-General-Information-Form/data/e15f1896-58e1-4d66-819e-b9d95d92e1b0/d29b35998c45774379d98fe713b06c210a4fd0ed.bin]
in DispatcherServlet with name 'DispatcherServlet'
WARN [hybrisHTTP8] [PageNotFound] No mapping found for HTTP request with
URI
[/xyformsweb/fr/service/hybris/crud/publicsector/Request-General-Information-Form/data/e15f1896-58e1-4d66-819e-b9d95d92e1b0/d29b35998c45774379d98fe713b06c210a4fd0ed.bin]
in DispatcherServlet with name 'DispatcherServlet'
WARN [hybrisHTTP3] [PageNotFound] No mapping found for HTTP request with
URI
[/xyformsweb/fr/service/hybris/crud/publicsector/Request-General-Information-Form/data/e15f1896-58e1-4d66-819e-b9d95d92e1b0/7d4cc9a0adf2b2e9c37db5079298138f44797d1c.bin]
in DispatcherServlet with name 'DispatcherServlet'
WARN [hybrisHTTP3] [PageNotFound] No mapping found for HTTP request with
URI
[/xyformsweb/fr/service/hybris/crud/publicsector/Request-General-Information-Form/data/e15f1896-58e1-4d66-819e-b9d95d92e1b0/7d4cc9a0adf2b2e9c37db5079298138f44797d1c.bin]
in DispatcherServlet with name 'DispatcherServlet'
#####

When I asked about the difference between Upload / Attachment is that from
Form Builder, it adds a fr:attachment tag, where manually, we have created
through XML the xf:upload tag, so not sure what is the difference between
them and why I can't add xf:upload from Form Builder.

Thanks again for the attention.

Regards,

Daniel.

orbeon.log <http://discuss.orbeon.com/file/t375820/orbeon.log>

Alessandro Vernet

unread,
May 7, 2020, 2:53:29 AM5/7/20
to orb...@googlegroups.com
Hi Daniel,

Are you saying that by default, with the version of Orbeon Forms 2017.1.1
you have, when you create a file attachment control, in the source of the
form the `<xf:bind>` for the control has `type="xs:base64Binary"` instead of
`type="xf:anyURI"`?

I don't remember this being the default in Orbeon Forms, even back in 2017.
But is it possible that this was set as the default in SAP Hybris Commerce
because the implementation of persistence API provided by SAP Hybris
Commerce does (or at least did) not support attachments? If that seems
plausible, you can validate that theory by switching to eXist-db for the
persistence, setting `<property as="xs:string"
name="oxf.fr.persistence.provider.*.*.*" value="exist"/>` in your
`properties-local.xml`, and checking if attachments work in that case.
You'll let me know what your findings are.

‑Alex

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

Daniel Barros

unread,
May 11, 2020, 3:07:12 AM5/11/20
to orb...@googlegroups.com
Thanks Alessandro, It seems that it didn't make any difference, the error
persisted, and I'm sure if the config change was effective or not.
Since it's related to Hybris, I have raised a question in the basecamp
forum, maybe someone from SAP has experienced that before.
Let's keep in touch there.

Many Thanks,

Daniel.

Alessandro Vernet

unread,
May 12, 2020, 12:58:26 AM5/12/20
to orb...@googlegroups.com
Yes, sounds good Daniel! Let's see if we can get some help for the SAP folks
who did that implementation of the persistence API.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply all
Reply to author
Forward
0 new messages