Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Using external libraries within script (htmlunit-2.56.0)


    Recommended Posts


    I'm trying to use htmlunit within my script to pull data from a webpage

    12:54:29: [ERROR] The script had a problem starting:
    	java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.lang3.StringUtils.substringBefore(java.lang.String, java.lang.String)'
    	at com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlUnsafe(UrlUtils.java:238)
    	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:528)
    	at OsrsPriceScraper.scrapeData(OsrsPriceScraper.java:32)
    	at FlipMain.onStart(FlipMain.java:17)
    	at org.dreambot.api.script.AbstractScript.run(AbstractScript.java)
    	at java.base/java.lang.Thread.run(Thread.java:833)

    However I get this error


    I've used the library before in a different project, compiled the project to a jar and executed the jar and its worked fine so i'm confused why it's not working


    I've done some googling and tried adding the .jar's to my lib folder, updated htmlunit to a later version and everything else i could think of


    Any ideas?

    Thankyou :)

    Link to comment
    Share on other sites


    This topic is now archived and is closed to further replies.

    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.