GWTTestCase failes with "Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslContext"

556 views
Skip to first unread message

Kay Pac

unread,
Jul 10, 2016, 2:28:11 PM7/10/16
to Codehaus Mojo gwt-maven-plugin Users
This seems to be an error related to htmlunit. Is this a problem in my configuration? I have switched to building gwt-maven-plugin from HEAD and also the latest gwt sources. I think htmlunit is embedded in gwt? I don't see it as a maven dependency that I might be able to switch out, so I figured changing the htmlunit version would be barking up the wrong tree. Has anyone seen this error? I googled and found:

https://sourceforge.net/p/htmlunit/bugs/1692/

Any help would be appreciated.

[INFO] 11:21:56.792 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED @4179ms com.google.gwt.junit.server.JUnitHostImpl-45905bff@79afea95==com.google.gwt.junit.server.JUnitHostImpl,-1,false
[INFO] Ignored 65 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Starting http://localhost:64613/us.heptet.magewars.webapp.WebApp.JUnit/junit.html?gwt.codesvr=localhost:64611 on browser Chrome
[ERROR] Exception in thread "htmlUnit client thread" java.lang.IllegalArgumentException: Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslContext

[ERROR]         at org.apache.commons.lang3.Validate.isTrue(Validate.java:155)
[ERROR]         at org.apache.commons.lang3.reflect.FieldUtils.readDeclaredField(FieldUtils.java:471)
[ERROR]         at com.gargoylesoftware.htmlunit.HttpWebConnection.createConnectionManager(HttpWebConnection.java:951)
[ERROR]         at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:159)
[ERROR]         at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1324)
[ERROR]         at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1241)
[ERROR]         at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:348)
[ERROR]         at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:417)
[ERROR]         at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:402)
[ERROR]         at com.google.gwt.junit.RunStyleHtmlUnit$HtmlUnitThread.run(RunStyleHtmlUnit.java:141)
[INFO] 11:22:25.678 [org.eclipse.jetty.server.session.HashSessionManager@4229bb3fTimer] DEBUG org.eclipse.jetty.server.session - Scavenging sessions at 1468174945678
[INFO] 11:22:55.681 [org.eclipse.jetty.server.session.HashSessionManager@4229bb3fTimer] DEBUG org.eclipse.jetty.server.session - Scavenging sessions at 1468174975681
[INFO] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 76.488 sec <<< FAILURE!

Thomas Broyer

unread,
Jul 10, 2016, 6:04:37 PM7/10/16
to Codehaus Mojo gwt-maven-plugin Users

On Sunday, July 10, 2016 at 8:28:11 PM UTC+2, Kay Pac wrote:
This seems to be an error related to htmlunit. Is this a problem in my configuration? I have switched to building gwt-maven-plugin from HEAD and also the latest gwt sources. I think htmlunit is embedded in gwt? I don't see it as a maven dependency that I might be able to switch out, so I figured changing the htmlunit version would be barking up the wrong tree. Has anyone seen this error? I googled and found:

https://sourceforge.net/p/htmlunit/bugs/1692/

GWT trunk/2.8 uses HTMLUnit 2.19 since mid-February, with Apache HTTP Client 4.5.1, so that bug doesn't apply (at least not directly).
 

Any help would be appreciated.

[INFO] 11:21:56.792 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED @4179ms com.google.gwt.junit.server.JUnitHostImpl-45905bff@79afea95==com.google.gwt.junit.server.JUnitHostImpl,-1,false
[INFO] Ignored 65 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Starting http://localhost:64613/us.heptet.magewars.webapp.WebApp.JUnit/junit.html?gwt.codesvr=localhost:64611 on browser Chrome
[ERROR] Exception in thread "htmlUnit client thread" java.lang.IllegalArgumentException: Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslContext

Do you have Apache HTTP Client on the classpath?

Kay Pac

unread,
Jul 10, 2016, 6:35:10 PM7/10/16
to Codehaus Mojo gwt-maven-plugin Users
I do, thanks for the tip - I found an old dependency and excluded it, and tht got rid of that error. I now get:

[INFO] [ERROR] RunStyleHtmlUnit: Unknown browser name FF17, expected browser name: one of [FF38, Chrome, Edge, IE8, IE11]
[INFO] [ERROR] shell failed in doStartup method

I'm worried I still have a bad configuration, although its easy to get rid of that, I can't find the specification for FF17 anywhere in my problem.

Thank you very much for your assistance!! I compiled gwt-maven-plugin from trunk, and gwt also, should I be getting that error?

Thomas Broyer

unread,
Jul 10, 2016, 6:59:34 PM7/10/16
to Codehaus Mojo gwt-maven-plugin Users


On Monday, July 11, 2016 at 12:35:10 AM UTC+2, Kay Pac wrote:
I do, thanks for the tip - I found an old dependency and excluded it, and tht got rid of that error. I now get:

[INFO] [ERROR] RunStyleHtmlUnit: Unknown browser name FF17, expected browser name: one of [FF38, Chrome, Edge, IE8, IE11]
[INFO] [ERROR] shell failed in doStartup method

I'm worried I still have a bad configuration, although its easy to get rid of that, I can't find the specification for FF17 anywhere in my problem.

Thank you very much for your assistance!! I compiled gwt-maven-plugin from trunk, and gwt also, should I be getting that error?

HTMLUnit 2.19 no longer emulates FF17, contrary to the previous version GWT was using (2.13), and is used in 2.8 beta 1. So the problem is gwt-maven-plugin needs to be updated. I'd suggest filing an issue.
Reply all
Reply to author
Forward
0 new messages