Problem starting webapp i SuperDev mode in IntelliJ

已查看 57 次
跳至第一个未读帖子

Jostein

未读,
2024年4月2日 10:23:184月2日
收件人 GWT Users

I have been using gwt for many years and it has worked great, until now. When I run my applications in Super Dev mode from IntelliJ I get the following error.

I am using IntelliJ, gwt 2.10.0, Java 11 , maven. I have tried different versions of gwt and Java and get the same error. 


Thanks for any help 


Starting Jetty on port 8888

   [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@1adbca7e{/,file:///C:/Users/joste/AppData/Local/JetBrains/IntelliJIdea2023.3/gwt/mlogg3-gwt.162ce089/mLogg3.88983323/run/www/,UNAVAILABLE}{C:\Users\joste\AppData\Local\JetBrains\IntelliJIdea2023.3\gwt\mlogg3-gwt.162ce089\mLogg3.88983323\run\www}

javax.servlet.ServletException: jsp==org.eclipse.jetty.jsp.JettyJspServlet@19c47{jsp=null,order=0,inst=true,async=false,src=DESCRIPTOR:jar:file:/C:/Users/joste/.m2/repository/org/eclipse/jetty/jetty-webapp/9.4.44.v20210927/jetty-webapp-9.4.44.v20210927.jar!/org/eclipse/jetty/webapp/webdefault.xml,STARTED}

at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:650)

at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)

at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:731)

at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)

at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)

at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)

at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)

at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)

at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)

at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:755)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)

at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:910)

at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)

at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:568)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)

at org.eclipse.jetty.server.Server.start(Server.java:423)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)

at org.eclipse.jetty.server.Server.doStart(Server.java:387)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)

at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:776)

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: java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:79)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)

at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(ContextHandler.java:2881)

at org.eclipse.jetty.servlet.ServletContextHandler$Context.createInstance(ServletContextHandler.java:1299)

at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createServlet(ContextHandler.java:2898)

at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1202)

at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:592)

... 32 more



My pom file is as follows:


<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">


 <!-- POM file generated with GWT webAppCreator -->

 <modelVersion>4.0.0</modelVersion>

 <groupId>no.betelo</groupId>

 <artifactId>mLogg3</artifactId>

 <packaging>war</packaging>

 <version>2.0.2</version>

 <name>no.betelo.mLogg3</name>


 <properties>


   <!-- Setting maven.compiler.source to something different to 1.8

        needs that you configure the sourceLevel in gwt-maven-plugin since

        GWT compiler 2.8 requires 1.8 (see gwt-maven-plugin block below) -->

   <maven.compiler.source>1.8</maven.compiler.source>

   <maven.compiler.target>1.8</maven.compiler.target>

   <maven.compiler.showWarning>true</maven.compiler.showWarning>

   <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>


   <!-- Don't let your Mac use a crazy non-standard encoding -->

   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

   <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>


   <timestamp>${maven.build.timestamp}</timestamp>

   <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

 </properties>


 <dependencyManagement>

   <dependencies>

     <dependency>

       <groupId>org.gwtproject</groupId>

       <artifactId>gwt</artifactId>

       <version>2.10.0</version>

       <type>pom</type>

       <scope>import</scope>

     </dependency>

   </dependencies>

 </dependencyManagement>


 <dependencies>


   <dependency>

     <groupId>junit</groupId>

     <artifactId>junit</artifactId>

     <version>4.12</version>

     <scope>test</scope>

   </dependency>

   <dependency>

     <groupId>org.hamcrest</groupId>

     <artifactId>hamcrest-all</artifactId>

     <version>1.3</version>

     <scope>test</scope>

   </dependency>

   <dependency>

     <groupId>no.betelo</groupId>

     <artifactId>mlogg-storage-common</artifactId>

     <version>1.5-SNAPSHOT</version>

   </dependency>

   <dependency>

     <groupId>no.betelo</groupId>

     <artifactId>mlogg-map</artifactId>

     <version>1.37-SNAPSHOT</version>

   </dependency>


   <dependency>

     <groupId>no.betelo</groupId>

     <artifactId>mlogg-gwt-common</artifactId>

     <version>1.5-SNAPSHOT</version>

   </dependency>


   <dependency>

     <groupId>org.riversun</groupId>

     <artifactId>fcm</artifactId>

     <version>0.2.0</version>

   </dependency>


   <dependency>

     <groupId>com.twilio.sdk</groupId>

     <artifactId>twilio</artifactId>

     <version>7.29.0</version>

   </dependency>


   <dependency>

     <groupId>org.apache.poi</groupId>

     <artifactId>poi</artifactId>

     <version>4.1.2</version>

   </dependency>

   <dependency>

     <groupId>org.apache.poi</groupId>

     <artifactId>poi-ooxml</artifactId>

     <version>4.1.2</version>

   </dependency>


   <!-- http://mvnrepository.com/artifact/org.osgeo/proj4j -->

   <dependency>

     <groupId>org.osgeo</groupId>

     <artifactId>proj4j</artifactId>

     <version>0.1.0</version>

   </dependency>


   <!-- http://mvnrepository.com/artifact/com.vividsolutions/jts -->

   <dependency>

     <groupId>com.vividsolutions</groupId>

     <artifactId>jts</artifactId>

     <version>1.13</version>

   </dependency>


   <dependency>

     <groupId>com.googlecode.json-simple</groupId>

     <artifactId>json-simple</artifactId>

     <version>1.1</version>

   </dependency>


   <dependency>

     <groupId>com.sun.mail</groupId>

     <artifactId>javax.mail</artifactId>

     <version>1.6.1</version>

   </dependency>


   <dependency>

     <groupId>com.squareup.okhttp3</groupId>

     <artifactId>okhttp</artifactId>

     <version>3.14.9</version>

   </dependency>


   <dependency>

     <groupId>org.apache.commons</groupId>

     <artifactId>commons-lang3</artifactId>

     <version>3.0</version>

   </dependency>


 </dependencies>


 <build>

   <!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->

   <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>


   <resources>

     <resource>

       <!-- copy logback to classpath -->

       <directory>src/main/resources</directory>

       <targetPath>./</targetPath>

       <includes>

         <include>logback.xml</include>

       </includes>

       <filtering>false</filtering>

     </resource>


     <resource>

       <directory>src/main/resources</directory>

       <targetPath>no/betelo/resources/</targetPath>

       <excludes>

         <exclude>logback.xml</exclude>

       </excludes>

       <filtering>true</filtering>

     </resource>

   </resources>


   <plugins>


     <!-- GWT Maven Plugin-->

     <plugin>

       <groupId>net.ltgt.gwt.maven</groupId>

       <artifactId>gwt-maven-plugin</artifactId>

       <version>1.1.0</version>

       <extensions>true</extensions>

       <executions>

         <execution>

           <goals>

             <goal>compile</goal>

             <goal>test</goal>

           </goals>

         </execution>

       </executions>

       <configuration>

         <moduleName>no.betelo.mLogg3</moduleName>

         <moduleShortName>mLogg3</moduleShortName>

         <failOnError>false</failOnError>

         <failIfNoTests>false</failIfNoTests>

         <!-- GWT compiler 2.8 requires 1.8, hence define sourceLevel here if you use

              a different source language for java compilation -->

         <sourceLevel>1.8</sourceLevel>

         <!-- Compiler configuration -->

         <compilerArgs>

           <!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

           <arg>-compileReport</arg>

           <arg>-XcompilerMetrics</arg>

         </compilerArgs>

         <!-- DevMode configuration -->

         <warDir>${project.build.directory}/${project.build.finalName}</warDir>

         <classpathScope>compile+runtime</classpathScope>

         <!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

         <startupUrls>

           <startupUrl>mLogg3.html</startupUrl>

         </startupUrls>

       </configuration>

     </plugin>


     <plugin>

       <groupId>org.apache.maven.plugins</groupId>

       <artifactId>maven-war-plugin</artifactId>

       <version>3.3.1</version>

     </plugin>

     <plugin>

       <groupId>org.apache.maven.plugins</groupId>

       <artifactId>maven-compiler-plugin</artifactId>

       <version>3.8.1</version>

     </plugin>


     <!-- Normal "junit" test execution in addition to gwt:test instead -->

     <!--<plugin>

       <artifactId>maven-surefire-plugin</artifactId>

       <version>2.12.4</version>

       <configuration>

         <excludes>

           <exclude>**/*GwtTest*.java</exclude>

         </excludes>

         <skipTests>false</skipTests>

       </configuration>

     </plugin>-->


   </plugins>

 </build>

</project>



Jens

未读,
2024年4月2日 11:20:284月2日
收件人 GWT Users
Looks like IntelliJ uses a newer Java version than 11 to launch SuperDevMode (class DirectConstructorHandleAccessor does not exist in Java 11). Try using an older Java version because the embedded Jetty in SuperDevMode is 9.4.44 and it might have trouble with newer Java versions.

-- J.

回复全部
回复作者
转发
0 个新帖子