Skip to content

MapStore war stand-alone not starting #11205

Description

@offtherailz

Description

Our testing pipeline always includes printing plugin. Also local testing includes it.
This made us not notice that, after duplicates clean-up, the standard war (produced with build.sh lunched without any profile, or only with the binary one) produces a war that, deployed in tomcat (even in the binary produced in the same build) is not starting.

The main start issue is caused by the missing httpcore jar.
I noticed that removing from packageExclusions http core, the war starts.

How to reproduce

  • ./build.sh -Pbinary or ./build.sh
  • run the binary (or deploy the war in a tomcat).

Expected Result
binary starts

Current Result
binary can not start

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

Here the list of additional jars introduced by printing profile,

aircompressor-0.27.jar
apiguardian-api-1.1.1.jar
avalon-framework-api-4.3.1.jar
avalon-framework-impl-4.3.1.jar
batik-anim-1.7.jar
batik-awt-util-1.7.jar
batik-bridge-1.7.jar
batik-css-1.7.jar
batik-dom-1.7.jar
batik-ext-1.7.jar
batik-gvt-1.7.jar
batik-js-1.7.jar
batik-parser-1.7.jar
batik-script-1.7.jar
batik-svg-dom-1.7.jar
batik-svggen-1.7.jar
batik-transcoder-1.7.jar
batik-util-1.7.jar
batik-xml-1.7.jar
bigint-0.7.1.jar
commons-httpclient-3.1.jar
disruptor-1.2.15.jar
ejml-core-0.41.jar
ejml-ddense-0.41.jar
fontbox-2.0.26.jar
fop-0.94.jar
GeographicLib-Java-1.49.jar
gt-api-31.3.jar
gt-coverage-31.3.jar
gt-cql-31.3.jar
gt-epsg-hsql-31.3.jar
gt-http-31.3.jar
gt-main-31.3.jar
gt-metadata-31.3.jar
gt-referencing-31.3.jar
gt-render-31.3.jar
guava-15.0.jar
hsqldb-2.7.2.jar
httpcore-4.4.15.jar
imageio-ext-geocore-1.4.12.jar
imageio-ext-streams-1.4.12.jar
imageio-ext-tiff-1.4.12.jar
imageio-ext-utilities-1.4.12.jar
indriya-2.1.3.jar
jackson-dataformat-yaml-2.16.1.jar
jai_codec-1.1.3.jar
jai_core-1.1.3.jar
jai_imageio-1.1.jar
jakarta.annotation-api-1.3.4.jar
javax.inject-1.jar
jgridshift-core-1.3.jar
json-20230618.jar
jt-affine-1.1.25.jar
jt-algebra-1.1.25.jar
jt-bandcombine-1.1.25.jar
jt-bandmerge-1.1.25.jar
jt-bandselect-1.1.25.jar
jt-binarize-1.1.25.jar
jt-border-1.1.25.jar
jt-buffer-1.1.25.jar
jt-classifier-1.1.25.jar
jt-colorconvert-1.1.25.jar
jt-colorindexer-1.1.25.jar
jt-crop-1.1.25.jar
jt-errordiffusion-1.1.25.jar
jt-format-1.1.25.jar
jt-imagefunction-1.1.25.jar
jt-iterators-1.1.25.jar
jt-lookup-1.1.25.jar
jt-mosaic-1.1.25.jar
jt-nullop-1.1.25.jar
jt-orderdither-1.1.25.jar
jt-piecewise-1.1.25.jar
jt-rescale-1.1.25.jar
jt-rlookup-1.1.25.jar
jt-scale-1.1.25.jar
jt-scale2-1.1.25.jar
jts-core-1.19.0.jar
jt-shadedrelief-1.1.25.jar
jt-stats-1.1.25.jar
jt-translate-1.1.25.jar
jt-utilities-1.1.25.jar
jt-utils-1.6.0.jar
jt-vectorbin-1.1.25.jar
jt-warp-1.1.25.jar
jt-zonal-1.1.25.jar
jt-zonalstats-1.6.0.jar
mapstore-services-1.9-SNAPSHOT.jar
metrics-core-4.2.12.jar
metrics-healthchecks-4.2.12.jar
metrics-httpclient-4.2.12.jar
metrics-jmx-4.2.12.jar
metrics-json-4.2.12.jar
metrics-jvm-4.2.12.jar
metrics-log4j2-4.2.12.jar
metrics-servlet-4.2.12.jar
metrics-servlets-4.2.12.jar
net.opengis.ows-31.3.jar
openpdf-1.3.26.jar
org.eclipse.emf.common-2.15.0.jar
org.eclipse.emf.ecore-2.15.0.jar
org.eclipse.emf.ecore.xmi-2.15.0.jar
org.w3.xlink-31.3.jar
pdfbox-2.0.26.jar
pdfbox-debugger-2.0.26.jar
pdfbox-tools-2.0.26.jar
print-lib-2.3.1.jar
profiler-1.1.1.jar
re2j-1.6.jar
si-quantity-2.1.jar
si-units-2.1.jar
snakeyaml-2.2.jar
systems-common-2.1.jar
unit-api-2.1.2.jar
uom-lib-common-2.1.jar
xalan-2.7.0.jar
xercesImpl-2.7.1.jar
xml-apis-1.3.04.jar
xml-apis-ext-1.3.04.jar
xmlgraphics-commons-1.2.jar

There are still some duplicates in particular :

  • @tdipisa provide the list
    • common-pool
    • common-lang(3) not a problem
    • common-codec
    • jsr305

Activity

  1. added this to the 2025.01.00 milestone on Jun 13, 2025
  2. self-assigned this
    on Jun 13, 2025
  3. offtherailz commented on Jun 13, 2025

    @offtherailz
    MemberAuthor

    let's try to

    • fix (test to remove excludes) --> let's test the jar list. If so, let's remove it. IF no, let's see if there are other duplicates.
    • remove printing profile from dev
    • test
  4. added theissue type on Jun 13, 2025
  5. added
    BackportNeeded
    and removed on Jun 13, 2025
  6. offtherailz commented on Jun 13, 2025

    @offtherailz
    MemberAuthor

    tests

    Without printing (removing all packageExclusions as WEB-INF/lib/httpcore-4.4.13.jar :

    ls product/target/apache-tomcat-9.0.90/webapps/mapstore/WEB-INF/lib | grep httpc
    httpclient-4.5.13.jar
    httpcore-4.4.13.jar
    

    with printing

     ls product/target/apache-tomcat-9.0.90/webapps/mapstore/WEB-INF/lib | grep httpc
    commons-httpclient-3.1.jar
    httpclient-4.5.13.jar
    httpcore-4.4.13.jar
    httpcore-4.4.15.jar
    metrics-httpclient-4.2.12.jar
    

    httpcore

    Coming from print

    [INFO] \- org.mapfish.print:print-lib:jar:2.3.1:compile
    [INFO]    +- org.geotools:gt-epsg-hsql:jar:31.3:compile
    [...]
    [INFO]    +- io.dropwizard.metrics:metrics-httpclient:jar:4.2.12:compile
    [INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.4.15:compile
    [INFO]    |  \- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
    

    from geostore

    mvn dependency:tree -Dverbose | grep httpcore -A5 -B5
    [INFO] |  \- javax.xml.ws:jaxws-api:jar:2.3.1:compile
    [INFO] |     +- (javax.xml.bind:jaxb-api:jar:2.1:compile - version managed from 2.3.1; omitted for duplicate)
    [INFO] |     +- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
    [INFO] |     \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
    [INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
    [INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
    

    Exclusion of httpcore in httpclient

    This exclusion looks to be added to avoid duplication (same dependency as from geostore). Anyway it doesn't look to have any effect

    <exclusions>
                        <exclusion>
                            <groupId>org.apache.httpcomponents</groupId>
                            <artifactId>httpcore</artifactId>
                        </exclusion>
                    </exclusions>
    

    in

    <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                    <version>${httpclient.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.apache.httpcomponents</groupId>
                            <artifactId>httpcore</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
    

    (with <httpclient.version>4.5.13</httpclient.version>)

    do not look to have any effect

    here with printing

    ls product/target/apache-tomcat-9.0.90/webapps/mapstore/WEB-INF/lib | grep httpc
    commons-httpclient-3.1.jar
    httpclient-4.5.13.jar
    httpcore-4.4.13.jar
    httpcore-4.4.15.jar
    metrics-httpclient-4.2.12.jar
    

    here without printing

    ls product/target/apache-tomcat-9.0.90/webapps/mapstore/WEB-INF/lib | grep httpc
    httpclient-4.5.13.jar
    httpcore-4.4.13.jar
    

    Proposal

    we can:

    • keep both, and solve duplications later
      • Tested as working locally, but random lib is loaded.
    • decide to exclude http core from printing and use (so avoid exclusion) of the one from geostore.
      • It worked locally, but we have to retest deeply. It uses an older version
    • decide to always include same http core version of printing
      • This looks to be the currently mostly tested version (because we are reusing the same version used in tests), but maybe harder to implement.

    Tried to produce a exclusion that:

    • Excludes the one coming from geostore
    • Includes the one coming from mapstore local client
    • Excludes the one coming from printing lib.

    But obtained some issues. Maybe a backend resource is more appropriate for this task.

  7. tdipisa commented on Jun 13, 2025

    @tdipisa
    Member

    @offtherailz thanks for taking a look at this but we definitely need a BE resource for addressing this issue. I don't want to include JARs duplications, of course. This is something @afabiani has to work on Monday. We will have then to definitely fix our pipelines to prevent this problems from happening again.

  8. added 2 commits that reference this issue on Jun 16, 2025
  9. added a commit that references this issue on Jun 16, 2025
  10. removed
    BackportNeeded
    on Jun 16, 2025
  11. added a commit that references this issue on Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions