Bug 1029099
Summary: | [GSS] (6.3) NPE when replicating CDI bean on EAP 6.1.0 cluster | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Ingo Weiss <iweiss> | ||||
Component: | CDI/Weld | Assignee: | Jozef Hartinger <jharting> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ron Šmeral <rsmeral> | ||||
Severity: | high | Docs Contact: | Russell Dickenson <rdickens> | ||||
Priority: | unspecified | ||||||
Version: | 6.1.0 | CC: | amelicha, batkisso, bmaxwell, iweiss, jsenshar, kkhan, maschmid, myarboro, pmuir, rhusar, smatasar, smumford, twells | ||||
Target Milestone: | DR0 | ||||||
Target Release: | EAP 6.3.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
The session ID created in clustered instances of earlier JBoss EAP versions contained a full source in a deployed bean's metadata (used to create a session ID). This was causing beans deployed across different nodes in the cluster to be recreated if a session ID was reused when accessing a different node. A NullPointerException could also been seen in the later node's log.
New code has been introduced that obtains a relative path, rather than an absolute path. This means that beans are no longer recreated and the NPE no longer presents.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 1051205 (view as bug list) | Environment: | |||||
Last Closed: | 2014-06-28 15:38:41 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1040671, 1051205 | ||||||
Attachments: |
|
Description
Ingo Weiss
2013-11-11 16:34:50 UTC
The NPE is thrown after a serialized proxy is unable to attach back to the Bean<?> instance on deserialization. It seems that no Bean<?> with the matching id is found on the other node. Bean ID creation is deterministic and both nodes should contain the same set of beans and IDs. The only scenario in which this could possibly happen is when the an application on one node is different to the other one. This could include a small difference such as a filename. Unfortunately Weld currently does not provide any debug information on such failure. I got this reply from the customer:
> we had a closer look at the id:
> 18:37:48,303 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-/127.0.0.1:8180-1) JBWEB000233: Exception sending request initialized lifecycle event to listener instance of class org.jboss.weld.servlet.WeldListener: java.lang.IllegalStateException: Error restoring serialized contextual with id org.jboss.weld.bean-demo-ear.ear.demo-war.war/home/pete/jboss-eap-6.1-orig-1/standalone/deployments/demo-ear.ear/demo-war.war/WEB-INF/classes-ManagedBean-class demo.war.DemoSessionBean
>
> It seems likt the id contains the complete path, in our example:
> demo-war.war/home/pete/boss-eap-6.1-orig-1/standalone/deployments/
> so we deployed it on two hosts, and switched from:
> /home/pete/jboss-eap-6.1-orig-1
> /home/pete/ticket-rh/jboss-eap-6.1-orig-2
> to
> /home/pete/jboss-eap-6.1-orig
> on both hosts. And it worked!
It seems the contextual ID is taking the full path into consideration.
resourceRoot.getRoot().getPathName() apparently returns an absolute path /home/pete/jboss-eap-6.1-orig-1/standalone/deployments/demo-ear.ear/demo-war.war instead of the relative one such as /content/demo-ear.ear/demo-war.war This happens for exploded deployments The upstream fix should deal with this as well. eap 6.2.0 patch ready at https://bugzilla.redhat.com/show_bug.cgi?id=1040671 Added draft release note text in the Docs Text field above. Verified on 6.3.0.DR0. |