From: RBRi <rb...@us...> - 2018-10-05 18:53:57
|
This is a known Rhino issue and there are some pr available to fix this. Will try to destill another pr and hope we get a fix for this. --- ** [bugs:#1989] RuntimeException: generated bytecode for method exceeds 64K limit** **Status:** accepted **Group:** 2.33 **Created:** Thu Sep 13, 2018 08:48 PM UTC by Etrenak **Last Updated:** Fri Sep 14, 2018 06:19 AM UTC **Owner:** RBRi Hello, when I load a page, I got this error :/ Have you any idea to how to solve it ? I precise I have'nt any control on the server side. ~~~ GRAVE: Job run failed with unexpected RuntimeException: Wrapped com.gargoylesoftware.htmlunit.ScriptException: Une erreur de génération de code a été rencontrée à la compilation du script: generated bytecode for method exceeds 64K limit. (http://92.154.35.11/pronote/E_3_C_2629149887D397AD97874EE22ADB43C44180924FE3876AA7F734195E45640C7A_L_1036/eleve_defer.js#1) net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped com.gargoylesoftware.htmlunit.ScriptException: Une erreur de génération de code a été rencontrée à la compilation du script: generated bytecode for method exceeds 64K limit. (http://92.154.35.11/pronote/E_3_C_2629149887D397AD97874EE22ADB43C44180924FE3876AA7F734195E45640C7A_L_1036/eleve_defer.js#1) at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1999) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions(JavaScriptEngine.java:948) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.processPostponedActions(JavaScriptEngine.java:1013) at com.gargoylesoftware.htmlunit.javascript.host.Promise$3.run(Promise.java:387) at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:424) at com.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:144) at java.lang.Thread.run(Thread.java:745) Caused by: com.gargoylesoftware.htmlunit.ScriptException: Une erreur de génération de code a été rencontrée à la compilation du script: generated bytecode for method exceeds 64K limit. (http://92.154.35.11/pronote/E_3_C_2629149887D397AD97874EE22ADB43C44180924FE3876AA7F734195E45640C7A_L_1036/eleve_defer.js#1) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:892) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:616) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:534) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:723) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:689) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:104) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1091) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:978) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:371) at com.gargoylesoftware.htmlunit.html.HtmlScript$2.execute(HtmlScript.java:246) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions(JavaScriptEngine.java:943) ... 5 more Caused by: net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: Une erreur de génération de code a été rencontrée à la compilation du script: generated bytecode for method exceeds 64K limit. (http://92.154.35.11/pronote/E_3_C_2629149887D397AD97874EE22ADB43C44180924FE3876AA7F734195E45640C7A_L_1036/eleve_defer.js#1) at net.sourceforge.htmlunit.corejs.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:79) at net.sourceforge.htmlunit.corejs.javascript.Context.reportRuntimeError(Context.java:1070) at net.sourceforge.htmlunit.corejs.javascript.optimizer.Codegen.reportClassFileFormatException(Codegen.java:188) at net.sourceforge.htmlunit.corejs.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:176) at net.sourceforge.htmlunit.corejs.javascript.optimizer.Codegen.compile(Codegen.java:81) at net.sourceforge.htmlunit.corejs.javascript.Context.compileImpl(Context.java:2630) at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1583) at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1572) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$1.doRun(JavaScriptEngine.java:714) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:877) ... 15 more ~~~ there is my code ~~~ public class Main { public static void main(String[] args) throws Exception { WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED); webClient.getOptions().setCssEnabled(false); // JavaScriptEngine sriptEngine = (JavaScriptEngine) webClient.getJavaScriptEngine(); // HtmlUnitContextFactory factory = sriptEngine.getContextFactory(); // Context context = factory.enterContext(); // context.setOptimizationLevel(10); System.out.println("ok"+((JavaScriptEngine) webClient.getJavaScriptEngine()).getContextFactory().enterContext().getOptimizationLevel()); HtmlPage pronote = webClient.getPage("http://92.154.35.11/pronote/eleve.html"); System.out.println("wait"); while(pronote.getElementById("id_53") == null); System.out.println("ok2"); pronote.getElementById("id_53").setAttribute("value", "SecretUsername"); pronote.getElementById("id_54").setAttribute("value", "*********"); pronote.getElementById("id_43").click(); System.out.println("wait2"); while(pronote.getElementById("id_86id_4") == null); // Got the error here System.out.println(pronote.getDocumentElement().asText()); webClient.close(); } } ~~~ Thank you ! (Really sorry if it is not the best place to do that, but this is the only one I found) --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |