Orbeon 3.8, eXist and separate WAR deployments?

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

Orbeon 3.8, eXist and separate WAR deployments?

Scott Prater
Hello, all --

This is more of a Tomcat question: I'm having problems creating new
entries in the eXist database that ships with Orbeon.  The problem
appeared when I moved from Orbeon 3.7.1 to Orbeon 3.8.

I have a separate WAR that serves my XForms;  its web.xml is configured
according to the instructions at
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications,
and I also enabled crossContext in my app's META-INF/context.xml.

I can PUT this: curl -X PUT -d @t1.xml
http://localhost:9091/orbeon/exist/rest/db/myappcoll/myFile.xml

But I get a 403 when I try to PUT this:
curl -X PUT -d @t1.xml
http://localhost:9091/myapp/exist/rest/db/myappcoll/myFile.xml

HTTP Status 403:  Access to the specified resource () has been forbidden.

I'm running Tomcat 6.0.18.

Thanks in advance,

-- Scott
--
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
[hidden email]


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon 3.8, eXist and separate WAR deployments?

Erik Bruchez
Administrator
Scott,

I think the issue is that the URL rewriting assumes that only a few
select paths must be forwarded to the Orbeon WAR, and /exist/* is not
one of them. So /myapp/exist/* reaches your own application, not
Orbeon.

This can be considered a feature or a bug ;) But I can see a pro of
the current solution: e.g. if you deploy your own eXist in your own
WAR, then you will want /myapp/exist to reach it and not Orbeon's.

Also, the built-in eXist is not really meant for production, in which
case you should probably deploy your own eXist WAR file, or even a
fully separate eXist database.

I am not sure if this helps, but we have some information about
deploying a separate eXist database for Form Runner here:

http://wiki.orbeon.com/forms/doc/developer-guide/exist-configuration

You could also embed your own eXist into your app, and then
/myapp/exist/* will reach that.

Finally, you could explicitly reach
http://localhost:8080/orbeon/exist/* (or wherever your application
resides) with an absolute path. If you do so, you probably want your
XForms submission to have a configurable prefix stored in
properties-local.xml, as Form Runner does.

So you could write something like:

<xf:submission resource="{xxforms:property('edu.wisc.peter.exist.uri')}/foo/bar"
.../>

And then add this as a property in properties-local.xml:

<property as="xs:anyURI"  name="edu.wisc.peter.exist.uri"
  value="http://localhost:8080/orbeon/exist"/>

-Erik

On Wed, May 26, 2010 at 5:58 AM, Scott Prater <[hidden email]> wrote:

> Hello, all --
>
> This is more of a Tomcat question: I'm having problems creating new entries
> in the eXist database that ships with Orbeon.  The problem appeared when I
> moved from Orbeon 3.7.1 to Orbeon 3.8.
>
> I have a separate WAR that serves my XForms;  its web.xml is configured
> according to the instructions at
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications,
> and I also enabled crossContext in my app's META-INF/context.xml.
>
> I can PUT this: curl -X PUT -d @t1.xml
> http://localhost:9091/orbeon/exist/rest/db/myappcoll/myFile.xml
>
> But I get a 403 when I try to PUT this:
> curl -X PUT -d @t1.xml
> http://localhost:9091/myapp/exist/rest/db/myappcoll/myFile.xml
>
> HTTP Status 403:  Access to the specified resource () has been forbidden.
>
> I'm running Tomcat 6.0.18.
>
> Thanks in advance,
>
> -- Scott
> --
> Scott Prater
> Library, Instructional, and Research Applications (LIRA)
> Division of Information Technology (DoIT)
> University of Wisconsin - Madison
> [hidden email]
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon 3.8, eXist and separate WAR deployments?

Scott Prater
Thanks, Erik.  Thinking about it more carefully, I had arrived at pretty
much the same conclusions as you:  that it's preferable in any event to
have a separate, dedicated eXist database, deployed stand-alone or as
part of my application.  But for the purposes of rapid development, I
opted for the third option:  PUTting the data to an absolute URL.  In
the next few days, I'll work on deploying and configuring a separate XML
database WAR.

-- Scott

Erik Bruchez wrote:

> Scott,
>
> I think the issue is that the URL rewriting assumes that only a few
> select paths must be forwarded to the Orbeon WAR, and /exist/* is not
> one of them. So /myapp/exist/* reaches your own application, not
> Orbeon.
>
> This can be considered a feature or a bug ;) But I can see a pro of
> the current solution: e.g. if you deploy your own eXist in your own
> WAR, then you will want /myapp/exist to reach it and not Orbeon's.
>
> Also, the built-in eXist is not really meant for production, in which
> case you should probably deploy your own eXist WAR file, or even a
> fully separate eXist database.
>
> I am not sure if this helps, but we have some information about
> deploying a separate eXist database for Form Runner here:
>
> http://wiki.orbeon.com/forms/doc/developer-guide/exist-configuration
>
> You could also embed your own eXist into your app, and then
> /myapp/exist/* will reach that.
>
> Finally, you could explicitly reach
> http://localhost:8080/orbeon/exist/* (or wherever your application
> resides) with an absolute path. If you do so, you probably want your
> XForms submission to have a configurable prefix stored in
> properties-local.xml, as Form Runner does.
>
> So you could write something like:
>
> <xf:submission resource="{xxforms:property('edu.wisc.peter.exist.uri')}/foo/bar"
> .../>
>
> And then add this as a property in properties-local.xml:
>
> <property as="xs:anyURI"  name="edu.wisc.peter.exist.uri"
>   value="http://localhost:8080/orbeon/exist"/>
>
> -Erik
>
> On Wed, May 26, 2010 at 5:58 AM, Scott Prater <[hidden email]> wrote:
>> Hello, all --
>>
>> This is more of a Tomcat question: I'm having problems creating new entries
>> in the eXist database that ships with Orbeon.  The problem appeared when I
>> moved from Orbeon 3.7.1 to Orbeon 3.8.
>>
>> I have a separate WAR that serves my XForms;  its web.xml is configured
>> according to the instructions at
>> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications,
>> and I also enabled crossContext in my app's META-INF/context.xml.
>>
>> I can PUT this: curl -X PUT -d @t1.xml
>> http://localhost:9091/orbeon/exist/rest/db/myappcoll/myFile.xml
>>
>> But I get a 403 when I try to PUT this:
>> curl -X PUT -d @t1.xml
>> http://localhost:9091/myapp/exist/rest/db/myappcoll/myFile.xml
>>
>> HTTP Status 403:  Access to the specified resource () has been forbidden.
>>
>> I'm running Tomcat 6.0.18.
>>
>> Thanks in advance,
>>
>> -- Scott
>> --
>> Scott Prater
>> Library, Instructional, and Research Applications (LIRA)
>> Division of Information Technology (DoIT)
>> University of Wisconsin - Madison
>> [hidden email]
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>

--
Scott Prater
Library, Instructional, and Research Applications (LIRA)
Division of Information Technology (DoIT)
University of Wisconsin - Madison
[hidden email]


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Orbeon 3.8, eXist and separate WAR deployments?

Erik Bruchez
Administrator
Good to hear! -Erik

On Thu, Jun 3, 2010 at 5:33 AM, Scott Prater <[hidden email]> wrote:

> Thanks, Erik.  Thinking about it more carefully, I had arrived at pretty
> much the same conclusions as you:  that it's preferable in any event to have
> a separate, dedicated eXist database, deployed stand-alone or as part of my
> application.  But for the purposes of rapid development, I opted for the
> third option:  PUTting the data to an absolute URL.  In the next few days,
> I'll work on deploying and configuring a separate XML database WAR.
>
> -- Scott
>
> Erik Bruchez wrote:
>>
>> Scott,
>>
>> I think the issue is that the URL rewriting assumes that only a few
>> select paths must be forwarded to the Orbeon WAR, and /exist/* is not
>> one of them. So /myapp/exist/* reaches your own application, not
>> Orbeon.
>>
>> This can be considered a feature or a bug ;) But I can see a pro of
>> the current solution: e.g. if you deploy your own eXist in your own
>> WAR, then you will want /myapp/exist to reach it and not Orbeon's.
>>
>> Also, the built-in eXist is not really meant for production, in which
>> case you should probably deploy your own eXist WAR file, or even a
>> fully separate eXist database.
>>
>> I am not sure if this helps, but we have some information about
>> deploying a separate eXist database for Form Runner here:
>>
>> http://wiki.orbeon.com/forms/doc/developer-guide/exist-configuration
>>
>> You could also embed your own eXist into your app, and then
>> /myapp/exist/* will reach that.
>>
>> Finally, you could explicitly reach
>> http://localhost:8080/orbeon/exist/* (or wherever your application
>> resides) with an absolute path. If you do so, you probably want your
>> XForms submission to have a configurable prefix stored in
>> properties-local.xml, as Form Runner does.
>>
>> So you could write something like:
>>
>> <xf:submission
>> resource="{xxforms:property('edu.wisc.peter.exist.uri')}/foo/bar"
>> .../>
>>
>> And then add this as a property in properties-local.xml:
>>
>> <property as="xs:anyURI"  name="edu.wisc.peter.exist.uri"
>>  value="http://localhost:8080/orbeon/exist"/>
>>
>> -Erik
>>
>> On Wed, May 26, 2010 at 5:58 AM, Scott Prater <[hidden email]> wrote:
>>>
>>> Hello, all --
>>>
>>> This is more of a Tomcat question: I'm having problems creating new
>>> entries
>>> in the eXist database that ships with Orbeon.  The problem appeared when
>>> I
>>> moved from Orbeon 3.7.1 to Orbeon 3.8.
>>>
>>> I have a separate WAR that serves my XForms;  its web.xml is configured
>>> according to the instructions at
>>>
>>> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications,
>>> and I also enabled crossContext in my app's META-INF/context.xml.
>>>
>>> I can PUT this: curl -X PUT -d @t1.xml
>>> http://localhost:9091/orbeon/exist/rest/db/myappcoll/myFile.xml
>>>
>>> But I get a 403 when I try to PUT this:
>>> curl -X PUT -d @t1.xml
>>> http://localhost:9091/myapp/exist/rest/db/myappcoll/myFile.xml
>>>
>>> HTTP Status 403:  Access to the specified resource () has been forbidden.
>>>
>>> I'm running Tomcat 6.0.18.
>>>
>>> Thanks in advance,
>>>
>>> -- Scott
>>> --
>>> Scott Prater
>>> Library, Instructional, and Research Applications (LIRA)
>>> Division of Information Technology (DoIT)
>>> University of Wisconsin - Madison
>>> [hidden email]
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing
>>> list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>
>
> --
> Scott Prater
> Library, Instructional, and Research Applications (LIRA)
> Division of Information Technology (DoIT)
> University of Wisconsin - Madison
> [hidden email]
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws