Error on upload File and Save

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

Error on upload File and Save

jrabasilio
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/

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

jrabasilio

I Use mysql database.

I send my orbeon log.

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

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

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

jrabasilio
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>  

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

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
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?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

jrabasilio
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


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

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

jrabasilio
 Alex,

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

Thanks


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

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
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

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
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?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

jrabasilio
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>  


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

--
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: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
Hi João,

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

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Daniel Barros
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.

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

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1588673217848-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1588735685836-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Daniel Barros
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>  

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

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1588745501624-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Error on upload File and Save

Alessandro  Vernet
Administrator
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
--
Sent from: http://discuss.orbeon.com/

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1588834406849-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
12