NoSuchMethodError:org.eclipse.jetty.websocket.server.WebSocketServerFactory。< init>(Ljavax / servlet / ServletContext;)V [英] NoSuchMethodError: org.eclipse.jetty.websocket.server.WebSocketServerFactory.<init>(Ljavax/servlet/ServletContext;)V

查看:1668
本文介绍了NoSuchMethodError:org.eclipse.jetty.websocket.server.WebSocketServerFactory。< init>(Ljavax / servlet / ServletContext;)V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当通过eclipse插件启动我的应用程序时,我有这个异常:
Run as>使用jetty的GWT开发模式

环境

- GWT SDK 2.8

- spring-boot 1.5.2.RELEASE

- jetty 9.4.2

- GWT Eclipse插件3.0.0



上下文:将GWT 2.6应用程序迁移到GWT 2.8并使用GWT生成的spring-boot

应用程序pom webAppCreator

以下是堆栈跟踪

  **线程main中的异常java.lang.NoSuchMethodError:
org.eclipse.jetty.websocket.server.WebSocketServerFactory。< init>(Ljavax / servlet / ServletContext;)V **
at org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration。< init>(NativeWebSocketConfiguration.java:53)
at org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer.getDefaultFrom(NativeWebSocketServletContainerInitializer.java:36 )在org.eclipse.jet上
ty.websocket.server.NativeWebSocketServletContainerInitializer.onStartup(NativeWebSocketServletContainerInitializer.java:46)
在org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
在org.eclipse。 jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty。 servlet.ServletContextHandler.startContext(ServletContextHandler.java:329)
位于org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
位于org.eclipse.jetty.webapp.WebAppContext。 startContext(WebAppContext.java:1442)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart( ServletContextHandler.java:261)
在org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
在com.goog le.gwt.dev.shell.jetty.JettyLauncher $ WebAppContextWithReload.doStart(JettyLauncher.java:550)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
在org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)$ b $ org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:452)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:419)
at org.eclipse.jetty.uti l.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
,位于com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:759)
,位于com.google。 gwt.dev.DevMode.doStartUpServer(DevMode.java:634)
位于com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923)
位于com.google.gwt.dev。 DevModeBase.run(DevModeBase.java:706)
at com.google.gwt.dev.DevMode.main(DevMode.java:430)

为什么我的应用程序无法启动?

这是我的pom和依赖关系树。
感谢您的帮助


pom.xml

 <?xml version =1.0encoding =UTF-8?> 
< project xmlns =http://maven.apache.org/POM/4.0.0xmlns: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\">
<! - 使用GWT webAppCreator生成的POM文件 - >
< modelVersion> 4.0.0< / modelVersion>
< groupId> com.mycompany.fonems.webapp< / groupId>
< artifactId> Fonemswebapp< / artifactId>
<包装>战争< / packaging>
< version> 1.0-SNAPSHOT< / version>
< name> com.mycompany.fonems.webapp.Fonemswebapp< / name>
< parent> <&的groupId GT; org.springframework.boot< /&的groupId GT;
< artifactId> spring-boot-starter-parent< / artifactId>
< version> 1.5.2.RELEASE< / version>
< / parent>
<属性>
<! - 将maven.compiler.source设置为不同于1.8
的值需要您自gwt-maven-plugin配置sourceLevel,因为
GWT编译器2.8需要1.8(请参阅gwt-下面的maven-plugin块) - >
< maven.compiler.source> 1.8< /maven.compiler.source>
< maven.compiler.target> 1.8< /maven.compiler.target>
<! - 不要让你的Mac使用疯狂的非标准编码 - >
< project.build.sourceEncoding> UTF-8< /project.build.sourceEncoding>
< project.reporting.outputEncoding> UTF-8< /project.reporting.outputEncoding>
< smartgwt.version> 3.1< /smartgwt.version>
< / properties>
< dependencyManagement>
<依赖关系>
<! - 确保所有的GWT代码使用相同的版本(除非被覆盖) - >
< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt< / artifactId>
< version> 2.8.0< / version>
< type> pom< / type>
< scope> import< / scope>
< /依赖关系>
< /依赖关系>
< / dependencyManagement>
<依赖关系>
< dependency>
< groupId> com.mycompany.fonems< / groupId>
< artifactId> fonems-fwk-server-common< / artifactId>
< version> 0.0.104-SNAPSHOT< / version>
<排除项>
<排除>
< artifactId> xercesImpl< / artifactId>
< groupId> xerces< / groupId>
< /排除>
< /排除>
< /依赖关系>
< dependency>
< groupId> com.mycompany.fonems< / groupId>
< artifactId> fonems-refonte-dao< / artifactId>
< version> 0.0.104-SNAPSHOT< / version>
<排除项>
<排除>
< artifactId> javax.el-api< / artifactId>
< groupId> javax.el< / groupId>
< /排除>
<排除>
< artifactId> xercesImpl< / artifactId>
< groupId> xerces< / groupId>
< /排除>
< /排除>
< /依赖关系>
< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt-servlet< / artifactId>
< scope>运行时< / scope>
< /依赖关系>
< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt-user< / artifactId>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> com.google.gwt< / groupId>
< artifactId> gwt-dev< / artifactId>
< scope>提供< / scope>
<排除项>
<排除>
< artifactId> xercesImpl< / artifactId>
< groupId> xerces< / groupId>
< /排除>
< /排除>
< /依赖关系>
< dependency>
< groupId> com.smartgwt< / groupId>
< artifactId> smartgwt< / artifactId>
< version> $ {smartgwt.version}< / version>
< /依赖关系>
< dependency>
< groupId> com.smartgwt< / groupId>
< artifactId> smartgwt-skins< / artifactId>
< version> $ {smartgwt.version}< / version>
<可选> true< /可选>
< /依赖关系>
< dependency>
< groupId> mycompany.drh< / groupId>
< artifactId> newncauth< / artifactId>
< version> $ {mycompany.drh.version}< / version>
< /依赖关系>
< dependency>
< groupId> mycompany.drh< / groupId>
< artifactId> mycompany.droits-habilitations.rmi< / artifactId>
< version> $ {mycompany.drh.rmi.version}< / version>
< /依赖关系>
< dependency>
< groupId> junit< / groupId>
< artifactId> junit< / artifactId>
< scope> test< / scope>
< /依赖关系>
< dependency>
< groupId> org.projectlombok< / groupId>
< artifactId> lombok< / artifactId>
< scope>编译< / scope>
< /依赖关系>
< /依赖关系>
< build>
<! - 将类直接输出到webapp中,以便IDE和mvn process-classes在DevMode中更新它们 - >
< outputDirectory> $ {project.build.directory} / $ {project.build.finalName} / WEB-INF / classes< / outputDirectory>
< plugins>
<! - GWT Maven Plugin - >
< plugin>
< groupId> net.ltgt.gwt.maven< / groupId>
< artifactId> gwt-maven-plugin< / artifactId>
< version> 1.0-rc-6< / version>
<执行次数>
<执行>
<目标>
< goal> import-sources< / goal>
< goal>编译< / goal>
< goal> import-test-sources< / goal>
< goal> test< / goal>
< /目标>
< /执行>
< /执行次数>
<配置>
< moduleName> com.mycompany.fonems.webapp.Fonemswebapp< / moduleName>
< moduleShortName> Fonemswebapp< / moduleShortName>
< failOnError> true< / failOnError>
<! - GWT编译器2.8需要1.8,因此如果您使用
作为java编译的不同源语言,则在此定义sourceLevel - >
< sourceLevel> 1.8< / sourceLevel>
<! - 编译器配置 - >
< compilerArgs>
<! - 请GWT创建您编译的故事(SOYC)(gwt:compile) - >
< arg> -compileReport< / arg>
< arg> -XcompilerMetrics< / arg>
< / compilerArgs>
<! - DevMode配置 - >
< warDir> $ {project.build.directory} / $ {project.build.finalName}< / warDir>
< classpathScope>编译+运行时< / classpathScope>
<! - 应该由DevMode(gwt:devmode)打开的URL。 - >
< startupUrls>
< startupUrl> Fonemswebapp.html< / startupUrl>
< / startupUrls>

<! - < webappDirectory> $ {outputFolder}< / webappDirectory> - >
< / configuration>

< / plugin>

<! - 跳过正常的测试执行,我们使用gwt:test代替 - >
< plugin>
< artifactId> maven-surefire-plugin< / artifactId>
< version> 2.17< / version>
<配置>
< skip> true< / skip>
< / configuration>
< / plugin>
< / plugins>
< / build>
< / project>

依赖关系树



  ------------------------------------- ----------------------------------- 
构建com.mycompany.fonems.webapp.Fonemswebapp 1.0 -SNAPSHOT
-------------------------------------------- ----------------------------

--- maven-dependency-plugin:2.10:tree(默认值-cli)@ Fonemswebapp ---
com.mycompany.fonems.webapp:Fonemswebapp:war:1.0-SNAPSHOT
+ - com.mycompany.fonems:fonems-fwk-server-common:jar:0.0 .104-SNAPSHOT:编译
| + - commons-configuration:commons-configuration:jar:1.9:编译
| | \- commons-logging:commons-logging:jar:1.1.1:编译
| + - commons-beanutils:commons-beanutils:jar:1.9.3:编译
| + - org.codehaus.jackson:jackson-mapper -asl:jar:1.9.13:compile
| | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
| + - joda-time:joda-time:jar:2.9.7:编译
| + - org.apache.commons:commons-lang3:jar:3.1:编译
| + - commons-io:commons-io:jar:2.4:编译
| + - commons-lang:commons-lang:jar:2.6:编译
| + - commons-collections:commons-collections:jar:3.2.2:编译
| + - org.springframework:spring-tx:jar:4.3.7.RELEASE:compile
| + - org.springframework:spring-context:jar:4.3.7.RELEASE:compile
| | + - org.springframework:spring-aop:jar:4.3.7.RELEASE:compile
| | \- org.springframework:spring-expression:jar:4.3.7.RELEASE:compile
| + - javax.xml.bind:jaxb-api:jar:2.2.12:编译
| + - javax.validation:validation-api:jar:1.1.0.Final:编译
| + - com.google.guava:guava:jar:18.0:编译
| + - commons-betwixt:commons-betwixt:jar:0.8:编译
| | + - commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
| | \- commons-digester:commons-digester:jar:2.1:编译
| + - net.sf.dozer:dozer:jar:5.4.0:编译
| + - org.slf4j:jcl-over-slf4j:jar:1.7.24:compile
| + - uk.org.lidalia:sysout-over-slf4j:jar:1.0.2:编译
| + - org.slf4j:slf4j-api:jar:1.7.24:编译
| \- ch.qos.logback:logback-classic:jar:1.1.11:compile
| \- ch.qos.logback:logback-core:jar:1.1.11:compile
+ - com.mycompany.fonems:fonems-refonte-dao:jar:0.0.104-SNAPSHOT:compile
| + - com.zaxxer:HikariCP:jar:2.5.1:编译
| + - org.lazyluke:log4jdbc-remix:jar:0.2.7:compile
| + - com.mycompany.fonems:fonems-config:jar:0.0.104-SNAPSHOT:compile
| + - com.mycompany.fonems:fonems-refonte-model:jar:0.0.104-SNAPSHOT:compile
| | + - org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.6.4:compile
| | + - openaccess:comFidessaInf:jar:3.0.1:编译
| | + - org.springframework.boot:spring-boot-starter-validation:jar:1.5.2.RELEASE:compile
| | | + - org.springframework.boot:spring-boot-starter:jar:1.5.2.RELEASE:compile
| | | | + - org.springframework.boot:spring-boot:jar:1.5.2.RELEASE:compile
| | | | + - org.springframework.boot:spring-boot-autoconfigure:jar:1.5.2.RELEASE:compile
| | | | + - org.springframework.boot:spring-boot-starter-logging:jar:1.5.2.RELEASE:compile
| | | | | + - org.slf4j:jul-to-slf4j:jar:1.7.24:compile
| | | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.24:compile
| | | | \- org.yaml:snakeyaml:jar:1.17:runtime
| | | + - org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.11:compile
| | | \- org.hibernate:hibernate-validator:jar:5.3.4.Final:compile
| | | \- com.fasterxml:classmate:jar:1.3.3:编译
| | \- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.2.RELEASE:compile
| | + - org.springframework.boot:spring-boot-starter -aop:jar:1.5.2.RELEASE:compile
| | | \- org.aspectj:aspectjweaver:jar:1.8.9:编译
| | + - org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.2.RELEASE:compile
| | + - org.hibernate:hibernate-core:jar:5.0.12.Final:编译
| | | + - antlr:antlr:jar:2.7.7:编译
| | | \- org.jboss:jandex:jar:2.0.0.Final:编译
| | + - org.springframework.data:spring-data-jpa:jar:1.11.1.RELEASE:compile
| | | + - org.springframework.data:spring-data-commons:jar:1.13.1.RELEASE:compile
| | | \- org.springframework:spring-orm:jar:4.3.7.RELEASE:compile
| | \- org.springframework:spring-aspects:jar:4.3.7.RELEASE:compile
| + - org.springframework:spring-core:jar:4.3.7.RELEASE:compile
| + - org.springframework:spring-test:jar:4.3.7.RELEASE:compile
| + - org.springframework:spring-jdbc:jar:4.3.7.RELEASE:compile
| + - org.springframework:spring-beans:jar:4.3.7.RELEASE:compile
| + - org.hsqldb:hsqldb:jar:2.3.3:编译
| + - commons-dbcp:commons-dbcp:jar:1.4:编译
| | \- commons-pool:commons-pool:jar:1.6:编译
| + - com.oracle:ojdbc7:jar:12.1.0.2:compile
| \- de.jpdigital:hibernate5-ddl-maven-plugin:jar:1.0.0:compile
| + - org.apache.maven:maven-artifact:jar:3.3.9:编译
| + - org.apache.maven:maven-core:jar:3.3.9:编译
| | + - org.apache.maven:maven-model:jar:3.3.9:编译
| | + - org.apache.maven:maven-settings:jar:3.3.9:编译
| | + - org.apache.maven:maven-settings-builder:jar:3.3.9:compile
| | | \- org.apache.maven:maven-builder-support:jar:3.3.9:compile
| | + - org.apache.maven:maven-repository-metadata:jar:3.3.9:编译
| | + - org.apache.maven:maven-model-builder:jar:3.3.9:compile
| | + - org.apache.maven:maven-aether-provider:jar:3.3.9:compile
| | | \- org.eclipse.aether:aether-spi:jar:1.0.2.v20150114:compile
| | + - org.eclipse.aether:aether-impl:jar:1.0.2.v20150114:compile
| | + - org.eclipse.aether:aether-api:jar:1.0.2.v20150114:compile
| | + - org.eclipse.aether:aether-util:jar:1.0.2.v20150114:compile
| | + - org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.2:compile
| | | + - javax.enterprise:cdi-api:jar:1.0:编译
| | | | \ -javax.annotation:jsr250-api:jar:1.0:编译
| | | \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.2:compile
| | + - com.google.inject:guice:jar:no_aop:4.0:编译
| | | + - javax.inject:javax.inject:jar:1:编译
| | | \\ a- aopalliance:aopalliance:jar:1.0:编译
| | + - org.codehaus.plexus:plexus-interpolation:jar:1.21:编译
| | + - org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
| | + - org.codehaus.plexus:plexus-component-annotations:jar:1.6:compile
| | \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
| | \- org.sonatype.plexus:plexus-cipher:jar:1.4:编译
| + - org.apache.maven:maven-plugin-api:jar:3.3.9:compile
| + - org.apache.maven:maven-project:jar:3.0-alpha-2:compile
| | + - org.apache.maven:maven-compat:jar:3.0-alpha-2:compile
| | | \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-4:编译
| | + - org.codehaus.plexus:plexus-container-default:jar:1.0-beta-3.0.5:compile
| | | + - org.apache.xbean:xbean-reflect:jar:3.4:编译
| | | | + - log4j:log4j:jar:1.2.12:编译
| | | | \- commons-logging:commons-logging-api:jar:1.1:编译
| | | \- com.google.code.google-collections:google-collect:jar:snapshot-20080530:compile
| | + - org.codehaus.woodstox:wstx-asl:jar:3.2.6:compile
| | | \\ stax:stax-api:jar:1.0.1:编译
| | + - org.sonatype.spice:model-builder:jar:1.3:编译
| | \- org.apache.maven:maven-project-builder:jar:3.0-alpha-2:compile
| + - org.codehaus.plexus:plexus-utils:jar:3.0.24:compile
| + - org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile
| | + - org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
| | + - dom4j:dom4j:jar:1.6.1:编译
| | + - org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
| | + - org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
| | + - org.javassist:javassist:jar:3.21.0-GA:编译
| | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
| + - org.hibernate:hibernate-envers:jar:5.0.12.Final:编译
| + - org.reflections:反射:jar:0.9.10:编译
| | \- com.google.code.findbugs:annotations:jar:2.0.1:compile
| \ javax.transaction:javax.transaction-api:jar:1.2:编译
+ - com.google.gwt:gwt-servlet:jar:2.8.0:runtime
+ - com.google .gwt:gwt-user:jar:2.8.0:提供
| + - com.google.jsinterop:jsinterop-annotations:jar:1.0.1:提供
| + - com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.1:provided
| + - javax.validation:validation-api:jar:sources:1.0.0.GA:提供
| + - javax.servlet:javax.servlet-api:jar:3.1.0:提供
| \- org.w3c.css:sac:jar:1.3:提供
+ - com.google.gwt:gwt-dev:jar:2.8.0:提供
| + - com.google.code.gson:gson:jar:2.8.0:提供
| + - org.ow2.asm:asm:jar:5.0.3:提供
| + - org.ow2.asm:asm-util:jar:5.0.3:提供
| | \- org.ow2.asm:asm-tree:jar:5.0.3:提供
| + - org.ow2.asm:asm-commons:jar:5.0.3:提供
| + - 小马:小马:jar:1.2.0:提供
| + - ant:ant:jar:1.6.5:提供
| + - com.ibm.icu:icu4j:jar:50.1.1:提供
| + - tapestry:tapestry:jar:4.0.2:提供
| + - net.sourceforge.html单元:htmlunit:jar:2.21:提供
| | + - xalan:xalan:jar:2.7.2:提供
| | | \- xalan:serializer:jar:2.7.2:提供
| | + - org.apache.httpcomponents:httpclient:jar:4.5.3:提供
| | | \- org.apache.httpcomponents:httpcore:jar:4.4.6:提供
| | + - org.apache.httpcomponents:httpmime:jar:4.5.3:提供
| | + - commons-codec:commons-codec:jar:1.10:提供
| | + - net.sourceforge.html单元:htmlunit-core-js:jar:2.17:提供
| | + - net.sourceforge.html单元:neko-htmlunit:jar:2.21:提供
| | + - net.sourceforge.cssparser:cssparser:jar:0.9.18:提供
| | \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-client:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty:jetty-webapp:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-xml:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty:jetty-servlet:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty:jetty-security:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty:jetty-server:jar:9.4.2.v20170220:提供
| + - org.eclipse.jetty:jetty-servlets:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-continuation:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-http:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-util:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty:jetty-io:jar:9.4.2.v20170220:提供
| + - org.eclipse.jetty:jetty-annotations:jar:9.4.2.v20170220:提供
| | + - org.eclipse.jetty:jetty-plus:jar:9.4.2.v20170220:提供
| | | \- org.eclipse.jetty:jetty-jndi:jar:9.2.14.v20151106:提供
| | \ - javax.annotation:javax.annotation-api:jar:1.2:提供
| \- org.eclipse.jetty:apache-jsp:jar:9.4.2.v20170220:提供
| + - org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1:提供
| + - org.mortbay.jasper:apache-jsp:jar:8.5.9.1:提供
| | \- org.mortbay.jasper:apache-el:jar:8.0.33:提供
| \- org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:提供
+ - com.smartgwt:smartgwt:jar:3.1:编译
+ - com.smartgwt:smartgwt -skins:jar:3.1:编译
+ - mycompany.drh:newncauth:jar:2.0.0:编译
+ - mycompany.drh:mycompany.droits-habilitations.rmi:jar:02.10.01 :编译
+ - junit:junit:jar:4.12:test
| \- org.hamcrest:hamcrest-core:jar:1.3:test
\- org.projectlombok:lombok:jar:1.16.14:编译
----------- -------------------------------------------------- ------------
BUILD SUCCESS



--- -------------------------------------------------- -------------------



我测试了Andy提出的解决方案,但没有成功,总是出现相同的异常

测试1由Andy提出(添加属性jetty.version 9.2.14.v20151106)



pom修改

+1行

 <属性> 
< jetty.version> 9.2.14.v20151106< /jetty.version>
< / properties>

依赖关系树修改(其他行与第一个树依赖关系):

  +  -  com.google.gwt:gwt-dev:jar:2.8.0:提供
| + - com.google.code.gson:gson:jar:2.8.0:提供
| + - org.ow2.asm:asm:jar:5.0.3:提供
| + - org.ow2.asm:asm-util:jar:5.0.3:提供
| | \- org.ow2.asm:asm-tree:jar:5.0.3:提供
| + - org.ow2.asm:asm-commons:jar:5.0.3:提供
| + - 小马:小马:jar:1.2.0:提供
| + - ant:ant:jar:1.6.5:提供
| + - com.ibm.icu:icu4j:jar:50.1.1:提供
| + - tapestry:tapestry:jar:4.0.2:提供
| + - net.sourceforge.html单元:htmlunit:jar:2.21:提供
| | + - xalan:xalan:jar:2.7.2:提供
| | | \- xalan:serializer:jar:2.7.2:提供
| | + - org.apache.httpcomponents:httpclient:jar:4.5.3:提供
| | | \- org.apache.httpcomponents:httpcore:jar:4.4.6:提供
| | + - org.apache.httpcomponents:httpmime:jar:4.5.3:提供
| | + - commons-codec:commons-codec:jar:1.10:提供
| | + - net.sourceforge.html单元:htmlunit-core-js:jar:2.17:提供
| | + - net.sourceforge.html单元:neko-htmlunit:jar:2.21:提供
| | + - net.sourceforge.cssparser:cssparser:jar:0.9.18:提供
| | \- org.eclipse.jetty.websocket:websocket-client:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty:jetty-webapp:jar:9.2.14.v20151106:提供
| | + - org.eclipse.jetty:jetty-xml:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty:jetty-servlet:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty:jetty-security:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty:jetty-servlets:jar:9.2.14.v20151106:提供
| | + - org.eclipse.jetty:jetty-continuation:jar:9.2.14.v20151106:提供
| | + - org.eclipse.jetty:jetty-http:jar:9.2.14.v20151106:提供
| | + - org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:提供
| | \- org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty:jetty-annotations:jar:9.2.14.v20151106:提供
| | + - org.eclipse.jetty:jetty-plus:jar:9.2.14.v20151106:提供
| | | \- org.eclipse.jetty:jetty-jndi:jar:9.2.14.v20151106:提供
| | \ - javax.annotation:javax.annotation-api:jar:1.2:提供
| \- org.eclipse.jetty:apache-jsp:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty:jetty-server:jar:9.2.14.v20151106:提供
| + - org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1.M0:提供
| \- org.mortbay.jasper:apache-jsp:jar:8.0.9.M3:提供
| \- org.mortbay.jasper:apache-el:jar:8.0.33:提供
+ - com.smartgwt:smartgwt:jar:3.1:编译
+ - com.smartgwt:smartgwt-skins :jar:3.1:编译






测试2由Andy提出(强制依赖于9.2.14至9.4.2.v20170220)


$ b pom修改

 < dependencyManagement> 
< dependency>
< groupId> org.eclipse.jetty.websocket< / groupId>
< artifactId> websocket-common< / artifactId>
< version> 9.4.2.v20170220< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> org.eclipse.jetty.websocket< / groupId>
< artifactId> websocket-api< / artifactId>
< version> 9.4.2.v20170220< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> org.eclipse.jetty< / groupId>
< artifactId> jetty-jndi< / artifactId>
< version> 9.4.2.v20170220< / version>
< scope>提供< / scope>
< /依赖关系>
< /依赖关系>
< / dependencyManagement>

依赖关系树修改(其他行与第一个树依赖关系):

  +  -  com.google.gwt:gwt-user:jar:2.8.0:提供
。 ..
| | \- org.eclipse.jetty.websocket:websocket-common:jar:9.4.2.v20170220:提供
| | \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.2.v20170220:提供
...
| | | \- org.eclipse.jetty:jetty-jndi:jar:9.4.2.v20170220:提供

最后测试日志

  11:17:35,004 | -INFO in ch.qos.logback .classic.joran.action.ConfigurationAction  - 未设置调试属性
11:17:35,020 | -INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - 将扫描[file:/ C :/ dev / appli / fonems-webapp / fonemswebapp / src / mai
n / webapp / WEB-INF / classes / logback.xml]
11:17:35,020 | -INFO in ch.qos.logback .classic.joran.action.ConfigurationAction - 将ReconfigureOnChangeTask扫描周期设置为1分钟
11:17:35,020 | ch.qos.logback.core.joran.spi.Interpreter@2中的-ERROR:52 - RuntimeException in Action对于标记[配置] java.lang.NullPointerException
$ b在java.lang.NullPointerException异常$ b $在java.lang.ClassLoader.resolveClass0(本地方法)$ b $在java.lang.ClassLoader .resolveClass(ClassLoader.java:964)
在org.eclipse.jetty.webapp.WebAppClassLoa der.loadClass(WebAppClassLoader.java:523)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at ch.qos.logback.classic.util.EnvUtil.isGroovyAvailable(EnvUtil。 java:36)
at ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:68)
at ch.qos.logback.core.joran.spi.Interpreter。在ch.qos.logback.core.joran.sub.Interpreter.startElement(Interpreter.java:145)
处的callBeginAction(Interpreter.java:269)
。 spi.Interpreter.startElement(Interpreter.java:128)ch.qos.logback.core.joran.spi.EventPlayer.play上的
(EventPlayer.java:50)ch.qos.logback上的
。 core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)$ ch_qos.logback.core.joran.GenericConfigurator.doConfigure
(GenericConfigurator.java:152)
ch.qos.logback。 core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
...
在com.google.gwt.dev.DevMode.main(DevMode.java:430)
11: 17:35,020 | -INFO in c h.qos.logback.classic.joran.JoranConfigurator@6af1c1b - 将当前配置注册为安全回退点

SLF4J:实际绑定类型为[ch.qos.logback.classic.util.ContextSelectorStaticBinder]
线程main中的异常java.lang.NoSuchMethodError:org.eclipse.jetty.websocket.server.WebSocketServerFactory。< init>(Ljavax / servlet / ServletContext;)V
at org.eclipse.jetty .websocket.server.NativeWebSocketConfiguration。< init>(NativeWebSocketConfiguration.java:53)



--- -------------------------------------------------- -------------------



我做了其他测试:我删除了spring -boot依赖项:结果=相同的异常。此外,依赖关系树显示了版本9.2.14.v20151106中的所有jetty atrifacts



此外,我尝试搜索类 org.eclipse.jetty .websocket.server.WebSocketServerFactory 在jar中但未找到。它在哪里?为什么这个类被记录在日志中?

感谢您的帮助

解决方案

类路径上的Jetty版本:9.4.2.v20170220和9.2.14.v20151106。前者是Spring Boot 1.5.2默认使用的。我猜想后者是从 com.google.gwt:gwt 的导入。



您可以覆盖 jetty.version Spring Boot用于将其值设置为 9.2.14.v20151106 的属性,从而使用9.2.14到处。或者,您可以为当前使用9.2.14的模块声明您自己的依赖项管理,以将其升级到9.4.2。


I have this exception when launching my application via eclipse plugin: "Run as" > "GWT Development Mode with jetty"

Environment:
- GWT SDK 2.8
- spring-boot 1.5.2.RELEASE
- jetty 9.4.2
- GWT Eclipse Plugin 3.0.0

Context: migrate a GWT 2.6 application to GWT 2.8 and using spring-boot
application pom generated with GWT webAppCreator

Here is the stack trace:

**Exception in thread "main" java.lang.NoSuchMethodError: 
org.eclipse.jetty.websocket.server.WebSocketServerFactory.<init>(Ljavax/servlet/ServletContext;)V**
at org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration.<init>(NativeWebSocketConfiguration.java:53)
at org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer.getDefaultFrom(NativeWebSocketServletContainerInitializer.java:36)
at org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer.onStartup(NativeWebSocketServletContainerInitializer.java:46)
at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:329)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
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:131)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:452)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:419)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:759)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:634)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706)
at com.google.gwt.dev.DevMode.main(DevMode.java:430)

Why my application fails to start?
Here is my pom and dependency tree . Thank you for your help

pom.xml:

<?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>com.mycompany.fonems.webapp</groupId>
 <artifactId>Fonemswebapp</artifactId>
 <packaging>war</packaging>
 <version>1.0-SNAPSHOT</version>
 <name>com.mycompany.fonems.webapp.Fonemswebapp</name>
  <parent> <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
  </parent>
 <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>
   <!-- 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>
    <smartgwt.version>3.1</smartgwt.version>
 </properties>
 <dependencyManagement>
   <dependencies>
    <!-- ensure all GWT deps use the same version (unless overridden) -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt</artifactId>
      <version>2.8.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
   </dependencies>
 </dependencyManagement>
 <dependencies>
    <dependency>
        <groupId>com.mycompany.fonems</groupId>
        <artifactId>fonems-fwk-server-common</artifactId>
        <version>0.0.104-SNAPSHOT</version>
        <exclusions>
            <exclusion>
                <artifactId>xercesImpl</artifactId>
                <groupId>xerces</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.mycompany.fonems</groupId>
        <artifactId>fonems-refonte-dao</artifactId>
        <version>0.0.104-SNAPSHOT</version>
        <exclusions>
            <exclusion>
                <artifactId>javax.el-api</artifactId>
                <groupId>javax.el</groupId>
            </exclusion>
            <exclusion>
                <artifactId>xercesImpl</artifactId>
                <groupId>xerces</groupId>
            </exclusion>
        </exclusions>
    </dependency>
   <dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-servlet</artifactId>
    <scope>runtime</scope>
   </dependency>
   <dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-user</artifactId>
    <scope>provided</scope>
   </dependency>
   <dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-dev</artifactId>
    <scope>provided</scope>
    <exclusions>
        <exclusion>
            <artifactId>xercesImpl</artifactId>
            <groupId>xerces</groupId>
        </exclusion>
    </exclusions>
   </dependency>
    <dependency>
        <groupId>com.smartgwt</groupId>
        <artifactId>smartgwt</artifactId>
        <version>${smartgwt.version}</version>
    </dependency>
        <dependency>
            <groupId>com.smartgwt</groupId>
            <artifactId>smartgwt-skins</artifactId>
            <version>${smartgwt.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>mycompany.drh</groupId>
            <artifactId>newncauth</artifactId>
            <version>${mycompany.drh.version}</version>
        </dependency>
        <dependency>
            <groupId>mycompany.drh</groupId>
            <artifactId>mycompany.droits-habilitations.rmi</artifactId>
            <version>${mycompany.drh.rmi.version}</version>
        </dependency>
   <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <scope>test</scope>
   </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>compile</scope>
        </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>
   <plugins>
    <!-- GWT Maven Plugin-->
    <plugin>
      <groupId>net.ltgt.gwt.maven</groupId>
      <artifactId>gwt-maven-plugin</artifactId>
      <version>1.0-rc-6</version>
      <executions>
        <execution>
         <goals>
           <goal>import-sources</goal>
           <goal>compile</goal>
           <goal>import-test-sources</goal>
           <goal>test</goal>
         </goals>
        </execution>
      </executions>
      <configuration>
        <moduleName>com.mycompany.fonems.webapp.Fonemswebapp</moduleName>
        <moduleShortName>Fonemswebapp</moduleShortName>
        <failOnError>true</failOnError>
        <!-- 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>Fonemswebapp.html</startupUrl>
        </startupUrls>

<!--          <webappDirectory>${outputFolder}</webappDirectory> -->
      </configuration>

    </plugin>

    <!-- Skip normal test execution, we use gwt:test instead -->
    <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.17</version>
      <configuration>
        <skip>true</skip>
      </configuration>
    </plugin>
   </plugins>
 </build>
</project>

dependency tree:

------------------------------------------------------------------------
Building com.mycompany.fonems.webapp.Fonemswebapp 1.0-SNAPSHOT
------------------------------------------------------------------------

--- maven-dependency-plugin:2.10:tree (default-cli) @ Fonemswebapp ---
com.mycompany.fonems.webapp:Fonemswebapp:war:1.0-SNAPSHOT
+- com.mycompany.fonems:fonems-fwk-server-common:jar:0.0.104-SNAPSHOT:compile
|  +- commons-configuration:commons-configuration:jar:1.9:compile
|  |  \- commons-logging:commons-logging:jar:1.1.1:compile
|  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
|  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
|  |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
|  +- joda-time:joda-time:jar:2.9.7:compile
|  +- org.apache.commons:commons-lang3:jar:3.1:compile
|  +- commons-io:commons-io:jar:2.4:compile
|  +- commons-lang:commons-lang:jar:2.6:compile
|  +- commons-collections:commons-collections:jar:3.2.2:compile
|  +- org.springframework:spring-tx:jar:4.3.7.RELEASE:compile
|  +- org.springframework:spring-context:jar:4.3.7.RELEASE:compile
|  |  +- org.springframework:spring-aop:jar:4.3.7.RELEASE:compile
|  |  \- org.springframework:spring-expression:jar:4.3.7.RELEASE:compile
|  +- javax.xml.bind:jaxb-api:jar:2.2.12:compile
|  +- javax.validation:validation-api:jar:1.1.0.Final:compile
|  +- com.google.guava:guava:jar:18.0:compile
|  +- commons-betwixt:commons-betwixt:jar:0.8:compile
|  |  +- commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
|  |  \- commons-digester:commons-digester:jar:2.1:compile
|  +- net.sf.dozer:dozer:jar:5.4.0:compile
|  +- org.slf4j:jcl-over-slf4j:jar:1.7.24:compile
|  +- uk.org.lidalia:sysout-over-slf4j:jar:1.0.2:compile
|  +- org.slf4j:slf4j-api:jar:1.7.24:compile
|  \- ch.qos.logback:logback-classic:jar:1.1.11:compile
|    \- ch.qos.logback:logback-core:jar:1.1.11:compile
+- com.mycompany.fonems:fonems-refonte-dao:jar:0.0.104-SNAPSHOT:compile
|  +- com.zaxxer:HikariCP:jar:2.5.1:compile
|  +- org.lazyluke:log4jdbc-remix:jar:0.2.7:compile
|  +- com.mycompany.fonems:fonems-config:jar:0.0.104-SNAPSHOT:compile
|  +- com.mycompany.fonems:fonems-refonte-model:jar:0.0.104-SNAPSHOT:compile
|  |  +- org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.6.4:compile
|  |  +- openaccess:comFidessaInf:jar:3.0.1:compile
|  |  +- org.springframework.boot:spring-boot-starter-validation:jar:1.5.2.RELEASE:compile
|  |  |  +- org.springframework.boot:spring-boot-starter:jar:1.5.2.RELEASE:compile
|  |  |  |  +- org.springframework.boot:spring-boot:jar:1.5.2.RELEASE:compile
|  |  |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.2.RELEASE:compile
|  |  |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.2.RELEASE:compile
|  |  |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.24:compile
|  |  |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.24:compile
|  |  |  |  \- org.yaml:snakeyaml:jar:1.17:runtime
|  |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.11:compile
|  |  |  \- org.hibernate:hibernate-validator:jar:5.3.4.Final:compile
|  |  |    \- com.fasterxml:classmate:jar:1.3.3:compile
|  |  \- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.2.RELEASE:compile
|  |    +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.2.RELEASE:compile
|  |    |  \- org.aspectj:aspectjweaver:jar:1.8.9:compile
|  |    +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.2.RELEASE:compile
|  |    +- org.hibernate:hibernate-core:jar:5.0.12.Final:compile
|  |    |  +- antlr:antlr:jar:2.7.7:compile
|  |    |  \- org.jboss:jandex:jar:2.0.0.Final:compile
|  |    +- org.springframework.data:spring-data-jpa:jar:1.11.1.RELEASE:compile
|  |    |  +- org.springframework.data:spring-data-commons:jar:1.13.1.RELEASE:compile
|  |    |  \- org.springframework:spring-orm:jar:4.3.7.RELEASE:compile
|  |    \- org.springframework:spring-aspects:jar:4.3.7.RELEASE:compile
|  +- org.springframework:spring-core:jar:4.3.7.RELEASE:compile
|  +- org.springframework:spring-test:jar:4.3.7.RELEASE:compile
|  +- org.springframework:spring-jdbc:jar:4.3.7.RELEASE:compile
|  +- org.springframework:spring-beans:jar:4.3.7.RELEASE:compile
|  +- org.hsqldb:hsqldb:jar:2.3.3:compile
|  +- commons-dbcp:commons-dbcp:jar:1.4:compile
|  |  \- commons-pool:commons-pool:jar:1.6:compile
|  +- com.oracle:ojdbc7:jar:12.1.0.2:compile
|  \- de.jpdigital:hibernate5-ddl-maven-plugin:jar:1.0.0:compile
|    +- org.apache.maven:maven-artifact:jar:3.3.9:compile
|    +- org.apache.maven:maven-core:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-model:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-settings:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-settings-builder:jar:3.3.9:compile
|    |  |  \- org.apache.maven:maven-builder-support:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-repository-metadata:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-model-builder:jar:3.3.9:compile
|    |  +- org.apache.maven:maven-aether-provider:jar:3.3.9:compile
|    |  |  \- org.eclipse.aether:aether-spi:jar:1.0.2.v20150114:compile
|    |  +- org.eclipse.aether:aether-impl:jar:1.0.2.v20150114:compile
|    |  +- org.eclipse.aether:aether-api:jar:1.0.2.v20150114:compile
|    |  +- org.eclipse.aether:aether-util:jar:1.0.2.v20150114:compile
|    |  +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.2:compile
|    |  |  +- javax.enterprise:cdi-api:jar:1.0:compile
|    |  |  |  \- javax.annotation:jsr250-api:jar:1.0:compile
|    |  |  \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.2:compile
|    |  +- com.google.inject:guice:jar:no_aop:4.0:compile
|    |  |  +- javax.inject:javax.inject:jar:1:compile
|    |  |  \- aopalliance:aopalliance:jar:1.0:compile
|    |  +- org.codehaus.plexus:plexus-interpolation:jar:1.21:compile
|    |  +- org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
|    |  +- org.codehaus.plexus:plexus-component-annotations:jar:1.6:compile
|    |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
|    |    \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
|    +- org.apache.maven:maven-plugin-api:jar:3.3.9:compile
|    +- org.apache.maven:maven-project:jar:3.0-alpha-2:compile
|    |  +- org.apache.maven:maven-compat:jar:3.0-alpha-2:compile
|    |  |  \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-4:compile
|    |  +- org.codehaus.plexus:plexus-container-default:jar:1.0-beta-3.0.5:compile
|    |  |  +- org.apache.xbean:xbean-reflect:jar:3.4:compile
|    |  |  |  +- log4j:log4j:jar:1.2.12:compile
|    |  |  |  \- commons-logging:commons-logging-api:jar:1.1:compile
|    |  |  \- com.google.code.google-collections:google-collect:jar:snapshot-20080530:compile
|    |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.6:compile
|    |  |  \- stax:stax-api:jar:1.0.1:compile
|    |  +- org.sonatype.spice:model-builder:jar:1.3:compile
|    |  \- org.apache.maven:maven-project-builder:jar:3.0-alpha-2:compile
|    +- org.codehaus.plexus:plexus-utils:jar:3.0.24:compile
|    +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile
|    |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
|    |  +- dom4j:dom4j:jar:1.6.1:compile
|    |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
|    |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
|    |  +- org.javassist:javassist:jar:3.21.0-GA:compile
|    |  \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
|    +- org.hibernate:hibernate-envers:jar:5.0.12.Final:compile
|    +- org.reflections:reflections:jar:0.9.10:compile
|    |  \- com.google.code.findbugs:annotations:jar:2.0.1:compile
|    \- javax.transaction:javax.transaction-api:jar:1.2:compile
+- com.google.gwt:gwt-servlet:jar:2.8.0:runtime
+- com.google.gwt:gwt-user:jar:2.8.0:provided
|  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.1:provided
|  +- com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.1:provided
|  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
|  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
|  \- org.w3c.css:sac:jar:1.3:provided
+- com.google.gwt:gwt-dev:jar:2.8.0:provided
|  +- com.google.code.gson:gson:jar:2.8.0:provided
|  +- org.ow2.asm:asm:jar:5.0.3:provided
|  +- org.ow2.asm:asm-util:jar:5.0.3:provided
|  |  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
|  +- org.ow2.asm:asm-commons:jar:5.0.3:provided
|  +- colt:colt:jar:1.2.0:provided
|  +- ant:ant:jar:1.6.5:provided
|  +- com.ibm.icu:icu4j:jar:50.1.1:provided
|  +- tapestry:tapestry:jar:4.0.2:provided
|  +- net.sourceforge.htmlunit:htmlunit:jar:2.21:provided
|  |  +- xalan:xalan:jar:2.7.2:provided
|  |  |  \- xalan:serializer:jar:2.7.2:provided
|  |  +- org.apache.httpcomponents:httpclient:jar:4.5.3:provided
|  |  |  \- org.apache.httpcomponents:httpcore:jar:4.4.6:provided
|  |  +- org.apache.httpcomponents:httpmime:jar:4.5.3:provided
|  |  +- commons-codec:commons-codec:jar:1.10:provided
|  |  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
|  |  +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.21:provided
|  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
|  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.2.v20170220:provided
|  |    +- org.eclipse.jetty:jetty-client:jar:9.4.2.v20170220:provided
|  |    \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.14.v20151106:provided
|  |       \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.14.v20151106:provided
|  +- org.eclipse.jetty:jetty-webapp:jar:9.4.2.v20170220:provided
|  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.2.v20170220:provided
|  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.2.v20170220:provided
|  |    \- org.eclipse.jetty:jetty-security:jar:9.4.2.v20170220:provided
|  |       \- org.eclipse.jetty:jetty-server:jar:9.4.2.v20170220:provided
|  +- org.eclipse.jetty:jetty-servlets:jar:9.4.2.v20170220:provided
|  |  +- org.eclipse.jetty:jetty-continuation:jar:9.4.2.v20170220:provided
|  |  +- org.eclipse.jetty:jetty-http:jar:9.4.2.v20170220:provided
|  |  +- org.eclipse.jetty:jetty-util:jar:9.4.2.v20170220:provided
|  |  \- org.eclipse.jetty:jetty-io:jar:9.4.2.v20170220:provided
|  +- org.eclipse.jetty:jetty-annotations:jar:9.4.2.v20170220:provided
|  |  +- org.eclipse.jetty:jetty-plus:jar:9.4.2.v20170220:provided
|  |  |  \- org.eclipse.jetty:jetty-jndi:jar:9.2.14.v20151106:provided
|  |  \- javax.annotation:javax.annotation-api:jar:1.2:provided
|  \- org.eclipse.jetty:apache-jsp:jar:9.4.2.v20170220:provided
|    +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1:provided
|    +- org.mortbay.jasper:apache-jsp:jar:8.5.9.1:provided
|    |  \- org.mortbay.jasper:apache-el:jar:8.0.33:provided
|    \- org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:provided
+- com.smartgwt:smartgwt:jar:3.1:compile
+- com.smartgwt:smartgwt-skins:jar:3.1:compile
+- mycompany.drh:newncauth:jar:2.0.0:compile
+- mycompany.drh:mycompany.droits-habilitations.rmi:jar:02.10.01:compile
+- junit:junit:jar:4.12:test
|  \- org.hamcrest:hamcrest-core:jar:1.3:test
\- org.projectlombok:lombok:jar:1.16.14:compile
------------------------------------------------------------------------
BUILD SUCCESS

------------------------------------------------------------------------

I tested the solutions proposed by Andy, but not successful, always the same exception
test 1 proposed by Andy (add property jetty.version 9.2.14.v20151106)

pom modification:
+1 line

<properties>
  <jetty.version>9.2.14.v20151106</jetty.version> 
</properties>

dependency tree modifications (other lines are unchanged compared to the first tree dependency):

+- com.google.gwt:gwt-dev:jar:2.8.0:provided
|  +- com.google.code.gson:gson:jar:2.8.0:provided
|  +- org.ow2.asm:asm:jar:5.0.3:provided
|  +- org.ow2.asm:asm-util:jar:5.0.3:provided
|  |  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
|  +- org.ow2.asm:asm-commons:jar:5.0.3:provided
|  +- colt:colt:jar:1.2.0:provided
|  +- ant:ant:jar:1.6.5:provided
|  +- com.ibm.icu:icu4j:jar:50.1.1:provided
|  +- tapestry:tapestry:jar:4.0.2:provided
|  +- net.sourceforge.htmlunit:htmlunit:jar:2.21:provided
|  |  +- xalan:xalan:jar:2.7.2:provided
|  |  |  \- xalan:serializer:jar:2.7.2:provided
|  |  +- org.apache.httpcomponents:httpclient:jar:4.5.3:provided
|  |  |  \- org.apache.httpcomponents:httpcore:jar:4.4.6:provided
|  |  +- org.apache.httpcomponents:httpmime:jar:4.5.3:provided
|  |  +- commons-codec:commons-codec:jar:1.10:provided
|  |  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
|  |  +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.21:provided
|  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
|  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.2.14.v20151106:provided
|  |    \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.14.v20151106:provided
|  |       \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.14.v20151106:provided
|  +- org.eclipse.jetty:jetty-webapp:jar:9.2.14.v20151106:provided
|  |  +- org.eclipse.jetty:jetty-xml:jar:9.2.14.v20151106:provided
|  |  \- org.eclipse.jetty:jetty-servlet:jar:9.2.14.v20151106:provided
|  |    \- org.eclipse.jetty:jetty-security:jar:9.2.14.v20151106:provided
|  +- org.eclipse.jetty:jetty-servlets:jar:9.2.14.v20151106:provided
|  |  +- org.eclipse.jetty:jetty-continuation:jar:9.2.14.v20151106:provided
|  |  +- org.eclipse.jetty:jetty-http:jar:9.2.14.v20151106:provided
|  |  +- org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided
|  |  \- org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided
|  +- org.eclipse.jetty:jetty-annotations:jar:9.2.14.v20151106:provided
|  |  +- org.eclipse.jetty:jetty-plus:jar:9.2.14.v20151106:provided
|  |  |  \- org.eclipse.jetty:jetty-jndi:jar:9.2.14.v20151106:provided
|  |  \- javax.annotation:javax.annotation-api:jar:1.2:provided
|  \- org.eclipse.jetty:apache-jsp:jar:9.2.14.v20151106:provided
|    +- org.eclipse.jetty:jetty-server:jar:9.2.14.v20151106:provided
|    +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1.M0:provided
|    \- org.mortbay.jasper:apache-jsp:jar:8.0.9.M3:provided
|       \- org.mortbay.jasper:apache-el:jar:8.0.33:provided
+- com.smartgwt:smartgwt:jar:3.1:compile
+- com.smartgwt:smartgwt-skins:jar:3.1:compile


test 2 proposed by Andy (force dependencies in 9.2.14 to 9.4.2.v20170220)

pom modifications:

 <dependencyManagement>
  <dependency>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <artifactId>websocket-common</artifactId>
      <version>9.4.2.v20170220</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <artifactId>websocket-api</artifactId>
      <version>9.4.2.v20170220</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-jndi</artifactId>
      <version>9.4.2.v20170220</version>
      <scope>provided</scope>
    </dependency>
   </dependencies>
 </dependencyManagement>

dependency tree modifications (other lines are unchanged compared to the first tree dependency):

+- com.google.gwt:gwt-user:jar:2.8.0:provided
... 
|  |    \- org.eclipse.jetty.websocket:websocket-common:jar:9.4.2.v20170220:provided
|  |       \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.2.v20170220:provided
...
|  |  |  \- org.eclipse.jetty:jetty-jndi:jar:9.4.2.v20170220:provided

last test logs:

11:17:35,004 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
11:17:35,020 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/C:/Dev/Appli/fonems-webapp/fonemswebapp/src/mai
n/webapp/WEB-INF/classes/logback.xml] 
11:17:35,020 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 1 minutes
11:17:35,020 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@2:52 - RuntimeException in Action for tag [configuration] java.lang.NullPointerException

at java.lang.NullPointerException
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:964)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:523)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at ch.qos.logback.classic.util.EnvUtil.isGroovyAvailable(EnvUtil.java:36)
at ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:68)
at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
...
at com.google.gwt.dev.DevMode.main(DevMode.java:430)
11:17:35,020 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6af1c1b - Registering current configuration as safe fallback point

SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.jetty.websocket.server.WebSocketServerFactory.<init>(Ljavax/servlet/ServletContext;)V
at org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration.<init>(NativeWebSocketConfiguration.java:53)  

------------------------------------------------------------------------

I did an other test: I delete spring-boot dependency: result=same exception. Moreover, the dependency tree shows all jetty atrifacts in version 9.2.14.v20151106

Moreover, I try to search the class org.eclipse.jetty.websocket.server.WebSocketServerFactory in jars but not found. Where is it present? Why this class is mentionned in logs?
Thank you for your help

解决方案

You have a mixture of Jetty versions on the class path: 9.4.2.v20170220 and 9.2.14.v20151106. The former is what Spring Boot 1.5.2 uses by default. I would guess that latter is from the import of com.google.gwt:gwt.

You could override the jetty.version property that Spring Boot uses to set its value to 9.2.14.v20151106, thereby using 9.2.14 everywhere. Alternatively, you could declare your own dependency management for the modules that are currently using 9.2.14 to upgrade them to 9.4.2.

这篇关于NoSuchMethodError:org.eclipse.jetty.websocket.server.WebSocketServerFactory。&lt; init&gt;(Ljavax / servlet / ServletContext;)V的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆