HbnContainer: NoSuchMethodError Exception

Hi All,

Please forgive the newbie question but how would I report bugs related to HbnContainer? Would this be done through Vaadin Trac or is there some other way to do this?

For the information of anyone else having the same trouble I’ll describe the issue and the workaround here.

Vaadin 6.7.4
HbnContainer 1.05
Hibernate 4.0.1

I am extending HbnContainer and implementing Container.Hierarchical for use with a Vaadin Tree. The table is being created in the database so Hibernate is working fine but I am experiencing the following exception from HbnContainer:

20-Jan-2012 1:43:53 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
java.lang.NoSuchMethodError: org.hibernate.metadata.ClassMetadata.getPropertyValue(Ljava/lang/Object;Ljava/lang/String;Lorg/hibernate/EntityMode;)Ljava/lang/Object;
	at com.vaadin.data.hbnutil.HbnContainer$EntityItem$EntityItemProperty.getValue(HbnContainer.java:294)
	...

HbnContainer is failing on the following line:

Object propertyValue = getClassMetadata().getPropertyValue(pojo, propertyName, EntityMode.POJO);

The javadoc for Hibernate 3.6 shows the following method signature:

getPropertyValue(Object object, String propertyName, EntityMode entityMode)

The javadoc for Hibernate 4.0 shows the following method signature:

getPropertyValue(Object object, String propertyName)

The issue appears to be that HbnContainer hasn’t been updated for use with Hibernate 4.0 yet so the workaround for now is to revert to Hibernate 3.6 until HbnContainer has been updated.

This is more of a dependency issue than a bug but I want to report it anyway because there is no indication that there is an incompatibility until this exception is encountered so if anyone can tell me how to report the issue it would be appreciated. Thanks.

Hi,

I think there is currently now issue tracker for that project, so I guess this is to best place. I currently have quite a little time for that project, so I don’t dare to promise update for Hbn 4. If you or somebody else is willing to do the update I can promise to upload new version to the directory. Also if somebody wants to take the “project lead”, I’d be more than happy to concentrate more on tasks where my expertise could be used better.

cheers,
matti