etf-validator / etf-webapp

:earth_africa: :mag: ETF is an open source testing framework for spatial data and services
https://www.etf-validator.net
European Union Public License 1.2
19 stars 19 forks source link

FunctX download redirection in deployment #219

Closed carlospzurita closed 2 years ago

carlospzurita commented 4 years ago

Description

On deployment of the etf-webapp.war, we have encountered an error in the download of the XQuery Function Library Functx. all environments tested throwed the same error

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataStorageService': Invocation of init method failed; nested exception is de.interactive_instruments.exceptions.InitializationException: FunctX XQuery Function Library installation failed. If a proxy server is used, set the Java Virtual Machine parameter 'http.proxyHost'. Otherwise download functx-1.0.xar manually, extract the file (it is a ZIP file) and copy it to the BaseXRepo 'repo' folder /etf/ds/db/repo [bxerr:BXRE0006] Package 'functx-1.0.xar' could not be parsed: Resource "expath-pkg.xml" not found.. Looking into this, it seems that the file http://files.basex.org/modules/expath/functx-1.0.xar has been moved to an HTTPS domain, causing a 301 redirection code that the ETF is not handling.

imagen

How should we proceed with this issue? It is rather important for the INSPIRE validator deployments.

Operating systems and browser

This issue has occurred using Docker images based on the release in the INSPIRE Validator in Windows 10 and Ubuntu 18.04.

Steps to Reproduce

  1. Build a Docker image containing the etf-webapp.war, or run a pre-built one like docker.pkg.github.com/inspire-eu-validation/community/inspire-validator:2020.2
  2. Wait until TestDriver initializations
  3. Check Docker container log

Expected behavior: [Which behavior you expected to see instead and why.] ETF starts normally

Actual behavior: [Describe the behavior you observed after following the steps] ETF is unable to start

jonherrmann commented 4 years ago

I think we should just switch to https then. Or would that cause another problem?

carlospzurita commented 4 years ago

We modified the references for the package in BsxDataStorage.java to HTTPS and it solved the issue and it seems that there are no side effects.

JohannaOtt commented 3 years ago

Hi, could you please provide us with an update on the current state of this ticket?

apfelnymous commented 2 years ago

Extracting it to the given path doesnt even seem to work, the etf will still log

15.019 [localhost-startStop-1] INFO d.i.e.d.d.b.BsxDataStorage - Installing FunctX XQuery Function Library from https://files.basex.org/modules/expath/functx-1.0.xar 2021-11-18 14:53:16.222 [localhost-startStop-1] INFO d.i.e.w.c.EtfConfigController - Bye

How do you tell it to stop looking online ?

jonherrmann commented 2 years ago

The directory must be named http-www.functx.com-1.0 in order to work:

/etf/ds/db
└── repo
    └── http-www.functx.com-1.0
        ├── cxan.xml
        ├── expath-pkg.xml
        └── functx
            ├── functx.xq
            └── functx.xsl
apfelnymous commented 2 years ago

@jonherrmann Thank you alot !!

jonherrmann commented 2 years ago

Fixed in Version 2.1