Приложение работает на wildfly, но не на tomcat

#java #wildfly #vaadin #tomcat8 #vaadin-flow

#java #wildfly #vaadin #tomcat8 #vaadin-flow

Вопрос:

Я создал приложение Vaadin, и я могу развернуть его на Wildfly, однако я не могу развернуть его на Tomcat 8.5. Я получаю следующие ошибки при попытке развернуть его на Tomcat:

     Mar 05, 2019 9:22:10 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:CQT-2' did not find a matching property.
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/8.5.5
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Aug 31 2016 19:51:16 UTC
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         8.5.5.0
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:Program FilesJavajdk1.8.0_181jre
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_181-b13
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         D:Publicworkspacedevelopment.metadata.pluginsorg.eclipse.wst.server.coretmp1
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:Program FilesApache Software FoundationTomcat 8.5
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:Publicworkspacedevelopment.metadata.pluginsorg.eclipse.wst.server.coretmp1
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:Program FilesApache Software FoundationTomcat 8.5
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:Publicworkspacedevelopment.metadata.pluginsorg.eclipse.wst.server.coretmp1wtpwebapps
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:Program FilesApache Software FoundationTomcat 8.5endorsed
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Mar 05, 2019 9:22:10 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Program FilesJavajdk1.8.0_181bin;C:WINDOWSSunJavabin;C:WINDOWSsystem32;C:WINDOWS;C:/Program Files/Java/jre1.8.0_181/bin/server;C:/Program Files/Java/jre1.8.0_181/bin;C:/Program Files/Java/jre1.8.0_181/lib/amd64;C:Ruby26-x64bin;C:Program Files (x86)Common FilesOracleJavajavapath;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program FilesSafeNetAuthenticationSACx64;C:Program FilesSafeNetAuthenticationSACx32;C:Program FilesMicrosoft VS Codebin;C:Program Filesnodejs;C:Program FilesJavajre1.8.0_181bin;C:Program FilesJavajdk1.8.0_181bin;D:Publicsoftwareapache-maven-3.5.4-binapache-maven-3.5.4bin;C:Program FilesGitcmd;C:Ruby26-x64bin;D:Publicsoftwarespringspring-tool-suite-3.9.5.RELEASE-e4.8.0-win32-x86_64sts-bundlests-3.9.5.RELEASE;;.
Mar 05, 2019 9:22:10 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8085"]
Mar 05, 2019 9:22:10 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 05, 2019 9:22:10 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Mar 05, 2019 9:22:10 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 05, 2019 9:22:10 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 926 ms
Mar 05, 2019 9:22:10 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 05, 2019 9:22:10 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.5
Mar 05, 2019 9:22:14 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 05, 2019 9:22:16 AM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [META-INF/versions/9/module-info.class] from Jar [file:/D:/Public/workspace/development/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/CQT-2/WEB-INF/lib/byte-buddy-1.9.3.jar] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
    at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)
    at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:54)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:174)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:83)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2053)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2000)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1970)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1923)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1163)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Mar 05, 2019 9:22:20 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 05, 2019 9:22:20 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing AtmosphereFramework
[localhost-startStop-1] INFO com.vaadin.cdi.CdiServletDeployer - Automatically deploying CDI Vaadin servlet to /*
[localhost-startStop-1] INFO com.vaadin.flow.server.startup.ServletDeployer - Skipping automatic servlet registration because there is already a Vaadin servlet with the name com.vaadin.cdi.CdiServletDeployer
[localhost-startStop-1] INFO com.vaadin.flow.server.startup.ServletDeployer - Automatically deploying Vaadin servlet with name frontendFilesServlet to /frontend/*
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /*
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFO: Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
Mar 05, 2019 9:22:20 AM org.atmosphere.util.ForkJoinPool <init>
INFO: Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
Mar 05, 2019 9:22:20 AM org.atmosphere.container.JSR356AsyncSupport <init>
INFO: JSR 356 Mapping path 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Installing Default AtmosphereInterceptors
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Shared List Resources: false
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Polling Wait Time 100
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Shared ExecutorService supported: true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Async I/O Thread Pool Size: 200
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Invoke AtmosphereInterceptor on WebSocket message true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: HttpSession supported: true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat/8.5.5 using javax.servlet/3.0 and jsr356/WebSocket API
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere Framework 2.4.30.vaadin1 started.
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /*
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFO: Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
Mar 05, 2019 9:22:20 AM org.atmosphere.util.ForkJoinPool <init>
INFO: Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
Mar 05, 2019 9:22:20 AM org.atmosphere.container.JSR356AsyncSupport <init>
INFO: JSR 356 Mapping path /frontend
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Installing Default AtmosphereInterceptors
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFO: Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Shared List Resources: false
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Polling Wait Time 100
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Shared ExecutorService supported: true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Async I/O Thread Pool Size: 200
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Invoke AtmosphereInterceptor on WebSocket message true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: HttpSession supported: true
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat/8.5.5 using javax.servlet/3.0 and jsr356/WebSocket API
Mar 05, 2019 9:22:20 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere Framework 2.4.30.vaadin1 started.
Mar 05, 2019 9:22:20 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8085]
Mar 05, 2019 9:22:20 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Mar 05, 2019 9:22:20 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 9823 ms
Mar 05, 2019 9:22:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet com.vaadin.cdi.CdiServletDeployer as unavailable
Mar 05, 2019 9:22:21 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet com.vaadin.cdi.CdiServletDeployer
java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
    at java.lang.Class.getDeclaredFields(Class.java:1916)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
    at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache(DefaultInstanceManager.java:285)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:141)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1050)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:779)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
  

Почему это происходит и как я могу это решить? Спасибо.

Я использую приведенные ниже библиотеки, на случай, если это имеет значение:

 import java.security.SecureRandom;
import java.security.cert.X509Certificate;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.inject.Inject;
import com.vaadin.flow.component.Composite;
import com.vaadin.flow.component.HasElement;
import com.vaadin.flow.component.Text;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.BeforeEnterEvent;
import com.vaadin.flow.router.BeforeEnterObserver;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.server.VaadinRequest;
  

Ответ №1:

Как вы можете видеть в stacktrace, проблема в том, что на Tomcat вы получаете

java.lang.Исключение ClassNotFoundException: javax.enterprise.inject.spi.BeanManager

Тот факт, что оно работает на Wildfly, но не на Tomcat, объясняется тем фактом, что Wildfly — это сервер приложений, уже содержащий множество библиотек (в зависимости от используемой вами версии). Дистрибутив Java EE Full amp; Web версии 16.0.0.Final, например, содержит библиотеку cdi-api-2.0.SP1.jar (в wildfly-16.0.0.Finalmodulessystemlayersbasejavaxenterpriseapimain), которое содержит класс BeanManager. Следовательно, класс найден, и он работает.

Tomcat — это веб-сервер, который по умолчанию не содержит EE-библиотек. Поэтому при развертывании на Tomcat вы должны убедиться, что библиотека, содержащая класс javax.enterprise.inject.spi.BeanManager, находится в пути к классу при развертывании на tomcat.

Библиотека, содержащая этот класс, является https://mvnrepository.com/artifact/javax.enterprise/cdi-api/2.0.SP1 и в зависимости от того, какой проект вы используете, вы можете добавить зависимость maven / gradle, например

 <dependency>
    <groupId>javax.enterprise</groupId>
    <artifactId>cdi-api</artifactId>
    <version>2.0.SP1</version>
</dependency>
  

(при использовании maven) или загрузите jar-файл и поместите его в свои самоуправляемые библиотеки, если не используете инструмент управления сборкой, такой как maven и т.д.

Комментарии:

1. Я сделал это и все равно получил ошибку, касающуюся аннотаций.

2. мешает ли эта ошибка работе вашего приложения? Трудно сказать, в чем именно проблема из коробки. Какую версию Java вы использовали для создания своего приложения? И какую версию Java вы используете для запуска tomcat? Я не могу сказать, в чем именно проблема, но похоже, что это ошибка, связанная с версией Java (см. blog.doubleslash.de /… ). В зависимости от ваших настроек вы могли бы попробовать понизить вашу зависимость от byte buddy до 1.8.X вместо 1.9.X, потому что с версией 1.9.0 была реализована поддержка Java 11.

3. Вы правы только наполовину. Jar «javax.enterprise: cdi-api: 2.0.SP1» предоставляет только стандартные классы API — он не предоставляет реализацию CDI. Добавление реализации не является тривиальным, поскольку для этого потребуется интеграция с реализацией Tomcat servlet API.

Ответ №2:

Приложения, которые выполняются на WildFly, Payara, TomEE, WebSphere, GlassFish и т.д., обычно не переносимы на Tomcat. Все эти серверы предоставляют реализацию API-интерфейсов спецификации Java(™) EE 7. В более новых версиях этих серверов реализованы API-интерфейсы спецификации Java (TM) EE 8, которые включают Servlet 4.0 API.

Tomcat 8.5 реализует только API сервлета 3.1 — Apache Tomcat 8.5.38. Если вы посмотрите на это и сравните его с любым из вышеперечисленных, вы получите представление о том, как многого не хватает в Tomcat.

Я полагаю, что TomEE, GlassFish и Payara содержат должным образом интегрированные компоненты Tomcat.

Ответ №3:

Привет, как я вижу, у вас проблема с вашим jar byte-buddy-1.9.3.jar попробуйте удалить его из вашего пути сборки и просто зайдите в свое рабочее пространство eclipse и вставьте вручную в папку lib вашего проекта, а после этого, пожалуйста, обновите свой проект. Надеюсь, это исправит вашу проблему.

Комментарии:

1. Я поставил версию 1.9.10, и теперь я получаю ту же ошибку для этой версии.

2. вы пытались добавить jar вручную, вставив его в свою рабочую область, или вы напрямую добавили его в buld path