Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use commons-httpclient from atlassian fork to fix #2183 #2490

Merged
merged 1 commit into from
Feb 19, 2019

Conversation

landryb
Copy link
Member

@landryb landryb commented Feb 11, 2019

commons-httpclient is dead upstream and doesnt support SNI,
the atlassian fork added support for it and that fixes mapfishapp
printing https layers served by servers using a cert with SNI.

With this pom.xml bit, the right jar is shipped in the war:

-rw-r--r-- 1 landry users 313907 Feb 11 09:33 /home/landry/.m2/repository/commons-httpclient/commons-httpclient/3.1-atlassian-2/commons-httpclient-3.1-atlassian-2.jar
-rw-r--r-- 1 landry users 305001 Sep 11  2017 /home/landry/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar
...
$unzip -l mapfishapp/target/mapfishapp-generic.war |grep commons-http
   313907  2019-02-11 09:33   WEB-INF/lib/commons-httpclient-3.1-atlassian-2.jar

PR targetting master but nice to have in 18.12.

For some reason here on my throwaway/testing instance mfapp tells me that the print service isnt available (there's a NPE when hitting /mapfishapp/pdf) so i cant really test it, but i've been using this jar in production for the past 6 months.

commons-httpclient is dead upstream and doesnt support SNI,
the atlassian fork added support for it and that fixes mapfishapp
printing https layers served by servers using a cert with SNI.
@landryb
Copy link
Member Author

landryb commented Feb 11, 2019

same npe with the default jar, so its' probably a local issue with datadir merging or smth.

java.lang.NullPointerException
	org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:91)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)

shouldnt prevent testing from others :)

@fvanderbiest
Copy link
Member

fvanderbiest commented Feb 12, 2019

Tested on my side:

mapfishapp_1                | 2019-02-12 13:08:14.270:WARN:oejs.HttpChannel:qtp1639622804-36: /mapfishapp/pdf/info.json
mapfishapp_1                | java.lang.NoSuchMethodError: org.json.JSONWriter.<init>(Ljava/io/Writer;)V
mapfishapp_1                | 	at org.mapfish.print.servlet.MapPrinterServlet.getInfo(MapPrinterServlet.java:289)
mapfishapp_1                | 	at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:99)

But it does not seem related

@fvanderbiest
Copy link
Member

But it does not seem related

I can confirm this is another issue: #2493

@fvanderbiest fvanderbiest added this to the 18.12 milestone Feb 12, 2019
@landryb
Copy link
Member Author

landryb commented Feb 13, 2019

Thanks for testing it - was a bit concerned this would have broken printing.. i know this jar works on 18.06, its just that i've replaced the 'standard' commons-httpclient jar with it on my production systems (ie it doesnt have the -atlassian-2 suffix)

@fvanderbiest fvanderbiest merged commit 72fe1f1 into georchestra:master Feb 19, 2019
@fvanderbiest
Copy link
Member

When used in conjunction with 9afdea2:

[ERROR] Failed to execute goal on project mapfishapp: Could not resolve dependencies for project org.georchestra:mapfishapp:war:19.06-SNAPSHOT: Could not find artifact commons-httpclient:commons-httpclient:jar:3.1-atlassian-2 in artifactory-georchestra (https://packages.georchestra.org/artifactory/maven) -> [Help 1]

Else it builds and works fine !

@landryb
Copy link
Member Author

landryb commented Feb 19, 2019

i suppose artifactory needs to be updated somehow with new deps declared in pom files ? @pmauduit ?

@fvanderbiest
Copy link
Member

Backported to 18.12 with 593a6f4

@pmauduit
Copy link
Member

i suppose artifactory needs to be updated somehow with new deps declared in pom files ? @pmauduit ?

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants