Hello all!
I have noticed a new error while debugging my app that wasn’t there before and I am not quite sure what I have done! I have a form with the datasource of the form set to one of my entityitems (Either a new entityitem or existing depending if I am creating a new entity or editing an existing. One of the entityitems fields is a reference column to another entity. In my formfactory I have created a combobox and set the containerdatasource to my JPAContainer for that referenced entity. I have also overriden the getItemCaption() function to make the combobox items more human readable. This worked perfectly for a while, but now when I commit the form I get the following error:
Caused by: com.vaadin.data.Buffered$SourceException
at com.vaadin.ui.Form.commit(Form.java:365)
at com.vacom.client.ui.page.BillboardPage$ContractWindow$1.buttonClick(BillboardPage.java:1010)
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:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
... 35 more
Caused by: com.vaadin.data.Buffered$SourceException
at com.vaadin.ui.AbstractField.commit(AbstractField.java:246)
at com.vaadin.ui.Form.commit(Form.java:339)
... 41 more
Caused by: com.vaadin.data.Property$ConversionException: java.lang.NoSuchMethodException: com.vacom.client.model.LightingPlan.<init>(java.lang.String)
at com.vaadin.addon.jpacontainer.JPAContainerItem$ItemProperty.setValue(JPAContainerItem.java:247)
at com.vaadin.ui.AbstractField.commit(AbstractField.java:241)
... 42 more
Caused by: java.lang.NoSuchMethodException: com.vacom.client.model.LightingPlan.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at com.vaadin.addon.jpacontainer.JPAContainerItem$ItemProperty.setValue(JPAContainerItem.java:241)
... 43 more
I overrode the commit() function for the combobox to see what class the getValue() is and it is an Integer representing the item id for my container, so I am not sure why it is looking for a String constructor for that entity. I recently tried to use Vaadin 6.6.1, but ran into so many issues that I backtracked to 6.5.6. Like I said, it was initially working fine, but now I get this error. Any ideas?
Thanks,
Scott