glassfish
  1. glassfish
  2. GLASSFISH-20081

[UB] javax.ejb.NoSuchEJBException in unsyncpcsfsb with ha

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0_b82_EE7MS7
    • Fix Version/s: 4.0
    • Component/s: docs
    • Labels:
      None
    • Environment:

      RHL6.2 and JDK1.7.0_10

      Description

      The problem was reported in
      http://java.net/jira/browse/GLASSFISH-20020
      which can't be accessed for a few days.
      Hence, file this bug for failure analysis.
      Will close the 20020 later.

        Activity

        Hide
        sherryshen added a comment -

        glassfish-4.0-b82-03_23_2013.zip
        During the test dev and failure analysis for
        http://java.net/jira/browse/GLASSFISH-20011
        I observed javax.ejb.NoSuchEJBException in unsyncpcsfsb with ha.

        To run tests, to see env in
        http://java.net/jira/browse/GLASSFISH-20011

        test2, persist, joinTx, no flush

        test2 without ha, passed.
        do "ant ee all-dbg"

        test2 with ha, failed.
        web.xml has <distributable/>
        deploy war with --availabilityenabled=true
        do "ant ee all-dbg-ha"

        server.log from instance2

        Error during checkpoint ([TestEJB]. Key:
        [1f0090099dfa82de-ce0085b80d45218a-1])
        [com.sun.ejb.containers.StatefulSessionContainer$EMNotSerializableException:
        java.io.NotSerializableException:
        org.eclipse.persistence.internal.jpa.EntityManagerImpl

        .....
        javax.ejb.NoSuchObjectLocalException: The EJB does not exist.
        session-key: 1f0090099dfa82de-ce0085b80d45218a-1
        at
        com.sun.ejb.containers.StatefulSessionContainer._getContext(StatefulSessionContainer.java:1616)
        at
        com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2518)
        at
        com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1908)
        .....
        javax.ejb.NoSuchEJBException

        Show
        sherryshen added a comment - glassfish-4.0-b82-03_23_2013.zip During the test dev and failure analysis for http://java.net/jira/browse/GLASSFISH-20011 I observed javax.ejb.NoSuchEJBException in unsyncpcsfsb with ha. To run tests, to see env in http://java.net/jira/browse/GLASSFISH-20011 test2, persist, joinTx, no flush test2 without ha, passed. do "ant ee all-dbg" test2 with ha, failed. web.xml has <distributable/> deploy war with --availabilityenabled=true do "ant ee all-dbg-ha" server.log from instance2 Error during checkpoint ( [TestEJB] . Key: [1f0090099dfa82de-ce0085b80d45218a-1] ) [com.sun.ejb.containers.StatefulSessionContainer$EMNotSerializableException: java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerImpl ..... javax.ejb.NoSuchObjectLocalException: The EJB does not exist. session-key: 1f0090099dfa82de-ce0085b80d45218a-1 at com.sun.ejb.containers.StatefulSessionContainer._getContext(StatefulSessionContainer.java:1616) at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2518) at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1908) ..... javax.ejb.NoSuchEJBException
        Hide
        sherryshen added a comment -

        The JPA2.1 test info can be found at
        http://aseng-wiki.us.oracle.com/asengwiki/display/ASQA/GF+4.0+Test+Development+Page
        As a summary for the bugs on cluster.
        1) SFSB tests passed on DAS.
        Verified the fix for
        http://java.net/jira/browse/GLASSFISH-19597
        2) To wrap up my test dev, I ran SFSB tests on a cluster with using
        different instances and reported
        http://java.net/jira/browse/GLASSFISH-20011
        3) Next, I enabled HA to see if it helps for 20011, but it failed with
        http://java.net/jira/browse/GLASSFISH-20081
        4) After, I tried a simple SFSB tests without JPA, it passed.

        I have a hudson run to show to test env and problems.
        http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/

        #8 dbg failures
        http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/8/artifact/appserver-sqe/reports/pe-ee/amd64_easqezorro5_Linux/html/test_results_ejb.html
        The 3 tests are executed in the order below.
        A) appserver-sqe/pe/ejb/ejb31/fo/sfsb, SFSB with HA, passed
        B) appserver-sqe/pe/ejb/jpa20/war/unsyncpcsfsb, SFSB without HA, test2, passed.
        C) appserver-sqe/pe/ejb/jpa20/war/unsyncpcsfsb, SFSB with HA, test2, failed. GLASSFISH-20081

        #2, ejb-cluster with 1 failure, GLASSFISH-20011
        http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/2/artifact/appserver-sqe/reports/pe-ee/amd64_easqezorro5_Linux/html/test_results_ejb.html

        Show
        sherryshen added a comment - The JPA2.1 test info can be found at http://aseng-wiki.us.oracle.com/asengwiki/display/ASQA/GF+4.0+Test+Development+Page As a summary for the bugs on cluster. 1) SFSB tests passed on DAS. Verified the fix for http://java.net/jira/browse/GLASSFISH-19597 2) To wrap up my test dev, I ran SFSB tests on a cluster with using different instances and reported http://java.net/jira/browse/GLASSFISH-20011 3) Next, I enabled HA to see if it helps for 20011, but it failed with http://java.net/jira/browse/GLASSFISH-20081 4) After, I tried a simple SFSB tests without JPA, it passed. I have a hudson run to show to test env and problems. http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/ #8 dbg failures http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/8/artifact/appserver-sqe/reports/pe-ee/amd64_easqezorro5_Linux/html/test_results_ejb.html The 3 tests are executed in the order below. A) appserver-sqe/pe/ejb/ejb31/fo/sfsb, SFSB with HA, passed B) appserver-sqe/pe/ejb/jpa20/war/unsyncpcsfsb, SFSB without HA, test2, passed. C) appserver-sqe/pe/ejb/jpa20/war/unsyncpcsfsb, SFSB with HA, test2, failed. GLASSFISH-20081 #2, ejb-cluster with 1 failure, GLASSFISH-20011 http://sqe-hudson.us.oracle.com:8080/hudson/view/Sherry_core/job/sherry-lc-d/2/artifact/appserver-sqe/reports/pe-ee/amd64_easqezorro5_Linux/html/test_results_ejb.html
        Hide
        Mitesh Meswani added a comment -

        As this is related to clustering, deferring this for 4.0.1. Ethan and Quiang will investigate further.

        Show
        Mitesh Meswani added a comment - As this is related to clustering, deferring this for 4.0.1. Ethan and Quiang will investigate further.
        Hide
        qiang.l.liu added a comment -

        If the HA enabled, the SFSB container will try to store the ejb's session context for replication. When the container tries to serialize the context object, a NotSerializableException is thrown up:
        com.sun.ejb.containers.StatefulSessionContainer$EMNotSerializableException: java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerImpl, and the EJB is marked with destroyed. This is because the TestEJB has a reference of EntityManager. The EJB's context will be removed after it is marked destroyed. So, when a subsequence call to the EJB, the client will get NoSuchObjectLocalException.

        Show
        qiang.l.liu added a comment - If the HA enabled, the SFSB container will try to store the ejb's session context for replication. When the container tries to serialize the context object, a NotSerializableException is thrown up: com.sun.ejb.containers.StatefulSessionContainer$EMNotSerializableException: java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerImpl, and the EJB is marked with destroyed. This is because the TestEJB has a reference of EntityManager. The EJB's context will be removed after it is marked destroyed. So, when a subsequence call to the EJB, the client will get NoSuchObjectLocalException.
        Hide
        qiang.l.liu added a comment - - edited

        After I putting "passivationCapable=false" on TestEJB, the test passed.

        So, I'd like resolve the issue as work as designed.

        Show
        qiang.l.liu added a comment - - edited After I putting "passivationCapable=false" on TestEJB, the test passed. So, I'd like resolve the issue as work as designed.
        Hide
        sherryshen added a comment -

        Thanks Qiang and Mitesh for the analysis for
        http://java.net/jira/browse/GLASSFISH-20081

        Here is what I understand the problem.

        1) HA Limitation:
        EntityManager can't be serialized as a context object in SFSB container for HA replication.
        2) Workaround:
        Update the @Stateful annotation on TestEJB
        to @Stateful(passivationCapable=false), then
        JPA will work in ha env without replication
        or in non-ha env.

        Where are these 2 points in the documents?

        I verified the test passed on ha env without replication or non-ha env with b85 nightly.
        http://javaweb.us.oracle.com/net/asqe-logs.us.oracle.com/export1/4.0/Results/build85/core/b20081/t1/html/test_results_ejb.html

        Show
        sherryshen added a comment - Thanks Qiang and Mitesh for the analysis for http://java.net/jira/browse/GLASSFISH-20081 Here is what I understand the problem. 1) HA Limitation: EntityManager can't be serialized as a context object in SFSB container for HA replication. 2) Workaround: Update the @Stateful annotation on TestEJB to @Stateful(passivationCapable=false), then JPA will work in ha env without replication or in non-ha env. Where are these 2 points in the documents? I verified the test passed on ha env without replication or non-ha env with b85 nightly. http://javaweb.us.oracle.com/net/asqe-logs.us.oracle.com/export1/4.0/Results/build85/core/b20081/t1/html/test_results_ejb.html
        Hide
        sherryshen added a comment -

        Copy the discussion about doc update.

        On 4/17/2013 12:19 PM, Paul Davies wrote:
        > Hi Mitesh,
        >
        > The corresponding section in the GlassFish 3.1.2 High Availability Administration guide is at:
        >
        > http://docs.oracle.com/cd/E26576_01/doc.312/e24934/session-persistence-and-failover.htm#abdlc .
        >
        > I have copied Mike Fitch on this response as he is leading the documentation effort for GF 4.0 and he should be able to advise how to proceed.
        >
        > Regards,
        > -Paul
        >
        > On 4/17/2013 11:58 AM, Mitesh Meswani wrote:
        >> Hi Paul,
        >>
        >> We would like to document the restriction that a SFSB injecting EntityManagers can not be passivated and failed over. Which document would it go to and who is the owner for that? We had a section on restrictions in GlassFish 2.1.1 High Availability Administration guide. I could not find a relevant section in GlassFish 3.1.2 High Availability Administration guide that documents such limitations.
        >>
        >> Thanks,
        >> Mitesh

        Show
        sherryshen added a comment - Copy the discussion about doc update. On 4/17/2013 12:19 PM, Paul Davies wrote: > Hi Mitesh, > > The corresponding section in the GlassFish 3.1.2 High Availability Administration guide is at: > > http://docs.oracle.com/cd/E26576_01/doc.312/e24934/session-persistence-and-failover.htm#abdlc . > > I have copied Mike Fitch on this response as he is leading the documentation effort for GF 4.0 and he should be able to advise how to proceed. > > Regards, > -Paul > > On 4/17/2013 11:58 AM, Mitesh Meswani wrote: >> Hi Paul, >> >> We would like to document the restriction that a SFSB injecting EntityManagers can not be passivated and failed over. Which document would it go to and who is the owner for that? We had a section on restrictions in GlassFish 2.1.1 High Availability Administration guide. I could not find a relevant section in GlassFish 3.1.2 High Availability Administration guide that documents such limitations. >> >> Thanks, >> Mitesh
        Hide
        sherryshen added a comment -

        Reopen for Mike Fitch to address the limitation in docs.

        Show
        sherryshen added a comment - Reopen for Mike Fitch to address the limitation in docs.
        Hide
        Mike Fitch added a comment -

        Added [UB] to summary so this issue will appear in unbundled (ie, book-related) doc issues queries

        Show
        Mike Fitch added a comment - Added [UB] to summary so this issue will appear in unbundled (ie, book-related) doc issues queries
        Hide
        Mike Fitch added a comment -

        Also set Component to docs.

        Show
        Mike Fitch added a comment - Also set Component to docs.
        Hide
        marina vatkina added a comment -

        This behavior is per the EJB spec 3.2.

        Show
        marina vatkina added a comment - This behavior is per the EJB spec 3.2.

          People

          • Assignee:
            Mike Fitch
            Reporter:
            sherryshen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: