-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.lang.NoSuchMethodError after instrumenting entity
PostPosted: Thu May 07, 2009 12:13 pm 
Newbie

Joined: Mon Jul 26, 2004 2:19 pm
Posts: 6
Hibernate Core : 3.3.0.SP1
Hibernate Annotations: 3.4.0.GA
Hibernate Commons Annotation 3.1.0GA
Javaassist: 3.4 GA

Hi,

I am trying to instrument an entity with javaassit InstrumentTask for the following given entity
Code:
@Entity
class ABC extends CommonBusinessObject
{
...
   @Basic(fetch = FetchType.LAZY)
    public java.sql.Timestamp getHistoryDate() // overrides method implementation from super class
    {
        return historyDate;
    }

   @javax.persistence.Embedded
   @javax.persistence.Basic(fetch = FetchType.LAZY)
   @org.hibernate.annotations.Target(DocumentBO.class)
   public Document getDocument()
   {
      return this.document;
   }
   public void setDocument(final Document docIn) {
      this.document = docIn;
   }
...
}

When I try to access the "historyDate" property of a loaded object I run into the following exception

java.lang.NoSuchMethodError: ABC.$javassist_read_historyDate()Ljava/sql/Timestamp
ABC.getHistoryDate(RatingPDEstimationBO.java:68)
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 org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
at ABC_$$_javassist_16.getHistoryDate(RatingPDEstimationBO_$$_javassist_16.java)

There is got to be some squirk in there.
Is there a possible conflict with overridded methods which do not get properly instrumented ???? Furthermode the setter method for the "historyDate" property is inherited from the super class.

Any help will be gratefully appreciated.
Many thanx in advance.

regards
dokmatik


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.