glassfish
  1. glassfish
  2. GLASSFISH-16164

eclipselink.weaving breaks marshalling out of the box

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1_b43
    • Fix Version/s: None
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Windows 7 and Mac OS X

      Description

      Separately deployed EJB components that return @Entity objects, fail serialization and return empty objects to remote components (such as a managed bean in a separately deployed WAR). Adding: <property name="eclipselink.weaving" value="false"/> to persistence.xml fixes the issue, but cant be expected behavior out of the box. I tried 2 separate clean installs, and an upgrade from 3.0.1 but all have same broken behavior.

      To reproduce:
      1) Deploy EJB jar with a stateless EJB that returns an entity from remote interface.
      2) Deploy web application with a managed bean that retrieves entity from injected EJB
      3) Access managed bean from view.

      I get empty entity classes (all fields null) with no errors in server.log.

      I have a test case intellij project illustrating issue if required.

        Issue Links

          Activity

          netricsoft created issue -
          marina vatkina made changes -
          Field Original Value New Value
          Component/s ejb_container [ 10596 ]
          Component/s orb [ 10610 ]
          Hide
          marina vatkina added a comment -

          let's start with JPA

          Show
          marina vatkina added a comment - let's start with JPA
          marina vatkina made changes -
          Assignee marina vatkina [ mvatkina ] Mitesh Meswani [ mm110999 ]
          Hide
          Mitesh Meswani added a comment -

          Can you please attach the test project that you are mentioning above. That would help speed up things.

          Show
          Mitesh Meswani added a comment - Can you please attach the test project that you are mentioning above. That would help speed up things.
          Hide
          netricsoft added a comment - - edited

          Here is a video illustrating issue:

          http://www.youtube.com/watch?v=2xg_QiGijuE

          (watch in 'original' format)

          The attached project assumes you have a jdbc resource jdbc/testcase setup with one table:

          create table person (
          id integer not null primary key,
          email varchar2(80) not null
          );

          insert into person values ( 1, 'test@case.com' );

          The test case contains 3 components/modules:

          1) "Model", shared classes for Session and "Web" module.
          Compile with EE 6.
          2) "Session", an EJB component with a single EJB PeopleSessionBean. Compile with EE 6. This module contains the JPA persistence.xml WITHOUT the eclipselink.weaving property element. So it will not work until the following is added:
          <properties>
          <property name="eclipselink.weaving" value="false"/>
          </properties>

          3) "Web", a WAR component with a single managed bean that attempts to retrieve an entity from the remote EJB. Compile with EE 6 and Mojarra 2.1.

          To reproduce issue:

          Compile Model
          Compile Session (include Model source)
          Compile Web (include Model source)

          Deploy Session component
          Deploy Web component
          Access web component (http://localhost/testcase/)

          As is, you will get Id 0 and blank (null) for email.

          Add <properties> element above to persistence-unit in persistence.xml, redeploy Session and Web and reload testcase page. You will get Id 1 and email test@case.com

          Thanks

          -jim

          Show
          netricsoft added a comment - - edited Here is a video illustrating issue: http://www.youtube.com/watch?v=2xg_QiGijuE (watch in 'original' format) The attached project assumes you have a jdbc resource jdbc/testcase setup with one table: create table person ( id integer not null primary key, email varchar2(80) not null ); insert into person values ( 1, 'test@case.com' ); The test case contains 3 components/modules: 1) "Model", shared classes for Session and "Web" module. Compile with EE 6. 2) "Session", an EJB component with a single EJB PeopleSessionBean. Compile with EE 6. This module contains the JPA persistence.xml WITHOUT the eclipselink.weaving property element. So it will not work until the following is added: <properties> <property name="eclipselink.weaving" value="false"/> </properties> 3) "Web", a WAR component with a single managed bean that attempts to retrieve an entity from the remote EJB. Compile with EE 6 and Mojarra 2.1. To reproduce issue: Compile Model Compile Session (include Model source) Compile Web (include Model source) Deploy Session component Deploy Web component Access web component ( http://localhost/testcase/ ) As is, you will get Id 0 and blank (null) for email. Add <properties> element above to persistence-unit in persistence.xml, redeploy Session and Web and reload testcase page. You will get Id 1 and email test@case.com Thanks -jim
          netricsoft made changes -
          Attachment TestCase.zip [ 45224 ]
          Hide
          netricsoft added a comment -

          Will this issue be fixed? or is this intended behavior?

          thanks

          Show
          netricsoft added a comment - Will this issue be fixed? or is this intended behavior? thanks
          Hide
          Mitesh Meswani added a comment - - edited

          We are still investigating. Meanwhile, a workaround is to use attribute based persistence. The issue does not manifest there.

          BTW, thanks for the reproductions and cool video walk through

          Show
          Mitesh Meswani added a comment - - edited We are still investigating. Meanwhile, a workaround is to use attribute based persistence. The issue does not manifest there. BTW, thanks for the reproductions and cool video walk through
          Hide
          Mitesh Meswani added a comment -

          Ken,

          Assigning to you to investigate why IIOP serialization layer causes this issue. I have sent you test app and instructions to reproduce this in email.

          Show
          Mitesh Meswani added a comment - Ken, Assigning to you to investigate why IIOP serialization layer causes this issue. I have sent you test app and instructions to reproduce this in email.
          Mitesh Meswani made changes -
          Assignee Mitesh Meswani [ mm110999 ] Ken Cavanaugh [ kcavanaugh ]
          Hide
          scatari added a comment -

          Targeting for next release after 3.1.1.

          Show
          scatari added a comment - Targeting for next release after 3.1.1.
          scatari made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          Tags eclipselink corba eclipselink corba 3_1_1-scrubbed 3_1-next
          Hide
          Mitesh Meswani added a comment -

          Another work around is adding property <property name="eclipselink.weaving.fetchgroups" value="false"/> to the persistence unit

          Show
          Mitesh Meswani added a comment - Another work around is adding property <property name="eclipselink.weaving.fetchgroups" value="false"/> to the persistence unit
          Harshad Vilekar made changes -
          Tags eclipselink corba 3_1_1-scrubbed 3_1-next eclipselink corba 3_1_2-exclude 3_1_1-scrubbed 3_1-next
          Harshad Vilekar made changes -
          Link This issue is related to GLASSFISH-17557 [ GLASSFISH-17557 ]
          Hide
          jimmysklim added a comment -

          Guys! Thank alot for the work around. After adding <property name="eclipselink.weaving.fetchgroups" value="false"/> it's worked.

          Show
          jimmysklim added a comment - Guys! Thank alot for the work around. After adding <property name="eclipselink.weaving.fetchgroups" value="false"/> it's worked.
          Ed Bratt made changes -
          Assignee Ken Cavanaugh [ kcavanaugh ] Harshad Vilekar [ hvilekar ]
          Hide
          jthoennes added a comment -

          Any plans when this will be corrected?

          Show
          jthoennes added a comment - Any plans when this will be corrected?
          Hide
          kombatkuehn added a comment -

          This issue still exists in 3.1.2 (build 23).

          Show
          kombatkuehn added a comment - This issue still exists in 3.1.2 (build 23).
          Hide
          chrispy added a comment -

          This bug is still a problem. When will this be fixed? A workaround is not a solution :-/

          Show
          chrispy added a comment - This bug is still a problem. When will this be fixed? A workaround is not a solution :-/
          Hide
          eldiegos added a comment -

          OMG. This bug has been a pain on the neck until i found this issue. What a waste of time trying to solving it. Please glassfish team solve it.

          I have vote for it.

          Thanks.

          Show
          eldiegos added a comment - OMG. This bug has been a pain on the neck until i found this issue. What a waste of time trying to solving it. Please glassfish team solve it. I have vote for it. Thanks.
          Harshad Vilekar made changes -
          Tags eclipselink corba 3_1_2-exclude 3_1_1-scrubbed 3_1-next 3_1-next 3_1_1-scrubbed 3_1_2-exclude corba eclipselink orb-review
          Hide
          vins4java added a comment -

          I agree with eldiegos. I found this bug up to lastest 3.1.2.2 and there's no way to know if it will be fixed for glassfish 4.0 or not...
          What's the plan for the resolution of this bug?

          Show
          vins4java added a comment - I agree with eldiegos. I found this bug up to lastest 3.1.2.2 and there's no way to know if it will be fixed for glassfish 4.0 or not... What's the plan for the resolution of this bug?
          Hide
          markokanala added a comment -

          Has anyone tried if static weaving at the remote and calling side is a workaround ?

          see http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving

          Show
          markokanala added a comment - Has anyone tried if static weaving at the remote and calling side is a workaround ? see http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving
          Hide
          dmitriy.balakin added a comment -

          I use eclipselink-staticweave-maven-plugin as a workaround.

          Show
          dmitriy.balakin added a comment - I use eclipselink-staticweave-maven-plugin as a workaround.

            People

            • Assignee:
              Harshad Vilekar
              Reporter:
              netricsoft
            • Votes:
              22 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

              • Created:
                Updated: