embedded@glassfish.java.net

web service problems on Glassfish 3.1.2

From: <petrxn_at_centrum.cz>
Date: Tue, 26 Jun 2012 09:26:43 +0200

 
Hello
 I would like to ask you for an advice or a direction where to find some example about how to solve my problem. I have web service which is running smoothly on Glassfish 2.1.1. and I am trying to migrate to Glassfish 3.1.2, but the web service is not working there.
 
I am getting this error from server.log:
 

Stack:
Exception [EclipseLink-68] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The value of an aggregate in object […@c950b5] is null.  Null values not allowed for Aggregate mappings unless "Allow Null" is specified.
Mapping: org.eclipse.persistence.mappings.AggregateObjectMapping[popl]
Descriptor: RelationalDescriptor

[popl] from the next-to-last line of the exception is an Embedded parametr of an entity class.
I tried to google it and to set DescriptorCustomizer for the entity class with parametr Allow null as in short below
 
@Entity
@Table …
@Customizer(EntType.class)
public class EntType implements Serializable, DescriptorCustomizer {

@Embedded
  protected poplType popl ;

public void customize(ClassDescriptor descriptor) {
        ((AggregateObjectMapping)descriptor.getMappingForAttributeName("popl")).setIsNullAllowed(true);
    }
}
 
And it is still not working :(, can you help me with advice how to do it or where to find some example about this problem?
 
Thank You very much
With Regards Petr N