Quantcast

NoSuchMethodError from htmlunit 2.26 (htmlunit-2.26-OSGi.jar) - packaging issue?

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

NoSuchMethodError from htmlunit 2.26 (htmlunit-2.26-OSGi.jar) - packaging issue?

Wayne Xin

Hi all,

 

I’m wonder if I’m the only person who’s experiencing the following error. I googled online and it seems to be an old HC package that could cause this problem. I wonder if 2.26 OSGi was using an old http conn package?

 

By the way, WebClient.getPage() on URL 'http://www.realestateatkochi.com/js/game/page/step1.html' would give IllegalStateError “Connection pool shut down” with ThreadedRefereshHandler on htmlunit-2.26-OSGi.jar. That’s why I’m trying 2.26. Thanks.

 

-Wayne

 

java.lang.NoSuchMethodError: org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V

            at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:182)

            at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:164)

            at com.gargoylesoftware.htmlunit.HttpWebConnection.createConnectionManager(HttpWebConnection.java:1045)

            at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:176)

            at com.pan.utils.PandoraWebConnection.getResponse(PandoraWebConnection.java:36)

            at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1372)

            at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1291)

            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:390)

            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)

            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:459)

            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:444)

            at com.pan.utils.SingleCrawler$HtmlunitCrawl.call(SingleCrawler.java:1087)

            at com.pan.utils.SingleCrawler$HtmlunitCrawl.call(SingleCrawler.java:1007)

            at java.util.concurrent.FutureTask.run(FutureTask.java:266)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

            at java.lang.Thread.run(Thread.java:745)

NoSuchMethodError for 'http://www.realestateatkochi.com/js/game/page/step1.html' :org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V

 


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

Re: NoSuchMethodError from htmlunit 2.26 (htmlunit-2.26-OSGi.jar) - packaging issue?

asashour
Hi Wayne,

Thanks for reporting.

It seems the bundle-plugin needs special maven configurations, which were locally applied.

Please use the updated file and report back if you have an issue, with the full java code, since I had two ClassNotFoundException for:

try (WebClient wc = new WebClient()) {
wc.getPage("http://www.realestateatkochi.com/js/game/page/step1.html");
}

Yours,
Ahmed



From: Wayne <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Friday, April 21, 2017 12:31 AM
Subject: [Htmlunit-user] NoSuchMethodError from htmlunit 2.26 (htmlunit-2.26-OSGi.jar) - packaging issue?

Hi all,
 
I’m wonder if I’m the only person who’s experiencing the following error. I googled online and it seems to be an old HC package that could cause this problem. I wonder if 2.26 OSGi was using an old http conn package?
 
By the way, WebClient.getPage() on URL 'http://www.realestateatkochi.com/js/game/page/step1.html' would give IllegalStateError “Connection pool shut down” with ThreadedRefereshHandler on htmlunit-2.26-OSGi.jar. That’s why I’m trying 2.26. Thanks.
 
-Wayne
 
java.lang.NoSuchMethodError: org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
            at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:182)
            at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:164)
            at com.gargoylesoftware.htmlunit.HttpWebConnection.createConnectionManager(HttpWebConnection.java:1045)
            at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:176)
            at com.pan.utils.PandoraWebConnection.getResponse(PandoraWebConnection.java:36)
            at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1372)
            at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1291)
            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:390)
            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)
            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:459)
            at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:444)
            at com.pan.utils.SingleCrawler$HtmlunitCrawl.call(SingleCrawler.java:1087)
            at com.pan.utils.SingleCrawler$HtmlunitCrawl.call(SingleCrawler.java:1007)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
NoSuchMethodError for 'http://www.realestateatkochi.com/js/game/page/step1.html' :org.apache.http.impl.conn.CPool.setValidateAfterInactivity(I)V
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user



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