2014-07-18 11 views
5

Ich habe damit begonnen, ein Projekt mit dem Maven-Archetyp für Vaadin 7.2.4 zu erstellen und bekomme viele Fehler in Bezug auf Startprobleme bei Atmosphere. Wie die Dinge stehen, kann ich die Push-Unterstützung nicht aktivieren, die ich für ein Addon (OAuthButtonPopup) benötigen würde. Obwohl es viele allgemeine Gespräche über Atmosphere gibt, kann ich nichts speziell für dieses Problem finden. Ich frage mich, ob es ein Problem bei der Installation/Konfiguration auf meiner Seite gibt, insbesondere da anscheinend versucht wird, einige Klassen in Bezug auf Jetty zu instanziieren das scheint für meine Installation nicht relevant zu sein.Vaadin 7, Atmosphäre und Server Push-Probleme

Aktuelle Setup wie folgt: Java 8 SDK, Java EE7 JDK, Idee IntelliJ 13, Vaadin 7.2.4 und Wildfly 8.

Alle Zeiger würde sehr geschätzt werden.

Fehler Spur auf Einsatz wie folgt:

[2014-07-17 10:21:10,394] Artifact OAuthPopupTest:war: Artifact is being deployed, please wait... 
[0m22:21:10,540 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "OAuthPopupTest-1.0-SNAPSHOT.war" (runtime-name: "OAuthPopupTest-1.0-SNAPSHOT.war") 
[0m[33m22:21:12,921 WARN [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015960: Class Path entry xml-apis.jar in /content/OAuthPopupTest-1.0-SNAPSHOT.war/WEB-INF/lib/serializer-2.7.1.jar does not point to a valid jar for a Class-Path reference. 
[0m[33m22:21:13,286 WARN [org.jboss.as.ee] (MSC service thread 1-8) JBAS011006: Not installing optional component org.eclipse.jetty.continuation.Servlet3Continuation$1 due to an exception (enable DEBUG log level to see the cause) 
[0m[33m22:21:13,287 WARN [org.jboss.as.ee] (MSC service thread 1-8) JBAS011006: Not installing optional component org.eclipse.jetty.continuation.Servlet3Continuation$2 due to an exception (enable DEBUG log level to see the cause) 
[0m[0m22:21:13,540 INFO [org.wildfly.extension.undertow] (MSC service thread 1-14) JBAS017534: Registered web context: /OAuthPopupTest-1.0-SNAPSHOT 
[0m[0m22:21:13,557 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "OAuthPopupTest-1.0-SNAPSHOT.war" (runtime-name : "OAuthPopupTest-1.0-SNAPSHOT.war") 
[0m[2014-07-17 10:21:13,578] Artifact OAuthPopupTest:war: Artifact is deployed successfully 
[2014-07-17 10:21:13,579] Artifact OAuthPopupTest:war: Deploy took 3,185 milliseconds 
[33m22:21:13,949 WARNING [com.vaadin.server.DefaultDeploymentConfiguration] (default task-1) 
================================================================= 
Vaadin is running in DEBUG MODE. 
Add productionMode=true to web.xml to disable debug features. 
To show debug window, add ?debug to your application URL. 
================================================================= 
[0m[0m22:21:13,989 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Installed AtmosphereHandler com.vaadin.server.communication.PushHandler$1 mapped to context-path: /* 
[0m[0m22:21:13,990 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushHandler$1 
[0m[33m22:21:13,995 WARNING [org.atmosphere.cpr.AtmosphereFramework] (default task-1) SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead 
[0m[0m22:21:14,003 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation 
[0m[0m22:21:14,003 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] (default task-1) AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used 
[0m[33m22:21:14,005 WARNING [org.atmosphere.cpr.DefaultAnnotationProcessor] (default task-1) Unable to detect annotations. Application may fail to deploy. 
[0m[0m22:21:14,039 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Auto detecting WebSocketHandler in /WEB-INF/classes/ 
[0m[0m22:21:14,047 INFO [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
[0m[31m22:21:14,054 SEVERE [org.atmosphere.cpr.DefaultAsyncSupportResolver] (default task-1) failed to create comet support class: class org.atmosphere.container.JettyServlet30AsyncSupportWithWebSocket, error: null 
[0m[31m22:21:14,054 SEVERE [org.atmosphere.cpr.AtmosphereFramework] (default task-1) Failed to initialize Atmosphere Framework: java.lang.IllegalArgumentException: Unable to createclass org.atmosphere.container.JettyServlet30AsyncSupportWithWebSocket 
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:229) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:288) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:274) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:1591) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:717) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:614) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:120) [vaadin-server-7.2.4.jar:7.2.4] 
    at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:92) [vaadin-server-7.2.4.jar:7.2.4] 
    at com.vaadin.server.VaadinService.init(VaadinService.java:180) [vaadin-server-7.2.4.jar:7.2.4] 
    at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:190) [vaadin-server-7.2.4.jar:7.2.4] 
    at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:96) [vaadin-server-7.2.4.jar:7.2.4] 
    at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:214) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.core.ManagedServlet.getServlet(ManagedServlet.java:157) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:84) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) 
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) 
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05] 
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05] 
Caused by: java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_05] 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_05] 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_05] 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408) [rt.jar:1.8.0_05] 
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:225) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    ... 38 more 
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/WebSocketFactory$Acceptor 
    at org.atmosphere.container.JettyServlet30AsyncSupportWithWebSocket.<init>(JettyServlet30AsyncSupportWithWebSocket.java:46) [atmosphere-runtime-2.1.2.vaadin2.jar:2.1.2.vaadin2] 
    ... 43 more 
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.WebSocketFactory$Acceptor from [Module "deployment.OAuthPopupTest-1.0-SNAPSHOT.war:main" from Service Module Loader] 
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final] 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final] 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final] 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final] 
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final] 

Antwort

2

Für mich sieht es aus wie es Bibliotheken in Ihrem Krieg Paket enthalten, die nicht verpackt werden soll. Sie könnten in Ihren Krieg schauen, um zu sehen, welche JAR-Abhängigkeiten enthalten sind. Vielleicht einige Teile der Anlegestelle. Sie könnten

verwenden
mvn dependency:tree 

, um zu sehen, woher sie kommen und schließen sie, wenn nötig.

Und dieses Wiki aktivieren drücken Seite alle notwendigen Schritte beschreibt: https://vaadin.com/wiki/-/wiki/Main/Enabling%20server%20push

+0

Hallo Raffael - sieht aus wie Sie auch richtig sein kann. Es scheint einige Jetty-bezogene Abhängigkeiten zu geben, die im Build enthalten sind. Wenn man sich den Baum anschaut, sieht das so aus, als würde man eine Zeile im Archetyp pom von "vaadin-compiled" in "vaadin-compiler" ändern (benötigt um den Archetyp zu erstellen und kompilieren bei der ersten Ausführung - ich selbst und andere haben) in den Foren von Vaadin vorher markiert). Ich werde versuchen, zum ursprünglichen Plugin-Typ zurückzukehren und zu sehen, ob das das Problem löst. – rustproofFish

2

Dank für den Zeiger Raffael - waren Sie ganz richtig. Es gab Jetty-Abhängigkeiten, die in dem Build enthalten waren, weil eine der Abhängigkeiten im Vaadin 7.2.4-Archetyp von vaadin-client-kompiliert in vaadin-client-compiler geändert wurde, damit das Projekt beim ersten Lauf erstellt und kompiliert werden konnte. siehe Beitrag in den Vaadin Foren mit dem Titel GWT Compiler Fehler - Vaadin Charts mit Maven und IntelliJ https://vaadin.com/forum#!/thread/4751650). Die fehlerhaften Fehler in der Baum Abhängigkeiten waren wie folgt:

[INFO] uk.co.awardtech:OAuthPopupTest:war:1.0-SNAPSHOT 
[INFO] +- com.vaadin:vaadin-server:jar:7.2.4:compile 
[INFO] | +- com.vaadin:vaadin-sass-compiler:jar:0.9.6:compile 
[INFO] | | \- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile 
[INFO] | +- com.vaadin:vaadin-shared:jar:7.2.4:compile 
[INFO] | | +- com.vaadin.external.streamhtmlparser:streamhtmlparser-jsilver:jar:0.0.10.vaadin1:compile 
[INFO] | | +- com.vaadin.external.google:guava:jar:16.0.1.vaadin1:compile 
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile 
[INFO] | \- org.jsoup:jsoup:jar:1.6.3:compile 
[INFO] +- com.vaadin:vaadin-client-compiler:jar:7.2.4:compile 
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile 
[INFO] | +- commons-logging:commons-logging:jar:1.1.3:compile 
[INFO] | +- ant:ant:jar:1.6.5:compile 
[INFO] | +- net.sourceforge.cssparser:cssparser:jar:0.9.11:compile 
[INFO] | +- ant:ant-launcher:jar:1.6.5:compile 
[INFO] | +- org.eclipse.jetty:jetty-annotations:jar:8.1.12.v20130726:compile 
[INFO] | | +- org.eclipse.jetty:jetty-plus:jar:8.1.12.v20130726:compile 
[INFO] | | | +- org.eclipse.jetty.orbit:javax.transaction:jar:1.1.1.v201105210645:compile 
[INFO] | | | \- org.eclipse.jetty:jetty-jndi:jar:8.1.12.v20130726:compile 
[INFO] | | |  +- org.eclipse.jetty:jetty-server:jar:8.1.12.v20130726:compile 
[INFO] | | |  | \- org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016:compile 
[INFO] | | |  \- org.eclipse.jetty.orbit:javax.mail.glassfish:jar:1.4.1.v201005082020:compile 
[INFO] | | |  \- org.eclipse.jetty.orbit:javax.activation:jar:1.1.0.v201105071233:compile 
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:8.1.12.v20130726:compile 
[INFO] | | | +- org.eclipse.jetty:jetty-xml:jar:8.1.12.v20130726:compile 
[INFO] | | | \- org.eclipse.jetty:jetty-servlet:jar:8.1.12.v20130726:compile 
[INFO] | | |  \- org.eclipse.jetty:jetty-security:jar:8.1.12.v20130726:compile 
[INFO] | | +- org.eclipse.jetty.orbit:javax.annotation:jar:1.1.0.v201108011116:compile 
[INFO] | | \- org.eclipse.jetty.orbit:org.objectweb.asm:jar:3.1.0.v200803061910:compile 
[INFO] | +- org.eclipse.jetty:jetty-servlets:jar:8.1.12.v20130726:compile 
[INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:8.1.12.v20130726:compile 
[INFO] | | \- org.eclipse.jetty:jetty-client:jar:8.1.12.v20130726:compile 
[INFO] | |  \- org.eclipse.jetty:jetty-http:jar:8.1.12.v20130726:compile 
[INFO] | |  \- org.eclipse.jetty:jetty-io:jar:8.1.12.v20130726:compile 
[INFO] | +- org.eclipse.jetty:jetty-util:jar:8.1.12.v20130726:compile 

Ändern der pom.xml Eintrag zurück zu Vaadin-client-kompiliert, Reinigung und Wiederaufbau die falsche Abhängigkeit aufgelöst; Atmosphere startet jetzt ohne Fehler/Warnungen und die Push-Funktionalität scheint auf der Basis meiner begrenzten Tests vorhanden und korrekt zu sein.

3

Im Anschluss an den vorangegangenen Antworten von rustproofFish und Raffael, ich war in der Lage, den Fehler zu beheben, indem Sie diese Ausschlüsse hinzufügen:

<groupId>com.vaadin</groupId> 
    <artifactId>vaadin-client-compiler</artifactId> 
    <version>${vaadin.version}</version> 
    <exclusions> 
     <exclusion> 
      <groupId>org.eclipse.jetty</groupId> 
      <artifactId>jetty-servlets</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.eclipse.jetty</groupId> 
      <artifactId>jetty-annotations</artifactId> 
     </exclusion> 
     <exclusion> 
      <groupId>org.eclipse.jetty</groupId> 
      <artifactId>jetty-util</artifactId> 
     </exclusion> 
    </exclusions> 
Verwandte Themen