#java #maven #intellij-idea #gwt #http-status-code-503
#java #maven #intellij-идея #gwt #http-status-code-503
Вопрос:
Я новичок в GWT. Я уже сгенерировал первые приложения, которые работали, и я застрял на другом — я не могу запустить. Я получил в своем браузере статус 503
Я что-то забыл?
Все в разделе модуля настроек проекта такое же, как и в других приложениях, pom.xml все то же самое, может быть, мне следует внести некоторые изменения в web.xml ? Найдя некоторые решения подобной проблемы, я удалил в web.xml запишите эти строки:
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>eu.mrndesign.matned.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/arkanoidgame/greet</url-pattern>
</servlet-mapping>
вот трассировка стека:
> Starting Jetty on port 8888
[WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@3027a1f1{/,file:/C:/Users/matni/.IntelliJIdea2019.3/system/gwt/arkanoidgame.b9d5fc4/ArkanoidGame.513aa147/run/www/,STARTING}{C:Usersmatni.IntelliJIdea2019.3systemgwtarkanoidgame.b9d5fc4ArkanoidGame.513aa147runwww}
MultiException[java.lang.RuntimeException: Error scanning file ArkanoidGame$1.class, java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler.class, java.lang.RuntimeException: Error scanning file ArkanoidGame.class]
at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:536)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:479)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1337)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:550)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start(Server.java:387)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:354)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:760)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:636)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:898)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:705)
at com.google.gwt.dev.DevMode.main(DevMode.java:432)
Caused by: MultiException[java.lang.RuntimeException: Error scanning file ArkanoidGame$1.class, java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler.class, java.lang.RuntimeException: Error scanning file ArkanoidGame.class]
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:681)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:824)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler$1.class
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)
... 10 more
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)
... 10 more
Suppressed: java.lang.RuntimeException: Error scanning file ArkanoidGame$1MyHandler.class
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)
... 10 more
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)
... 10 more
Suppressed: java.lang.RuntimeException: Error scanning file ArkanoidGame.class
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)
... 10 more
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:660)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)
... 10 more
Caused by: java.lang.RuntimeException: Error scanning file ArkanoidGame$1.class
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)
... 10 more
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)
at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)
... 10 more
2020-12-13 10:41:02.813:INFO:oejs.ServerConnector:main: Started ServerConnector@2f067ac5{HTTP/1.1}{127.0.0.1:8888}
2020-12-13 10:41:02.815:INFO:oejs.Server:main: Started @18361ms
Dev Mode initialized. Startup URL:
http://127.0.0.1:8888/ArkanoidGame.html
[ERROR] 503 - GET /ArkanoidGame.html (127.0.0.1) 305 bytes
Request headers
Host: 127.0.0.1:8888
Connection: keep-alive
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept: text/html,application/xhtml xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
Response headers
Date: Sun, 13 Dec 2020 09:41:03 GMT
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 305
Комментарии:
1. Похоже на проблему Java 11. Попробуйте использовать gwt-maven-architype Томаса Бройера ( github.com/tbroyer/gwt-maven-archetypes ), github.com/NaluKit/gwt-maven-springboot-archetype , или создайте проект Nalu GWT отсюда: mvp4g.org/boot-starter-nalu/BootStarterNalu.html
2. @ElHoss значит, он использует плагин Mojo gwt-maven-plugin, который не поддерживает Java 11?
3. Не думайте, что проблема в плагине. Я думаю, что это версия Jetty.
4.Проверьте эти потоки: github.com/devsoap/ds-gradle-vaadin/issues/172 github.com/eclipse/jetty.project/issues/2941
Ответ №1:
Обновите версии ASM или Jetty до версии, поддерживающей Java 11 . См. https://github.com/eclipse/jetty.project/issues/2941
Комментарии:
1. ну, я думаю, это проблема, я понизил рейтинг jdk, и это сработало. Когда я обновил Jetty, я мог использовать jdk11. Большое спасибо.
2. любой шаг по его обновлению?