users@glassfish.java.net

Glassfish-v3 will not run app that runs OK on Glassfish v2

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Oct 2010 05:01:58 PDT

Hi! We have an app running on Glassfish 2.1 (9.1.1). Porting it to Glassfish-v3 throws on deployment.

Does org.eclipse.persistence understand annotations on get/set methods, embedded fields? Do we have to restructure/rewrite the app to go to GF-v3?
Or can anybody suggest a "quick fix"?


 (See attachment for more log):

SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [Webshop-ejbPU] failed.
Internal Exception: Exception [EclipseLink-7200] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.ValidationException
[b]Exception Description: The attribute [amount] was not found on the embeddable class [class net.bawtry.bcs.entities.MoneyC]. It is referenced in an attribute override for the embedded attribute [price] on class [class net.bawtry.webshop.entities.ProductPrice].[/b]
 
Class: [i]ProductPrice[/i] includes this declaration:

                                        @Embedded
                                        @AttributeOverrides(
                                          {_at_AttributeOverride(name="amount", column=_at_Column(name="priceAmount")),
                                           @AttributeOverride(name="currencyCode", column=_at_Column(name="priceCurrency"))
                                        })
  private MoneyC price;


Class: [i]MoneyC[/i] annotates property get/set methods


  @Column(nullable = false)
  @Override
  protected BigDecimal getAmount() {
    return this.amount;
  }
  @Override
  protected void setAmount(BigDecimal amount) {
    this.amount = amount.abs();
  }
[Message sent by forum member 'joerobbins']

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