jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Generic Class with T extends from abstract MappedSuperclass cause error

Open anasoid opened this issue 3 years ago • 0 comments

When using generic class with attribute type is generic the subclass meta information on Jmix use the type declared on the parent class

The bug is reproduced on this branch (https://github.com/anasoid/jmix-jpa-odata-demo/tree/jmix/bug1)

The problem is on this class https://github.com/anasoid/jmix-jpa-odata-demo/blob/jmix/bug1/src/main/java/org/anasoid/jmixjpaodatademo/entity/catalog/ProductLocalized.java on the inherited attribute "item".

1- Start application 2- create product with english name 3- close product and reopen product then open translation the crash will be reproduced

image


org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' available at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:872) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) at io.jmix.core.impl.DataStoreFactory.lambda$get$1(DataStoreFactory.java:47) at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) at io.jmix.core.impl.DataStoreFactory.get(DataStoreFactory.java:46) at io.jmix.core.impl.UnconstrainedDataManagerImpl.load(UnconstrainedDataManagerImpl.java:92) at io.jmix.eclipselink.impl.lazyloading.SingleValueOwningPropertyHolder.loadValue(SingleValueOwningPropertyHolder.java:61) at io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder.getValue(AbstractValueHolder.java:275) at org.anasoid.jmixjpaodatademo.entity.i18n.Localized._persistence_get_item(Localized.java) at org.anasoid.jmixjpaodatademo.entity.i18n.Localized.getItem(Localized.java:45) at io.jmix.core.entity.BaseEntityEntry.getAttributeValue(BaseEntityEntry.java:85) at io.jmix.core.entity.EntityValues.getValue(EntityValues.java:100) at io.jmix.core.entity.EntityValues.getValueEx(EntityValues.java:131) at io.jmix.ui.component.data.value.ContainerValueSource.getValue(ContainerValueSource.java:158) at io.jmix.ui.component.data.value.ValueBinder$ValueBindingImpl.valueSourceStateChanged(ValueBinder.java:300) at io.jmix.core.common.event.EventHub.publish(EventHub.java:170) at io.jmix.ui.component.data.value.ContainerValueSource.setState(ContainerValueSource.java:220) at io.jmix.ui.component.data.value.ContainerValueSource.containerItemChanged(ContainerValueSource.java:227) at io.jmix.core.common.event.EventHub.publish(EventHub.java:170) at io.jmix.ui.model.impl.InstanceContainerImpl.fireItemChanged(InstanceContainerImpl.java:167) at io.jmix.ui.model.impl.InstanceContainerImpl.setItem(InstanceContainerImpl.java:100) at io.jmix.ui.model.impl.InstanceLoaderImpl.load(InstanceLoaderImpl.java:106) at io.jmix.ui.component.dataloadcoordinator.OnFrameOwnerEventLoadTrigger.load(OnFrameOwnerEventLoadTrigger.java:48) at io.jmix.ui.component.dataloadcoordinator.OnFrameOwnerEventLoadTrigger.lambda$new$0(OnFrameOwnerEventLoadTrigger.java:39) at io.jmix.core.common.event.EventHub.publish(EventHub.java:170) at io.jmix.ui.screen.Screen.fireEvent(Screen.java:124) at io.jmix.ui.screen.UiControllerUtils.fireEvent(UiControllerUtils.java:58) at io.jmix.ui.sys.ScreensImpl.fireScreenBeforeShowEvent(ScreensImpl.java:1364) at io.jmix.ui.sys.ScreensImpl.show(ScreensImpl.java:357) at io.jmix.ui.screen.Screen.show(Screen.java:306) at io.jmix.ui.action.list.EditAction.execute(EditAction.java:377) at io.jmix.ui.action.list.EditAction.actionPerform(EditAction.java:324) at io.jmix.ui.component.impl.AbstractTable.handleClickAction(AbstractTable.java:1384) at io.jmix.ui.component.impl.AbstractTable.lambda$initComponent$db766529$1(AbstractTable.java:1122) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:709) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:399) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:363) at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1216) at com.vaadin.v7.ui.Table.handleClickEvent(Table.java:3198) at com.vaadin.v7.ui.Table.changeVariables(Table.java:2988) at io.jmix.ui.widget.JmixTable.changeVariables(JmixTable.java:357) at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:616) at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:468) at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:411) at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:275) at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:83) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1636) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:465) at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

anasoid avatar May 18 '22 15:05 anasoid