[HtmlUnit] [htmlunit:feature-requests] Re: #257 Getting the issue Failed resolution of: Ljavax/script/SimpleScriptContext when trying to use HTMLUnit methods

RBRi via HtmlUnit-develop <[email protected]> Tue, 04 Dec 2018 18:38:25 -0000
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID </p/htmlunit/feature-requests/257/[email protected]>
Can you please provide the whole stack trace

On Tue, 04 Dec 2018 15:13:43 -0000 Cédrick JACOBS wrote:
>
>First, thanks for your answer.
>I tried what you said but i got this error : "Failed to resolve: 
net.sourceforge.htmlunit:htmlunit:2.33.RELEASE"
>I checked here : "https://mvnrepository.com/artifact/net.sourceforge.htmlunit/htmlunit/2.33" 
and I changed the dependecies part for : 
>implementation 'net.sourceforge.htmlunit:htmlunit:2.32'
>I got the same error that I had before :
>"Didn't find class "javax.script.SimpleScriptContext" on path: DexPathList..."
>I tried with both versions (2.32 and 2.33) and it doesnt work.
>Do you have any idea with it doesnt find this class?
>Regards.
>
>
>---
>
>** [feature-requests:#257] Getting the issue Failed resolution of: 
Ljavax/script/SimpleScriptContext when trying to use HTMLUnit methods**
>
>**Status:** open
>**Group:** Latest SVN
>**Created:** Sun Dec 02, 2018 08:06 PM UTC by Cédrick JACOBS
>**Last Updated:** Mon Dec 03, 2018 05:30 PM UTC
>**Owner:** nobody
>
>
>Hello,
>I'm trying to use HTMLUnit to get some information automatically from a website. I imported all the 
.jar files from the 2.33 Version in my project. This is my code :
>        {String lien="";
>        try (final WebClient webClient = new WebClient()) {
>            // Get the first page
>            final HtmlPage page1 = webClient.getPage(url);
>
>            // Get the form that we are dealing with and within that form,
>            // find the submit button and the field that we want to change.
>            final HtmlForm form = page1.getForms().get(0);
>
>            final HtmlSubmitInput boutonAjouterGroupe = 
form.getInputByName("ctl00$ColumnLeft$ADD_BTN_ID");
>            final HtmlSubmitInput boutonObtenirFlux = 
form.getInputByName("ctl00$ColumnLeft$GET_BTN_ID");
>            final HtmlTextInput TexteGroupe = 
form.getInputByName("ctl00$ColumnLeft$RES_TB_ID");
>
>            // Change the value of the text field
>            TexteGroupe.type("L3 INFO s1 TPA12");
>
>            // Now submit the form by clicking the button and get back the second page.
>            final HtmlPage page2 = boutonAjouterGroupe.click();
>
>            // Now submit the form by clicking the button and get back the third page.
>            final HtmlPage page3 = boutonObtenirFlux.click();
>
>            final HtmlForm form2 = page1.getForms().get(0);
>            final HtmlTextInput TexteUrlICS = 
form2.getInputByName("ctl00$ColumnLeft$FEED_URL_TB_ID");
>
>            lien = TexteUrlICS.getValueAttribute();
>         }   
> When I use this method, I get this error :
>            "W/System.err: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: 
Failed resolution of: Ljavax/script/SimpleScriptContext;"
>            
>I tried to import this library "jsr223.jar" which contains the SimpleScriptMethod". I don't have the 
previous error but I got a new one : "W/System.err: java.util.concurrent.ExecutionException: 
java.lang.NoSuchFieldError: No static field INSTANCE of 
>type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class 
Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 
'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in 
>/system/framework/framework.jar:classes3.dex)".
>
>I don't know what to do. If someone can help me, I'd appreciate it. Thank you for your time.
>Regards.
>
>
>
>---
>
>Sent from sourceforge.net because you indicated interest in 
<https://sourceforge.net/p/htmlunit/feature-requests/257/>
>
>
>
>To unsubscribe from further messages, please visit 
<https://sourceforge.net/auth/subscriptions/>
>



---

** [feature-requests:#257] Getting the issue Failed resolution of: Ljavax/script/SimpleScriptContext when trying to use HTMLUnit methods**

**Status:** open
**Group:** Latest SVN
**Created:** Sun Dec 02, 2018 08:06 PM UTC by Cédrick JACOBS
**Last Updated:** Tue Dec 04, 2018 03:13 PM UTC
**Owner:** nobody


Hello,
I'm trying to use HTMLUnit to get some information automatically from a website. I imported all the .jar files from the 2.33 Version in my project. This is my code :
        {String lien="";
        try (final WebClient webClient = new WebClient()) {
            // Get the first page
            final HtmlPage page1 = webClient.getPage(url);

            // Get the form that we are dealing with and within that form,
            // find the submit button and the field that we want to change.
            final HtmlForm form = page1.getForms().get(0);

            final HtmlSubmitInput boutonAjouterGroupe = form.getInputByName("ctl00$ColumnLeft$ADD_BTN_ID");
            final HtmlSubmitInput boutonObtenirFlux = form.getInputByName("ctl00$ColumnLeft$GET_BTN_ID");
            final HtmlTextInput TexteGroupe = form.getInputByName("ctl00$ColumnLeft$RES_TB_ID");

            // Change the value of the text field
            TexteGroupe.type("L3 INFO s1 TPA12");

            // Now submit the form by clicking the button and get back the second page.
            final HtmlPage page2 = boutonAjouterGroupe.click();

            // Now submit the form by clicking the button and get back the third page.
            final HtmlPage page3 = boutonObtenirFlux.click();

            final HtmlForm form2 = page1.getForms().get(0);
            final HtmlTextInput TexteUrlICS = form2.getInputByName("ctl00$ColumnLeft$FEED_URL_TB_ID");

            lien = TexteUrlICS.getValueAttribute();
         }   
 When I use this method, I get this error :
            "W/System.err: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/script/SimpleScriptContext;"
            
I tried to import this library "jsr223.jar" which contains the SimpleScriptMethod". I don't have the previous error but I got a new one : "W/System.err: java.util.concurrent.ExecutionException: java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar:classes3.dex)".

I don't know what to do. If someone can help me, I'd appreciate it. Thank you for your time.
Regards.



---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/htmlunit/feature-requests/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/feature-requests/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop