Orbeon separate deployment - 404 error

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

Orbeon separate deployment - 404 error

Finian O'Boyle
Hi,

I'm trying to setup Orbeon 2017.2.201712300816-CE as a separate deployment
with eXist 3.6.0 sending XForms to it via
org.orbeon.oxf.servlet.OrbeonXFormsFilter. This all takes place within
Tomcat 9.0.8 with a default port of 8787 running on Ubuntu 18.04. This is as
part of a conversion from betterFORM, for which support within eXist is
being downgraded.

I can get XForms pages to display as expected, with a single exception. When
an instance refers to a resource within eXist, say ...

    <xf:instance id="locations-instance" src="/restxq/locations"/>

... Orbeon raises an error

    Got invalid return code while loading URI:
http://192.168.1.100:8787/exist/restxq/locations, 404

This is raised by org.orbeon.oxf.processor.URIProcessorOutputImpl.java at
line 402.

If I use ...

    <xf:instance id="locations-instance"
src="http://192.168.1.100:8787/exist/restxq/locations"/>

... I get the same Orbeon error, despite the fact that when I enter the URL
in a browser it returns the XML.

 However if I set up a second connector on Tomcat at port 9595 and use ...

    <xf:instance id="locations-instance"
src="http://192.168.1.100:9595/exist/restxq/locations"/>

... the instance is initialized as expected.

Obviously, I can prefix all the relative URLs within XHTML/XForms pages with
the absolute address, pointing to port 9595, but this seems inelegant, and
I'd like to know what I'm doing wrong or what is going wrong.

I have been puzzling over this for days, reviewing Orbeon Community
Mailings, Tomcat security configurations and web.xml settings to no avail. I
would appreciate any help.

Finian

--
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: Orbeon separate deployment - 404 error

Finian O'Boyle
I think I understand a little better why I'm getting a 404, having done more
testing and reading the log. Orbeon is not telling me that it can't find my
resource within eXist. It's saying that it can't find a page-flow.xml -
here's the relevant log line:

    INFO  PageFlowControllerProcessor  - not found {controller:
"oxf:/ops/xforms/xforms-renderer-page-flow.xml", method: "GET", path:
"/restxq/locations"}

Is there any syntax I can use on <xf:instance> that will tell Orbeon to
resolve the relative URL without referring to a page-flow.xml? I've also
identified the same issue on <xf:submission/>, where I get a similar
message:

    INFO  PageFlowControllerProcessor  - not found {controller:
"oxf:/page-flow.xml", method: "POST", path: "/orbeonxq/pictures/search",
resource: "/apps/orbeonxq/page-flow.xml"}

Any pointers, even to say "No, this can't be done" would be helpful.


Finian

--
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: Orbeon separate deployment - 404 error

Alessandro  Vernet
Administrator
Hi Finian,

I find it strange that it doesn't work when using the full path (and not a
different port). Could you set logging per the "Development configuration"
(see 1st link below), reproduce the problem when using
`src="http://192.168.1.100:8787/exist/restxq/locations"`, and attach the
`orbeon.log` to your response?

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

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: Orbeon separate deployment - 404 error

Finian O'Boyle
Hi Alex,

I agree with you - that puzzled me too. Here's the log using the settings
you advised.

Finian

orbeon-log.txt <http://discuss.orbeon.com/file/t375652/orbeon-log.txt>  

--
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: Orbeon separate deployment - 404 error

Alessandro  Vernet
Administrator
Hi Finian,

It indeed looks as if the request for
http://192.168.1.100:8787/exist/restxq/locations is incorrectly routed to
Orbeon Forms, to the path /restxq/locations, as if Orbeon Forms believed it
was deployed on http://192.168.1.100:8787/exist. But in your case, it is
deployed on http://192.168.1.100:8787/orbeon, correct?

If this is the case, this looks like a bug to be. As a temporary workaround,
could you on the <xf:instance> add the following. You'll let me know if this
helps.

xmlns:f="http://orbeon.org/oxf/xml/formatting" f:url-norewrite="false"

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: Orbeon separate deployment - 404 error

Finian O'Boyle
Hi Alex

You are right: Orbeon is deployed at http://192.168.1.100:8787/orbeon

Unfortunately, your suggestion of using
xmlns:f="http://orbeon.org/oxf/xml/formatting" f:url-norewrite="false"
doesn't change outputs. It returns the same 404 error, with what looks like
an identical stack trace:

orbeon-log-with-fix.txt
<http://discuss.orbeon.com/file/t375652/orbeon-log-with-fix.txt>  

If I use <xf:instance id="locations-instance"
src="http://192.168.1.100:9595/exist/restxq/locations"/> I get the expected
web page and the log looks like:

orbeon-ok-log.txt <http://discuss.orbeon.com/file/t375652/orbeon-ok-log.txt>  

In my own mind, comparing the two logs, it seems in the error that Orbeon
does some sort of check on the URL and as a result uses
oxf:/ops/xforms/xforms-renderer-page-flow.xml to search for an XForms page
within Orbeon rather than loading XML data.

It's also worth saying that HTML hrefs are resolved correctly from eXist, so
the following work as expected

    <link rel="stylesheet" type="text/css"
href="/apps/pictures/css/pictures.css"/>
    <link rel="icon" href="/apps/common/images/ballimore.ico"
type="image/vnd.microsoft.icon"/>

Finian

--
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: Orbeon separate deployment - 404 error

Alessandro  Vernet
Administrator
Hi Finian,

Thank you for the detailed report. I was hoping to find some time to look to
reproduce and debug the issue, but I was unable to do so. If you happen to
be using Orbeon Forms PE, I'd recommend you submit this issue on your
Basecamp project, and if not, I'm afraid that you will have to find a
workaround or debug the issue on your side.

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: Orbeon separate deployment - 404 error

Finian O'Boyle
Hi Alex,

Thank you for the time you have already taken looking at this. I don't have
Orbeon Forms PE - I will continue to investigate using CE and if I come up
with anything that seems useful, I will add it to this thread.

Thanks,

Finian

--
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: Orbeon separate deployment - 404 error

Alessandro  Vernet
Administrator
Got it Finian, and thank you for your understanding. Of course, in the
process just let me know if you're stuck on anything and there are any quick
pointers that I could give you and that could help. You'll let me know how
it works out!

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