persistence@glassfish.java.net

RE: ValueHolder

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Mon, 24 Sep 2007 11:48:10 -0400

Can you describe your environment? Is the Invoice class new at this point has it been fetched from an EntityManager? Is the Persistence Unit injected or created by the application? Are there any other exceptions during deployment? Have you changed any jars in the server? Have you added any 3rd party library jars to the application?
--Gordon
  -----Original Message-----
  From: bdraba.merge.com.pl [mailto:b.draba_at_merge.com.pl]
  Sent: Monday, September 24, 2007 5:53 AM
  To: persistence_at_glassfish.dev.java.net
  Subject: ValueHolder


  Hi

  I'm using Glassfish V2 and when i try to set value in my entity object i got the following Exception
  Caused by: java.lang.NoSuchMethodError: pl.merge.spedition.commons.entities.Invoice._toplink_setplace(Lpl/merge/spedition/commons/entities/dictionaries/Group;)V

  at pl.merge.spedition.commons.entities.Invoice.setPlace(Invoice.java:353)

  at pl.merge.spedition.server.dbsynchronize.internal.test.Test.test(Test.java:25)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:585)

  at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)

  at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)

  at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)

  at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)

  My entity class look like this:

  @Entity
  @Table(name = "ord_invoices")
  @SequenceGenerator(name = "orders_invoice_sequence", sequenceName = "ord_invoice_id_seq")
  public class Invoice implements Serializable {

   //
   private static final long serialVersionUID = -2031641431677550789L;

   @Id
   @GeneratedValue(generator = "orders_invoice_sequence", strategy = GenerationType.SEQUENCE)
   private long id;

   @ManyToOne
   private Group place;

   public Invoice() {
    super();
   }

   public long getId() {
    return id;
   }

   public void setId(long id) {
    this.id = id;
   }

   public Group getPlace() {
    return place;
   }

   public void setPlace(Group place) {
    this.place = place;
   }

  }


  Does anybody help me what is the cause of this exception?

  Thank you