我在Wildfly托管域上运行应用程序,该域由2台虚拟机组成,每台虚拟机上有3台服务器。
在console.log中发生异常:
THAT
我尝试使用openjdk-1.8和Oracle jdk-1.8以相同的结果在wildfly 8.2.1.Final和9.0.2 Final上运行应用程序。应用程序已部署并运行且没有错误,我通过负载均衡器(循环法)成功登录并在服务器上工作。
声明为14:04:10,254 WARN [org.jboss.weld.Servlet] (default task-51) WELD-000717: Unable to deactivate context org.jboss.weld.context.http.HttpRequestContextImpl@2ec2ea52 when destroying request HttpServletRequestImpl [ GET /orpon/ ]
14:04:10,254 WARN [org.jboss.weld.Servlet] (default task-51) WELD-000717: Unable to deactivate context org.jboss.weld.context.http.HttpSessionContextImpl@f171e22 when destroying request HttpServletRequestImpl [ GET /orpon/ ]
14:04:10,254 ERROR [io.undertow.request] (default task-51) Undertow request failed HttpServerExchange{ GET /orpon/}: java.lang.IllegalAccessError: Can not set final int field io.undertow.util.HttpString.hashCode to (int)-1978065285
at io.undertow.util.HttpString.readObject(HttpString.java:340)
at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) [:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_66]
at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1644)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149)
at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135)
at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53)
at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365) [rt.jar:1.8.0_66]
at java.util.HashMap.readObject(HashMap.java:1394) [rt.jar:1.8.0_66]
at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) [:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_66]
at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1637)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1745)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1658)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149)
at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135)
at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53)
at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365) [rt.jar:1.8.0_66]
at java.util.HashMap.readObject(HashMap.java:1396) [rt.jar:1.8.0_66]
at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) [:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_66]
at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1637)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.wildfly.clustering.marshalling.SimpleMarshalledValue.get(SimpleMarshalledValue.java:101)
at org.wildfly.clustering.marshalling.SimpleMarshalledValue.get(SimpleMarshalledValue.java:45)
at org.wildfly.clustering.marshalling.MarshalledValueMarshaller.read(MarshalledValueMarshaller.java:45)
at org.wildfly.clustering.marshalling.MarshalledValueMarshaller.read(MarshalledValueMarshaller.java:32)
at org.wildfly.clustering.web.infinispan.session.coarse.CoarseSessionFactory.findValue(CoarseSessionFactory.java:127)
at org.wildfly.clustering.web.infinispan.session.coarse.CoarseSessionFactory.findValue(CoarseSessionFactory.java:56)
at org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.findSession(InfinispanSessionManager.java:232)
at org.wildfly.clustering.web.undertow.session.DistributableSessionManager.getSession(DistributableSessionManager.java:115)
at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:723)
at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:753)
at io.undertow.servlet.spec.ServletContextImpl.updateSessionAccessTime(ServletContextImpl.java:757)
at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:548)
at io.undertow.servlet.spec.HttpServletResponseImpl.doErrorDispatch(HttpServletResponseImpl.java:162)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:317)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
的{{1}}字段hashCode
的{{3}}字段io.undertow.util.HttpString
。为什么final transient int
方法试图以非常奇怪的方式更改此字段的值?
我用Google搜索了互联网,但没有发现这个或类似的错误,也不知道如何处理它。
我的申请中哪个地方可能属于这个例子?
更新: 这个In undertow sources at github补丁帮助我避免了问题:
readObject