JPAContainer IllegalArgumentException

I’m getting an IllegalArgumentException thrown by the MetadataFactory class. I’m sure that I’m missing an annotation somewhere, but the error message is not useful. I was wondering if, in a future version, you could add the name of the class to the error message. Something like “The class com.abc.Person is neither an entity nor embeddable”. Also, neither is misspelled, not that is not a big deal.

Thanks.

Stack trace example of what I’m talking about:
java.lang.IllegalArgumentException: The class is nether an entity nor embeddable
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.getClassMetadata(MetadataFactory.java:167)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.extractPropertiesFromFields(MetadataFactory.java:246)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.loadProperties(MetadataFactory.java:187)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.loadProperties(MetadataFactory.java:183)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.getClassMetadata(MetadataFactory.java:139)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.extractPropertiesFromFields(MetadataFactory.java:252)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.loadProperties(MetadataFactory.java:187)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.loadProperties(MetadataFactory.java:183)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.getClassMetadata(MetadataFactory.java:139)
at com.vaadin.addon.jpacontainer.metadata.MetadataFactory.getEntityClassMetadata(MetadataFactory.java:91)
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.(LocalEntityProvider.java:100)
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.(LocalEntityProvider.java:86)
at com.vaadin.addon.jpacontainer.provider.MutableLocalEntityProvider.(MutableLocalEntityProvider.java:68)

Hi,

Lucky you. We just started a project to create next version of the add-on, so I threw it in right away:
http://dev.vaadin.com/changeset/21806

Otherwise I would have guided you to dev.vaadin.com to create a ticket about the issue.

Thanks!

cheers,
matti

Thanks Matti!

You guys are doing a great job. I really like Vaadin and the addons.