将提供问题的简要说明
当前在Java 7的JBOSS 6.1.0上运行J2EE应用程序。
应用程序UI是在VAADIN 6上开发的,还具有Atmposphere框架。
需要升级到JAVA8。为此,我还必须从JBOSS 6升级到WildFly13。
除以下问题外,一切正常
应用程序启动并部署,没有任何错误。
我进入登录页面。
成功登录并转到应用程序主页。
到目前为止没有错误
1-2秒后,我进入WildFly控制台,出现以下错误
java.lang.IllegalStateException: UT000010: Session is invalid q2gXNR6KftYiyRJD6LZlJc-COtHWVr4ol3EtMuOy
at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:1029)
at io.undertow.servlet.spec.AsyncContextImpl.onAsyncComplete(AsyncContextImpl.java:604)
at io.undertow.servlet.spec.AsyncContextImpl.access$100(AsyncContextImpl.java:71)
at io.undertow.servlet.spec.AsyncContextImpl$3.run(AsyncContextImpl.java:319)
at io.undertow.servlet.spec.AsyncContextImpl$6.run(AsyncContextImpl.java:481)
at io.undertow.servlet.spec.AsyncContextImpl$TaskDispatchRunnable.run(AsyncContextImpl.java:594)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: UT000010: Session is invalid q2gXNR6KftYiyRJD6LZlJc-COtHWVr4ol3EtMuOy
at io.undertow.server.session.InMemorySessionManager$SessionImpl.getAttribute(InMemorySessionManager.java:512)
at io.undertow.servlet.spec.HttpSessionImpl.getAttribute(HttpSessionImpl.java:122)
at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.checkBeanIdentifierIndexConsistency(HttpSessionContextImpl.java:100)
at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:49)
at org.jboss.weld.module.web.context.http.HttpSessionContextImpl.associate(HttpSessionContextImpl.java:25)
at org.jboss.weld.module.web.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:244)
at org.jboss.weld.module.web.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:152)
at io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:246)
at io.undertow.servlet.spec.AsyncContextImpl.setupRequestContext(AsyncContextImpl.java:696)
at io.undertow.servlet.spec.AsyncContextImpl.access$700(AsyncContextImpl.java:71)
at io.undertow.servlet.spec.AsyncContextImpl$7.run(AsyncContextImpl.java:609)
at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:181)
at io.undertow.servlet.spec.ServletContextImpl$2.call(ServletContextImpl.java:178)
at io.undertow.servlet.spec.ServletContextImpl.invokeRunnable(ServletContextImpl.java:1027)
... 10 more**
在该异常之后,无论我在应用程序上单击什么,都无法正常工作。 这个问题与Wildfly 13和Atmosphere有关吗?
我正在使用VAADIN 6.8.12和Atmoshphere 1.0.9 这是我与web.xml相关的配置
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.disableOnStateEvent</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.HeaderBroadcasterCache</param-value> <!-- HeaderBroadcasterCache UUIDBroadcasterCache -->
</init-param>
<init-param>
<param-name>org.atmosphere.websocket.maxIdleTime</param-name>
<param-value>300000</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.CometSupport.maxInactiveActivity</param-name>
<param-value>300000</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet>
<servlet-name>Vaadin Application Servlet</servlet-name>
<servlet-class>**org.vaadin.dontpush.server.DontPushOzoneServlet**</servlet-class>
<init-param>
<description>Vaadin application class to start</description>
<param-name>application</param-name>
<param-value>com.gnt.iglbf.ui.operator.IglbfoperatorApplication</param-value>
</init-param>
<init-param>
<description>Application widgetset</description>
<param-name>widgetset</param-name>
<param-value>com.gnt.vaadin.application.widgetset.IglbfoperatorWidgetset</param-value>
</init-param>
<init-param>
<param-name>connectionGuardTimeout</param-name>
<param-value>60</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/UIDL/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Vaadin Application Servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
在下面,您还可以看到应用程序的UI模块的tho pom.xml。我已经删除了一些无关的依赖项
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-jbossweb</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat7</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-client</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-common</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-poll</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-gwt-server</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.vaadin</groupId>
<artifactId>dontpush-addon-ozonelayer</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>stepper</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>switch</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>6.8.12</version>
最后,我在下面粘贴了一些有关JBOSS控制台的警告,但不幸的是我并不能真正理解。我对VAADIN和Atmosphere不太了解,该应用程序不是我自己开发的,因此我对Web套接字和JBOSS也缺乏了解
2018-07-13 11:56:40,452 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Installed AtmosphereHandler AtmosphereGwtAtmosphereHandler mapped to context-path: /UIDL
2018-07-13 11:56:40,483 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Auto detecting WebSocketHandler in /WEB-INF/classes/
2018-07-13 11:56:40,920 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
2018-07-13 11:56:40,920 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Atmosphere is using async support: org.atmosphere.container.Servlet30CometSupport running under container: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) - 2.0.9.Final using javax.servlet/3.0
2018-07-13 11:56:40,935 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Installed Default AtmosphereInterceptor [Android Interceptor Support, SSE Interceptor Support, JSONP Interceptor Support]. Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults in your xml to disable them.
2018-07-13 11:56:40,935 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Using BroadcasterCache: org.atmosphere.cache.HeaderBroadcasterCache
2018-07-13 11:56:40,935 WARN [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Neither TrackMessageSizeInterceptor or TrackMessageSizeFilter are installed. atmosphere.js may receive glued and incomplete message.
2018-07-13 11:56:40,951 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) HttpSession supported: false
2018-07-13 11:56:40,951 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
2018-07-13 11:56:40,951 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
2018-07-13 11:56:40,951 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster
2018-07-13 11:56:40,951 INFO [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 101) Atmosphere Framework 1.0.9 started.
登录后出现控制台,收到错误,然后尝试单击任何链接,在控制台上,这就是我得到的
2018-07-13 12:03:36,534 WARN [org.jboss.weld.Servlet] (default task-4) WELD-000714: HttpContextLifecycle guard leak detected. The Servlet container is not fully compliant. The value was 1
2018-07-13 12:03:36,534 WARN [org.jboss.weld.Context] (default task-4) WELD-000225: Bean store leak detected during org.jboss.weld.module.web.context.http.HttpRequestContextImpl association: HttpServletRequestImpl [ POST /IGLBFOperator/UIDL/null ]
2018-07-13 12:03:36,534 WARN [org.jboss.weld.Context] (default task-4) WELD-000225: Bean store leak detected during org.jboss.weld.module.web.context.http.HttpSessionContextImpl association: HttpServletRequestImpl [ POST /IGLBFOperator/UIDL/null ]
2018-07-13 12:03:36,550 INFO [org.vaadin.dontpush.server.AtmosphereDontPushHandler] (default task-4) Failed to find resource for [1]
2018-07-13 12:03:36,659 INFO [org.vaadin.dontpush.server.AtmosphereDontPushHandler] (default task-4) Failed to find resource for [1]
2018-07-13 12:03:37,537 INFO [org.vaadin.dontpush.server.AtmosphereDontPushHandler] (default task-4) You have set an infinite timeout for your comet connection this is not recommended
任何帮助将不胜感激。不应该太复杂,只是我对Atmosphere和VAADIN不太了解。 在具有JAVA 7的JBOSS 6.1.0上,所有上述配置都可以正常工作
答案 0 :(得分:0)
我无法回答您的特定问题,但是我也在升级运行在wildfly 8上的Web应用程序,然后迁移到Wildfly13。我发现问题出在很多依赖项和版本冲突解决。我们的应用程序中也有气氛,我升级到了最新的气氛运行时2.4.30。不知道您的VAADIN组件(它看起来依赖大气)是否可以与最新版本一起使用,但我想我提到了这一点。另外,wildfly 13在modules子目录中预先打包了许多依赖项,但是有时,对于那些较旧的应用程序来说,这些依赖项太新了,因此您要么需要向其中添加其他项,要么找到jboss-deployment-应用中的structure.xml,并对该文件中的依赖项列表进行必要的更改。 抱歉,我没有更多帮助。希望这至少可以帮助一些人。
编辑:PS升级应用程序服务器通常不是最容易的事情,尤其是对于更复杂的应用程序。我一直在进行Wildfly 13迁移工作了一个多星期,而且我不得不进行许多代码更改,而且还需要几周的时间才能完成。