BasicPropertyAccessor « Exception « JPA Q&A





1. error BasicPropertyAccessor - expected type: java.lang.Strin    forum.hibernate.org

public class GuestLog { private java.lang.String rESNO ; private java.lang.Integer aGENTID ; public void setRESNO (java.lang.String _rESNO ) { this.rESNO = _rESNO; } public java.lang.String getRESNO () { return this.rESNO ; } public void setAGENTID (java.lang.Integer _aGENTID ) { this.aGENTID = _aGENTID; } public java.lang.Integer getAGENTID () { return this.aGENTID ; } }

2. [BasicPropertyAccessor] IllegalArgumentException in class:..    forum.hibernate.org

When I perform the following code and I get the IllegalArgumentException on the date field in my server.log (JBoss-4.0.2): ... InitialContext initCtx = new InitialContext(); SessionFactory sf = (SessionFactory) initCtx.lookup("java:/hibernate/SessionFactory"); Event theEvent = new Event(); theEvent.setTitle(title); theEvent.setDate(new Date() ); s.save(theEvent); s.close(); .... --------------------------------------------------------------------------------------- 17:54:48,778 ERROR [BasicPropertyAccessor] IllegalArgumentException in class: demo.Event, getter met hod of property: date 17:54:48,778 INFO [STDOUT] Caught Exception ...

3. ERROR BasicPropertyAccessor:167    forum.hibernate.org

Author Message jonthe Post subject: ERROR BasicPropertyAccessor:167 Posted: Tue Oct 10, 2006 12:00 pm Newbie Joined: Tue Oct 10, 2006 11:40 am Posts: 4 Hi. I have tried this namedQuery: Code: but when I try it I ...

4. BasicPropertyAccessor error: misleading?    forum.hibernate.org

I've figured out what the problem was. Long story short, I had two libraries (a jar and a war) on my classpath, each of which had their own copy of the persistent classes that I was mapping hibernate to. Apparently these duplicates somehow confused hibernate when BasicPropertyAccessor invoked the setId method on my class (it uses reflection looks like). And yes, ...