在Jetty8上运行vaadin 8时出错

时间:2017-10-02 19:25:40

标签: jetty vaadin8

我刚将我的应用程序从vaadin 7迁移到vaadin 8.1.4。当我在Jetty 8上运行我的应用程序时,我收到以下错误(只有一次)。应用程序似乎工作正常,但现在确定如何摆脱此错误

    2017-10-02 15:21:32.608:WARN:oejs.ServletHandler:Error for /PUSH
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.upgrade(Ljava/lang/Class;)Ljavax/servlet/http/HttpUpgradeHandler;
    at org.apache.tomcat.websocket.server.UpgradeUtil.doUpgrade(UpgradeUtil.java:234)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:77)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:748)

可能的原因是什么?

附件是我的POM文件

<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">
<modelVersion>4.0.0</modelVersion>
<groupId>sample</groupId>
<artifactId>sample</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>sample Maven Webapp</name>
<url>http://maven.apache.org</url>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <!-- JUnit -->
    <junit.version>4.12</junit.version>

    <!-- SureFire -->
    <surefire.version>2.18.1</surefire.version>

    <!-- Spring -->
    <spring.version>4.1.6.RELEASE</spring.version>
    <spring.security.version>4.0.4.RELEASE</spring.security.version>

    <!-- Hibernate / JPA -->
    <hibernate.version>4.3.9.Final</hibernate.version>
    <hibernate.validator.version>5.1.3.Final</hibernate.validator.version>

    <!-- Logging -->
    <log4j.version>1.2.17</log4j.version>

    <!-- Vaadin -->
    <vaadin.version>8.1.2</vaadin.version>
    <vaadin.charts.version>4.0.0</vaadin.charts.version>
    <vaadin.filteringtable.version>0.9.15.v7</vaadin.filteringtable.version>
    <vaadin.spring.version>1.1.1</vaadin.spring.version>
    <vaadin.spring.integration.version>3.1</vaadin.spring.integration.version>

    <!-- Servlet -->
    <javax.api.version>3.0.1</javax.api.version>
    <javax.jstl.version>1.2</javax.jstl.version>
    <asm.version>5.0.3</asm.version>

    <!-- Apache -->
    <apache.commons.version>2.6</apache.commons.version>

    <!-- SQL Connector -->
    <sqlconnector.version>5.1.35</sqlconnector.version>

    <!-- JBibText -->
    <jbibtex.version>1.0.15</jbibtex.version>

    <!-- Joda -->
    <joda.version>2.8.2</joda.version>

    <!-- Stax -->
    <stax.version>1.2.0</stax.version>

    <!-- iText -->
    <itext.version>5.0.6</itext.version>

    <!-- Java Home -->
    <JAVA_HOME>C:\Program Files\Java\jdk1.8.0_45\</JAVA_HOME>

    <!-- Java Version -->
    <java.version>1.8</java.version>

    <!-- Flyway -->
    <flyway.version>3.2.1</flyway.version>

</properties>

<dependencies>
    <!-- JUnit -->
    <dependency>
        <groupId>JUnit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
    </dependency>
    <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-test</artifactId>
          <scope>test</scope>
    </dependency>

    <!-- Spring -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
    </dependency>       
    <dependency> 
         <groupId>org.springframework</groupId> 
         <artifactId>spring-aspects</artifactId> 
         <version>4.1.5.RELEASE</version> 
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.security.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
        <version>2.0.1</version>
    </dependency> 
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
    </dependency>

    <!-- Servlet -->        
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>${javax.api.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>${javax.jstl.version}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asm.version}</version>
        <scope>compile</scope>
    </dependency>

    <!-- Hibernate -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>${hibernate.validator.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-ehcache</artifactId>
      <version>${hibernate.version}</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/net.sf.ehcache/ehcache-core -->
    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-core</artifactId>
        <version>2.6.11</version>
    </dependency>
    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>2.10.0</version>
    </dependency>

    <!-- SQL -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${sqlconnector.version}</version>
        <scope>runtime</scope>
    </dependency>


    <!-- Logging -->
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.25</version>
    <scope>test</scope>
</dependency>



    <!-- Flyway -->
    <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>${flyway.version}</version>
    </dependency>

    <!-- EventBus -->
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>18.0</version>
    </dependency>

    <!-- Vaadin -->
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-compatibility-server</artifactId>
        <version>${vaadin.version}</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-compatibility-client-compiled</artifactId>
        <version>${vaadin.version}</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-compatibility-client</artifactId>
        <version>${vaadin.version}</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-compatibility-shared</artifactId>
        <version>${vaadin.version}</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiler</artifactId>
        <version>${vaadin.version}</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-themes</artifactId>
        <version>${vaadin.version}</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-push</artifactId>
        <version>${vaadin.version}</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
        <version>2.0.1</version>
    </dependency>

    <!-- Vaadin Addons -->
    <dependency>
       <groupId>com.vaadin</groupId>
       <artifactId>vaadin-charts</artifactId>
       <version>${vaadin.charts.version}</version>
    </dependency>

    <dependency>
       <groupId>org.vaadin.alump.labelbutton</groupId>
       <artifactId>labelbutton-addon</artifactId>
       <version>0.2.0</version>
    </dependency > 

    <dependency>
        <groupId>org.vaadin.addons</groupId>
        <artifactId>vaadin-combobox-multiselect</artifactId>
        <version>2.0.1</version>
    </dependency>

    <dependency>
       <groupId>org.vaadin.addon</groupId>
       <artifactId>confirmdialog</artifactId>
       <version>3.2.0</version>
    </dependency>

    <dependency>
       <groupId>org.vaadin.addons</groupId>
       <artifactId>animator</artifactId>
       <version>3.0.0</version>
    </dependency>

    <!-- Apache Commons -->
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${apache.commons.version}</version>
    </dependency>

    <!-- jbibtext -->
    <dependency>
        <groupId>org.jbibtex</groupId>
        <artifactId>jbibtex</artifactId>
        <version>${jbibtex.version}</version>
    </dependency>

    <!-- Joda -->
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${joda.version}</version>
    </dependency>

    <dependency>
        <groupId>stax</groupId>
        <artifactId>stax</artifactId>
        <version>${stax.version}</version>
    </dependency>

    <!-- JSoup -->
    <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.8.3</version>
    </dependency>

    <!-- iText -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itextpdf</artifactId>
        <version>${itext.version}</version>
    </dependency>


    <!-- Jackson 4 JSON -->
     <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.8.8</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.8.8</version>
    </dependency>    

    <!-- Mail -->
    <dependency>
        <groupId>com.sun.mail</groupId>
        <artifactId>javax.mail</artifactId>
        <version>1.5.2</version>
    </dependency>
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>javax.mail-api</artifactId>
        <version>1.5.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework/spring-context-support -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>3.2.0.RELEASE</version>
    </dependency>


    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
    </dependency>


</dependencies>

<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>

    <repository>
        <id>osssonatype</id>
        <name>OSS Sonatype</name>
        <url>https://repo1.maven.org/maven2/</url>
        <layout>default</layout>
    </repository>
</repositories>


<build>
 <resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.sql</include>
            </includes>
        </resource>
         <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*</include>
            </includes>
        </resource>
    </resources>
    <finalName>sample</finalName>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>${surefire.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <verbose>true</verbose>
                    <!-- <fork>true</fork> -->
                    <executable>${JAVA_HOME}/bin/javac</executable>
                    <compilerVersion>${java.version}</compilerVersion>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <filesets>
                        <fileset><directory>${project.build.directory}/${project.build.finalName}</directory></fileset>
                    </filesets>
                </configuration>
            </plugin>   

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <webResource>
                            <directory>target/sample/CustomWidgetset</directory>
                            <targetPath>VAADIN/widgetsets/CustomWidgetset</targetPath>
                            <filtering>false</filtering>
                        </webResource>
                    </webResources>
                </configuration>
            </plugin>       

            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.version}</version>
                <configuration>
                    <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                    <!-- <runTarget>mobilemail</runTarget> -->
                    <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This 
                        way compatible with Vaadin eclipse plugin. -->
                    <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
                    <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                    <noServer>true</noServer>
                    <!-- Remove draftCompile when project is ready -->
                    <draftCompile>false</draftCompile>
                    <compileReport>true</compileReport>
                    <style>OBF</style>
                    <strict>true</strict>
                    <runTarget>http://localhost:8080/</runTarget>
                </configuration>
                <executions>
                    <execution>
                        <configuration>
                            <!-- if you don't specify any modules, the plugin will find them -->
                            <!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module> 
                                </modules> -->
                        </configuration>
                        <goals>
                            <goal>clean</goal>
                            <goal>resources</goal>
                            <goal>update-theme</goal>
                            <goal>update-widgetset</goal>
                            <goal>compile-theme</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.8</version>
            <configuration>
                <outxml>true</outxml>
                <verbose>true</verbose>
                <showWeaveInfo>true</showWeaveInfo>
                <forceAjcCompile>true</forceAjcCompile> 
                <aspectLibraries>
                    <aspectLibrary>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aspects</artifactId>
                    </aspectLibrary>
                </aspectLibraries>
                <complianceLevel>${java.version}</complianceLevel>
                <source>${java.version}</source>
                <target>${java.version}</target>
            </configuration>

            <executions>
                <execution>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>compile</goal>
                        <goal>test-compile</goal>
                    </goals>
                </execution>
            </executions>

        </plugin> 
        </plugins>
    </pluginManagement>
</build>

0 个答案:

没有答案