JavaScript validation error when calling a JakartaEE10 MyFaces page
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, javascript
調査の方向性
Start by inspecting the attached test.js and the JavaScript served as faces.js.jsf in the TomEE reproduction; compare it with the version served under Mojarra on WildFly. Run the provided Maven sample with Java 17 and TomEE 10.0M2 to reproduce the parser error. Done means identifying and addressing the incompatibility so the Jakarta Faces page with an Ajax call loads without the exception.
索引モデルが issue の本文から書いたものです。
説明
Using HtmlUnitDriver 4.23.0, I observe an ugly EvaluatorException when calling a minimal Jakarta Faces page with just an Ajax call:
org.htmlunit.corejs.javascript.EvaluatorException: syntax error (http://localhost:8080/test/jakarta.faces.resource/faces.js.jsf;jsessionid=6C2C888968266540AA88DD3A0FCD95C5?ln=jakarta.faces&stage=Development#194)
at org.htmlunit.javascript.HtmlUnitContextFactory$HtmlUnitErrorReporter.error (HtmlUnitContextFactory.java:399)
at org.htmlunit.corejs.javascript.Parser.addError (Parser.java:241)
… (a lot of parser methods)...
at org.htmlunit.corejs.javascript.Context.parse (Context.java:2550)
at org.htmlunit.corejs.javascript.Context.compileImpl (Context.java:2481)
at org.htmlunit.corejs.javascript.Context.compileString (Context.java:1443)
at org.htmlunit.javascript.HtmlUnitContextFactory$TimeoutContext.compileString (HtmlUnitContextFactory.java:193)
at org.htmlunit.corejs.javascript.Context.compileString (Context.java:1431)
at org.htmlunit.javascript.JavaScriptEngine$1.doRun (JavaScriptEngine.java:722)
at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run (JavaScriptEngine.java:930)
at org.htmlunit.corejs.javascript.Context.call (Context.java:586)
at org.htmlunit.corejs.javascript.ContextFactory.call (ContextFactory.java:481)
at org.htmlunit.javascript.HtmlUnitContextFactory.callSecured (HtmlUnitContextFactory.java:315)
at org.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:731)
at org.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:112)
at org.htmlunit.html.HtmlPage.loadJavaScriptFromUrl (HtmlPage.java:1124)
at org.htmlunit.html.HtmlPage.loadExternalJavaScriptFile (HtmlPage.java:1015)
at org.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded (ScriptElementSupport.java:191)
at org.htmlunit.html.ScriptElementSupport$1.execute (ScriptElementSupport.java:112)
at org.htmlunit.html.ScriptElementSupport.onAllChildrenAddedToPage (ScriptElementSupport.java:135)
at org.htmlunit.html.HtmlScript.onAllChildrenAddedToPage (HtmlScript.java:192)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:508)
at org.htmlunit.cyberneko.xerces.parsers.AbstractSAXParser.endElement (AbstractSAXParser.java:291)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:454)
at org.htmlunit.cyberneko.HTMLTagBalancer.callEndElement (HTMLTagBalancer.java:1220)
at org.htmlunit.cyberneko.HTMLTagBalancer.endElement (HTMLTagBalancer.java:1164)
at org.htmlunit.cyberneko.filters.DefaultFilter.endElement (DefaultFilter.java:168)
at org.htmlunit.cyberneko.filters.NamespaceBinder.endElement (NamespaceBinder.java:266)
at org.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement (HTMLScanner.java:3208)
at org.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan (HTMLScanner.java:2098)
at org.htmlunit.cyberneko.HTMLScanner.scanDocument (HTMLScanner.java:909)
at org.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:336)
at org.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:294)
at org.htmlunit.cyberneko.xerces.parsers.AbstractXMLDocumentParser.parse (AbstractXMLDocumentParser.java:80)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.parse (HtmlUnitNekoDOMBuilder.java:753)
at org.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser.parse (HtmlUnitNekoHtmlParser.java:195)
at org.htmlunit.DefaultPageCreator.createHtmlPage (DefaultPageCreator.java:300)
at org.htmlunit.DefaultPageCreator.createPage (DefaultPageCreator.java:219)
at org.htmlunit.WebClient.loadWebResponseInto (WebClient.java:681)
at org.htmlunit.WebClient.loadWebResponseInto (WebClient.java:575)
at org.htmlunit.WebClient.getPage (WebClient.java:493)
at org.htmlunit.WebClient.getPage (WebClient.java:402)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.get (HtmlUnitDriver.java:638)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$get$7 (HtmlUnitDriver.java:619)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$runAsync$0 (HtmlUnitDriver.java:351)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
at java.lang.Thread.run (Thread.java:842)
Posting the full stacktrace probably does not bring any additional information.
I have a sample to reprocuce, but i requires a few steps:
- download TomEE 10.0M2 from https://tomee.apache.org/download.html (you need "TomEE Webprofile zip") and unzip
- you need Java 17
- rename attached "test.war.zip" to "test.war" and copy it to to TOMEE_HOME\webapps:
test.war.zip - start TomEE: TOMEE_HOME\bin\startup.bat (or startup.sh)
- you can test the app by browsing to http://localhost:8080/test/index.jsf
- now launch attached sample "htmlunittest.zip" (a small Eclipse maven project):
mvn clean compile exec:java- you should see a large exception.
htmlunittest.zip
From the log output, I picked this JavaScript file:
test.js.zip
I ran my sample also on WildFly, which includes the Mojarra Jakarta Faces implementation, and here the error did not happen. So maybe it is really a syntax error?
- 主要言語
- JavaScript
- スター
- 952
- フォーク
- 183
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HtmlUnit/htmlunit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
HtmlUnit/htmlunit の issue をすべて見る
似ている issue
-
Add: &TV Logoオープンcheck:passed logos:add
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
-
BUG: Appointment time renders blank and PM appointment slots miscalculate vertical position in CalendarScreen対応中かも @aryanpatil-07 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/BabyNest#297 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Onboarding form: instructor radio never pre-selected "Yes" (permission vs permissions typo)対応中かも @ThakuraAnki が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
WikiEducationFoundation/WikiEduDashboard#7235 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信