Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6533281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:06:21+00:00 2026-05-25T10:06:21+00:00

This is my first time using HtmlUnit and I am using it within the

  • 0

This is my first time using HtmlUnit and I am using it within the Android SDK (not sure if thats even possible, if so then stop me now)

So I keep getting an error that seems to be linked to the WebClient:

06-01 22:46:58.939: ERROR/AndroidRuntime(351): Uncaught handler: thread main exiting due to uncaught exception
06-01 22:46:58.969: ERROR/AndroidRuntime(351): java.lang.NoClassDefFoundError: com.gargoylesoftware.htmlunit.DefaultCssErrorHandler
06-01 22:46:58.969: ERROR/AndroidRuntime(351):     at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:154)
06-01 22:46:58.969: ERROR/AndroidRuntime(351):     at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:176)
06-01 22:46:58.969: ERROR/AndroidRuntime(351):     at com.laytproducts.songmaster.mainAct.showResults(mainAct.java:107)
06-01 22:46:58.969: ERROR/AndroidRuntime(351):     at com.laytproducts.songmaster.mainAct$1.onClick(mainAct.java:90)

This is my method it is referring to:

public void showResults(String endText) throws Exception{
        WebClient webClient = new WebClient(); //ERROR ON THIS LINE
        HtmlPage page = webClient.getPage(baseSite+endText);
        HtmlTable resultsT = page.getHtmlElementById("results");
        int i = 0;
        for(final HtmlTableRow row : resultsT.getRows()){
            Toast.makeText(getApplicationContext(), "Getting Results...", Toast.LENGTH_SHORT).show();
            for(final HtmlTableCell cell : row.getCells()){
                results[i] = cell.asText();
                i++;
            }
        }
    }

What is happening? Like I said, I am new to HtmlUnit and have no idea what that means.
I was thinking that there was a problem with Android + WebClient?

I searched my error and found out what it means a little, but not how I can fix it. (The WebClient is trying to run as a class?)

Hopefully I can get this figured out quickly, thanks.

-Brandon

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:06:22+00:00Added an answer on May 25, 2026 at 10:06 am

    take a look at htmlunit dependencies (go to their website) .

    You are missing a jar file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time using joomla. I don't know if I'm using the
This is my first time using map tag in html. I assume getting the
This is my first time using java to access databases, so I probably have
This is my first time using C#, so I'm very much out of my
This is my first time using XSLT. I'm trying to create a file that
this is my first time using StAX for parsing XML documents (still in the
This is my first time using Stack Overflow, so if I've done something wrong
This is my first time using CMake and I'm trying to build QJSon, a
This is my first time using Latex to write a letter. I am using
Is there any way to style the checkbox in there? iv tried to define

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.