Bugs item #1047373, was opened at 2004-10-14 14:45
Message generated for change (Comment added) made by starksm
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1047373&group_id=22866

Category: Hibernate
Group: v4.0
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Tor-Einar Skog (treinar)
Assigned to: Steve Ebersole (steveebersole)
Summary: PropertyNotFoundException on runtime HAR deployment

Initial Comment:
OS: Linux 2.4.22-36mdkenterprise (i386)
JVM: 1.4.2_06-b03

I have a HAR archive, with one class: Pesticide.class
and its hibernate mapping file. Pesticide class has to
properties: id and name (with getter/setter methods). A
META-INF/hibernate-service.xml is also provided.

When deploying a HAR archive when JBoss runs, the
deployment fails. The following Exception is thrown:
net.sf.hibernate.PropertyNotFoundException: Could not
find a setter for property name in class
no.planteforsk.pvmdb.persistent.Pesticide

However, when JBoss is restarted, the HAR deploys fine. 

The Exception is thrown in
net.sf.hibernate.property.BasicPropertyAccessor, in the
method getSetter. The cause of the exception is that no
match between set method (setName) and property (name)
is found in method setterMethod.

I inserted a few debug outputs in
BasicPropertyAccessor, and it turns out that when the
HAR is deployed at runtime, the method setName in
Pesticide is wrongly assumed to take no parameters,
(methods[i].getParameterTypes().length returns 0). When
jboss is restarted, and the deployment takes place on
the same HAR file, setName is assumed to take 1
parameter, which of course is correct.

I'm not sure if this is a Java error or a JBoss error,
or even a Hibernate error, but maybe you do. It does
concern JBoss, however.

----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2004-11-19 19:49

Message:
Logged In: YES 
user_id=175228

Reopen with more details or an example.

----------------------------------------------------------------------

Comment By: Steve Ebersole (steveebersole)
Date: 2004-10-26 09:04

Message:
Logged In: YES 
user_id=525033

Unable to reproduce this issue running JDK 1.4.2_04 on a 
Windows XP box.  Have you tried running the bundle test 
case on your system?  It is 
\testsuite\src\main\org\jboss\test\hibernate\test\HibernateEjb
InterceptorUnitTestCase.java  See if that one works for you 
(it uses the hot deploy scenario).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1047373&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to