Docker Tomcat Deployment / BetterFORM Resources

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Docker Tomcat Deployment / BetterFORM Resources

Christopher Johnson
Hi,

I have found a more general issue that is related to tomcat deployment.  The problem occurs when using any tomcat docker container. 

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl: /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl (No such file or directory)

I guess this is related to inherited/relative context resource loading in BetterFORM.  I cannot explain why it only occurs in a isolated container environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Christopher Johnson
I should qualify that this is only related to Tomcat versions >= 8.  When using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this issue does not occur.   Is the dist-war build fully compatible with tomcat8+?

Cheers,
Christopher Johnson

On 22 March 2017 at 12:51, Christopher Johnson <[hidden email]> wrote:
Hi,

I have found a more general issue that is related to tomcat deployment.  The problem occurs when using any tomcat docker container. 

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl: /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl (No such file or directory)

I guess this is related to inherited/relative context resource loading in BetterFORM.  I cannot explain why it only occurs in a isolated container environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Joern Turner-4
Christopher,

this sounds like one of these dreaded path resolution issues in java that are handled differently every season. Unfortunately we got no resources nor funding for working on betterFORM currently though we still hope that will happen one day. At least the dependency of eXistdb on betterFORM resources (Dojo) will go away soon as we're re-implementing dashboard and associated apps.

Joern


On Thu, Mar 23, 2017 at 1:46 PM, Christopher Johnson <[hidden email]> wrote:
I should qualify that this is only related to Tomcat versions >= 8.  When using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this issue does not occur.   Is the dist-war build fully compatible with tomcat8+?

Cheers,
Christopher Johnson

On 22 March 2017 at 12:51, Christopher Johnson <[hidden email]> wrote:
Hi,

I have found a more general issue that is related to tomcat deployment.  The problem occurs when using any tomcat docker container. 

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl: /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl (No such file or directory)

I guess this is related to inherited/relative context resource loading in BetterFORM.  I cannot explain why it only occurs in a isolated container environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Adam Retter
In reply to this post by Christopher Johnson
Hi Christopher,

Just to mention that it is generally considered a bad idea to run a
database inside Docker. Also eXist prefers not to be deployed as a
WAR, but rather to be deployed standalone.

On 22 March 2017 at 07:51, Christopher Johnson <[hidden email]> wrote:

> Hi,
>
> I have found a more general issue that is related to tomcat deployment.  The
> problem occurs when using any tomcat docker container.
>
> For example, using this simple Dockerfile:
> FROM tomcat:8.5.12-jre8-alpine
> COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war
> ${CATALINA_HOME}/webapps/exist.war
>
> produces this problem:
> net.sf.saxon.trans.XPathException: I/O error reported by XML parser
> processing
> file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
> /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
> (No such file or directory)
>
> I guess this is related to inherited/relative context resource loading in
> BetterFORM.  I cannot explain why it only occurs in a isolated container
> environment.  In a full VM, the war deploys normally.
>
> Thanks for your help,
> Christopher Johnson
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Christopher Johnson
Hi Adam,

Interesting point of view.   While there can certainly be justification for not using Docker in certain setups, I have to disagree with the general statement that it is "a bad idea" for databases.  Can you explain your reasoning a bit more?  I guess that the perceived volatility of docker i.e. the lack of persistence is perhaps where you are coming from.  However, "bound" docker volumes do allow for persistence.  With Fedora Commons, for example, it is possible to persist the db storage structure in a volume (on a host mount point) while the application itself is deployed and containerized in tomcat.  I suppose that this should be possible with eXist as well, but I have not tried it.  It should be possible to inject a runtime JAVA_OPTS or deploy configuration for @dataDir@?  

Another benefit of a docker container solution for databases is that it allows for network isolation on complex host setups.  I would rather not have to modify the default 8080 port configuration for every java app that wants to use it, so it is easier to just to run each in a container isolation and expose an arbitrary port on the host that is mapped to the default configuration assumption.

Cheers,
Christopher



On 25 March 2017 at 14:33, Adam Retter <[hidden email]> wrote:
Hi Christopher,

Just to mention that it is generally considered a bad idea to run a
database inside Docker. Also eXist prefers not to be deployed as a
WAR, but rather to be deployed standalone.

On 22 March 2017 at 07:51, Christopher Johnson <[hidden email]> wrote:
> Hi,
>
> I have found a more general issue that is related to tomcat deployment.  The
> problem occurs when using any tomcat docker container.
>
> For example, using this simple Dockerfile:
> FROM tomcat:8.5.12-jre8-alpine
> COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war
> ${CATALINA_HOME}/webapps/exist.war
>
> produces this problem:
> net.sf.saxon.trans.XPathException: I/O error reported by XML parser
> processing
> file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
> /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
> (No such file or directory)
>
> I guess this is related to inherited/relative context resource loading in
> BetterFORM.  I cannot explain why it only occurs in a isolated container
> environment.  In a full VM, the war deploys normally.
>
> Thanks for your help,
> Christopher Johnson
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Adam Retter
> Interesting point of view.   While there can certainly be justification for
> not using Docker in certain setups, I have to disagree with the general
> statement that it is "a bad idea" for databases.  Can you explain your
> reasoning a bit more?  I guess that the perceived volatility of docker i.e.
> the lack of persistence is perhaps where you are coming from.

Exactly.

>  However,
> "bound" docker volumes do allow for persistence.  With Fedora Commons, for
> example, it is possible to persist the db storage structure in a volume (on
> a host mount point) while the application itself is deployed and
> containerized in tomcat.

Indeed, however I understand that the IOPS performance of such volumes
with Docker is pretty poor. Good database performance is all about the
IOPS!



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

ron.vandenbranden
In reply to this post by Christopher Johnson

Hi,

This seems to confirm the issue I've reported at https://github.com/eXist-db/exist/issues/1352: eXist won't run inside Tomcat-8.5 when BetterFORM is enabled.

Best,

Ron

On 23/03/2017 21:53, Christopher Johnson [hidden email] wrote:

I should qualify that this is only related to Tomcat versions >= 8.  When
using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this
issue does not occur.   Is the dist-war build fully compatible with
tomcat8+?

Cheers,
Christopher Johnson

On 22 March 2017 at 12:51, Christopher Johnson [hidden email]
wrote:

Hi,

I have found a more general issue that is related to tomcat deployment.
The problem occurs when using any tomcat docker container.

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_
HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser
processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
(No such file or directory)

I guess this is related to inherited/relative context resource loading in
BetterFORM.  I cannot explain why it only occurs in a isolated container
environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Joern Turner-4
fyi - the betterFORM dependency is considered a bad thing for quite some time. I'm using all of my spare time at the moment to re-implement dashboard, package manager and user manager to remove this dependency.

However that of course means to disable betterFORM. I'm not sure how many people are still using it (this is your moment to speak up ;). To be honest we haven't found time to maintain it for quite some time and though it's working fine for some scenarios when you have more complex form problems to solve the standard itself unfortunately didn't get broad acceptance. Main problem is that we took a bad decision (you always know better atterwards) by choosing Dojo as our front-end lib. This turned out to be a maintainence nightmare and further development got stuck. Maybe some time soneone comes along and donates for replacing the Dojo - til then i fear there won't be much effort in pushing it forward as every effort feels like a dead end.



On Wed, Mar 29, 2017 at 2:17 PM, Ron Van den Branden <[hidden email]> wrote:

Hi,

This seems to confirm the issue I've reported at https://github.com/eXist-db/exist/issues/1352: eXist won't run inside Tomcat-8.5 when BetterFORM is enabled.

Best,

Ron

On 23/03/2017 21:53, Christopher Johnson [hidden email] wrote:

I should qualify that this is only related to Tomcat versions >= 8.  When
using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this
issue does not occur.   Is the dist-war build fully compatible with
tomcat8+?

Cheers,
Christopher Johnson

On 22 March 2017 at 12:51, Christopher Johnson [hidden email]
wrote:

Hi,

I have found a more general issue that is related to tomcat deployment.
The problem occurs when using any tomcat docker container.

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_
HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser
processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
(No such file or directory)

I guess this is related to inherited/relative context resource loading in
BetterFORM.  I cannot explain why it only occurs in a isolated container
environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

aik01
does this mean that upcoming eXist versions (>3.2?) generally do not  
work any longer with betterform,
or is this a restricted issue for docker/tomcat scenarios?
we live with the betterform limitations quite happily.
Ending the betterform support would hinder us from upgrading eXist :-(

regards
Peter

Quoting Joern Turner <[hidden email]>:

> fyi - the betterFORM dependency is considered a bad thing for quite some
> time. I'm using all of my spare time at the moment to re-implement
> dashboard, package manager and user manager to remove this dependency.
>
> However that of course means to disable betterFORM. I'm not sure how many
> people are still using it (this is your moment to speak up ;). To be honest
> we haven't found time to maintain it for quite some time and though it's
> working fine for some scenarios when you have more complex form problems to
> solve the standard itself unfortunately didn't get broad acceptance. Main
> problem is that we took a bad decision (you always know better atterwards)
> by choosing Dojo as our front-end lib. This turned out to be a maintainence
> nightmare and further development got stuck. Maybe some time soneone comes
> along and donates for replacing the Dojo - til then i fear there won't be
> much effort in pushing it forward as every effort feels like a dead end.
>
>
>
> On Wed, Mar 29, 2017 at 2:17 PM, Ron Van den Branden <
> [hidden email]> wrote:
>
>> Hi,
>>
>> This seems to confirm the issue I've reported at
>> https://github.com/eXist-db/exist/issues/1352: eXist won't run inside
>> Tomcat-8.5 when BetterFORM is enabled.
>>
>> Best,
>>
>> Ron
>>
>> On 23/03/2017 21:53, Christopher Johnson <[hidden email]>
>> <[hidden email]> wrote:
>>
>> I should qualify that this is only related to Tomcat versions >= 8.  When
>> using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this
>> issue does not occur.   Is the dist-war build fully compatible with
>> tomcat8+?
>>
>> Cheers,
>> Christopher Johnson
>>
>> On 22 March 2017 at 12:51, Christopher Johnson  
>> <[hidden email]> <[hidden email]>
>> wrote:
>>
>>
>> Hi,
>>
>> I have found a more general issue that is related to tomcat deployment.
>> The problem occurs when using any tomcat docker container.
>>
>> For example, using this simple Dockerfile:
>> FROM tomcat:8.5.12-jre8-alpine
>> COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_
>> HOME}/webapps/exist.war
>>
>> produces this problem:
>> net.sf.saxon.trans.XPathException: I/O error reported by XML parser
>> processing  
>> file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
>> /usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
>> (No such file or directory)
>>
>> I guess this is related to inherited/relative context resource loading in
>> BetterFORM.  I cannot explain why it only occurs in a isolated container
>> environment.  In a full VM, the war deploys normally.
>>
>> Thanks for your help,
>> Christopher Johnson
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Exist-open mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>>




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker Tomcat Deployment / BetterFORM Resources

Joern Turner-4
No, this doesn't mean betterFORM won't work with future versions any more. We just want to remove the dependency of eXistdb on betterFORM resources.

betterFORM itself however has not enough funding at the moment to do much further development. But we still hope that there might be projects that can cross-finance the modernization of the front-end (this unfortunately is a major effort that can't be done step-by-step or by-the-side).

Removing the dependency on betterFORM just means that users that do not use betterFORM can disable it without consequences - currently the dashboard and package manager (as well as some other minor tools) depend on the Dojo that is bundled with betterFORM.

Hope this clarifies the situation. Nothing to fear ;)

Joern

On Tue, Apr 11, 2017 at 11:05 AM, <[hidden email]> wrote:
does this mean that upcoming eXist versions (>3.2?) generally do not work any longer with betterform,
or is this a restricted issue for docker/tomcat scenarios?
we live with the betterform limitations quite happily.
Ending the betterform support would hinder us from upgrading eXist :-(

regards
Peter

Quoting Joern Turner <[hidden email]>:

fyi - the betterFORM dependency is considered a bad thing for quite some
time. I'm using all of my spare time at the moment to re-implement
dashboard, package manager and user manager to remove this dependency.

However that of course means to disable betterFORM. I'm not sure how many
people are still using it (this is your moment to speak up ;). To be honest
we haven't found time to maintain it for quite some time and though it's
working fine for some scenarios when you have more complex form problems to
solve the standard itself unfortunately didn't get broad acceptance. Main
problem is that we took a bad decision (you always know better atterwards)
by choosing Dojo as our front-end lib. This turned out to be a maintainence
nightmare and further development got stuck. Maybe some time soneone comes
along and donates for replacing the Dojo - til then i fear there won't be
much effort in pushing it forward as every effort feels like a dead end.



On Wed, Mar 29, 2017 at 2:17 PM, Ron Van den Branden <
[hidden email]> wrote:

Hi,

This seems to confirm the issue I've reported at
https://github.com/eXist-db/exist/issues/1352: eXist won't run inside
Tomcat-8.5 when BetterFORM is enabled.

Best,

Ron

On 23/03/2017 21:53, Christopher Johnson <[hidden email]>
<[hidden email]> wrote:

I should qualify that this is only related to Tomcat versions >= 8.  When
using a tomcat 7 docker image like tomcat:7-jre8-alpine, for example, this
issue does not occur.   Is the dist-war build fully compatible with
tomcat8+?

Cheers,
Christopher Johnson

On 22 March 2017 at 12:51, Christopher Johnson <[hidden email]> <[hidden email]>

wrote:


Hi,

I have found a more general issue that is related to tomcat deployment.
The problem occurs when using any tomcat docker container.

For example, using this simple Dockerfile:
FROM tomcat:8.5.12-jre8-alpine
COPY dist/exist-3.2.0-SNAPSHOT+20170321094434.war ${CATALINA_
HOME}/webapps/exist.war

produces this problem:
net.sf.saxon.trans.XPathException: I/O error reported by XML parser
processing file:/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl:
/usr/local/tomcat/webapps/exist/WEB-INF/classes/META-INF/resources/xhtml.xsl
(No such file or directory)

I guess this is related to inherited/relative context resource loading in
BetterFORM.  I cannot explain why it only occurs in a isolated container
environment.  In a full VM, the war deploys normally.

Thanks for your help,
Christopher Johnson



------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open







------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...