Issue Details (XML | Word | Printable)

Key: GLASSFISH-16164
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Harshad Vilekar
Reporter: netricsoft
Votes: 21
Watchers: 22

If you were logged in you would be able to see more operations.

eclipselink.weaving breaks marshalling out of the box

Created: 05/Mar/11 10:10 PM   Updated: 08/Mar/13 10:10 AM
Component/s: entity-persistence
Affects Version/s: 3.1_b43
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive (41 kB) 08/Mar/11 12:02 PM - netricsoft


Windows 7 and Mac OS X

Issue Links:

Tags: 3_1-next 3_1_1-scrubbed 3_1_2-exclude corba eclipselink orb-review
Participants: chrispy, dmitriy.balakin, eldiegos, Harshad Vilekar, jimmysklim, jthoennes, kombatkuehn, marina vatkina, markokanala, Mitesh Meswani, netricsoft, scatari and vins4java

 Description  « Hide

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.

dmitriy.balakin added a comment - 08/Mar/13 10:10 AM

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

markokanala added a comment - 07/Mar/13 09:18 PM

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


vins4java added a comment - 26/Feb/13 06:04 PM

I agree with eldiegos. I found this bug up to lastest 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?

eldiegos added a comment - 24/Sep/12 10:03 PM

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.


chrispy added a comment - 14/Sep/12 07:12 AM

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

kombatkuehn added a comment - 27/Apr/12 01:24 PM

This issue still exists in 3.1.2 (build 23).

jthoennes added a comment - 22/Mar/12 09:27 AM

Any plans when this will be corrected?

jimmysklim added a comment - 13/Dec/11 06:16 AM

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

Mitesh Meswani added a comment - 20/Oct/11 01:33 AM

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

scatari added a comment - 27/Jun/11 12:14 AM

Targeting for next release after 3.1.1.

Mitesh Meswani added a comment - 07/Apr/11 05:31 PM


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 added a comment - 14/Mar/11 12:39 PM - 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

netricsoft added a comment - 14/Mar/11 12:35 PM

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


netricsoft added a comment - 08/Mar/11 12:02 PM - edited

Here is a video illustrating issue:

(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, '' );

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:
<property name="eclipselink.weaving" value="false"/>

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



Mitesh Meswani added a comment - 07/Mar/11 06:11 PM

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

marina vatkina added a comment - 07/Mar/11 02:46 PM

let's start with JPA