users@glassfish.java.net

ValidationException: The getter method does not have a corresponding setter

From: <glassfish_at_javadesktop.org>
Date: Fri, 15 Jan 2010 06:32:57 PST

I have an web app that works just fine in GF V3 Prelude in NB 6.8. When I use GF V3 Final with same webapp I get the following exception during deployment of the WebApp via NB Run action:

[code]
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [xx-persistence-unit] failed.
Internal Exception: Exception [EclipseLink-7174] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The getter method [method isReturnComposedObjects] on entity class [class xxx.ResponseOptionType] does not have a corresponding setter method defined.
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:117)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
[/code]

The class in question has the following property and setter and getter methods:

[code]
    @XmlAttribute
    protected Boolean returnComposedObjects;

    @Basic
    @Column(name = "RETURNCOMPOSEDOBJECTS")
    public boolean isReturnComposedObjects() {
        if (returnComposedObjects == null) {
            return false;
        } else {
            return returnComposedObjects;
        }
    }

    /**
     * Sets the value of the returnComposedObjects property.
     *
     * @param value
     * allowed object is
     * {_at_link Boolean }
     *
     */
    public void setReturnComposedObjects(Boolean value) {
        this.returnComposedObjects = value;
    }

[/code]

What is wrong and why does it work in V3 Prelude and not in V3 final? How can I fix it for V3 final. TIA for your help.
[Message sent by forum member 'najmi' (farrukh_at_wellfleetsoftware.com)]

http://forums.java.net/jive/thread.jspa?messageID=381180