[HtmlUnit] [htmlunit:bugs] #1989 RuntimeException: generated bytecode for method exceeds 64K limit
RBRi via HtmlUnit-develop <[email protected]> Wed, 21 Nov 2018 20:47:52 -0000
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | </p/htmlunit/bugs/1989/8aca49de02951dc7013dfe45fbb586bfa4bb02e3.bugs@htmlunit.p.sourceforge.net> |
- **status**: accepted --> closed
---
** [bugs:#1989] RuntimeException: generated bytecode for method exceeds 64K limit**
**Status:** closed
**Group:** 2.33
**Created:** Thu Sep 13, 2018 08:48 PM UTC by Etrenak
**Last Updated:** Wed Nov 21, 2018 08:47 PM 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 [email protected] 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.
_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop