Hi.
I have created a new entity CustomFileDescriptor which has its parent class set to sys$filedescriptor.
I have then created another entity CustomFilesTest that has a one-to-one composition column to the CustomFileDescriptor entity.
I created standard browse and edit screens for a view on CustomFilesTest.
When I try to upload a file I get the following error.
I do have a custom FileStorageAPI implementation based on the AWS code in CUBA. This has been working fine on standard FileDescriptors and appears to be working now and the error comes after uploading the file actually happens.
I’m basically trying to see if there is a way to get additional data to the FileStorageAPI implementation via a CustomFileDescriptor but I may be on the wrong track.
Perhaps DynamicAttributes might be an option.
Does anyone know why I’m getting the error?
com.vaadin.data.util.converter.Converter$ConversionException: Unable to convert value of type com.haulmont.cuba.core.entity.FileDescriptor to model type class com.company.filecloudpoc.entity.CustomFileDescriptor. No converter is set and the types are not compatible.
at com.vaadin.data.util.converter.ConverterUtil.convertToModel(ConverterUtil.java:180)
at com.vaadin.ui.AbstractField.convertToModel(AbstractField.java:810)
at com.vaadin.ui.AbstractField.convertToModel(AbstractField.java:790)
at com.vaadin.ui.AbstractField.setValue(AbstractField.java:564)
at com.vaadin.ui.AbstractField.setValueIgnoreReadOnly(AbstractField.java:479)
at com.haulmont.cuba.web.gui.components.WebAbstractField.setValue(WebAbstractField.java:244)
at com.haulmont.cuba.web.gui.components.WebFileUploadField.saveFile(WebFileUploadField.java:155)
at com.haulmont.cuba.web.gui.components.WebFileUploadField.lambda$initUploadButton$982e378a$1(WebFileUploadField.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
at com.haulmont.cuba.web.toolkit.ui.CubaFileUpload.fireUploadSuccess(CubaFileUpload.java:484)
at com.haulmont.cuba.web.toolkit.ui.CubaFileUpload$1.fileUploaded(CubaFileUpload.java:72)