Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfetched attribute error if editor view is narrower than browser view #2797

Closed
alexbudarov opened this issue Apr 1, 2020 · 0 comments
Closed
Assignees
Labels
state: fixed Fixed by the developer type: bug Something isn't working ver: 7.2.5 Fixed in version ver: 7.3.0 Fixed in version
Milestone

Comments

@alexbudarov
Copy link
Member

alexbudarov commented Apr 1, 2020

Environment

Description of the bug or enhancement

Looks like "Reload updated entity before setting to browser's datasource if view of the editor is narrower than view of the browser" https://youtrack.haulmont.com/issue/PL-3817 ticket has not been implemented in the new screen API.

Card browser displays Card.deck.author nested association.
Card editor doesn't load this attribute in its view.

  • open Cards browser
  • edit any card and click OK
  • you get exception:
Click to expand
java.lang.IllegalStateException: Cannot get unfetched attribute [author] from detached object com.company.unfetched.entity.Deck-facef036-9aee-1ce3-9103-6cea247ef23a [detached].
	at org.eclipse.persistence.internal.queries.EntityFetchGroup.onUnfetchedAttribute(EntityFetchGroup.java:100)
	at com.haulmont.cuba.core.sys.persistence.CubaEntityFetchGroup.onUnfetchedAttribute(CubaEntityFetchGroup.java:74)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.processUnfetchedAttribute(EntityManagerImpl.java:2998)
	at com.haulmont.chile.core.model.impl.AbstractInstance._persistence_checkFetched(AbstractInstance.java)
	at com.company.unfetched.entity.Deck._persistence_get_author(Deck.java)
	at com.company.unfetched.entity.Deck.getAuthor(Deck.java:25)
	at com.haulmont.chile.core.model.impl.AbstractInstance.getValue(AbstractInstance.java:108)
	at com.haulmont.cuba.core.entity.BaseGenericIdEntity.getValue(BaseGenericIdEntity.java:146)
	at com.haulmont.chile.core.model.utils.InstanceUtils.getValueEx(InstanceUtils.java:159)
	at com.haulmont.chile.core.model.utils.InstanceUtils.getValueEx(InstanceUtils.java:138)
	at com.haulmont.chile.core.model.impl.AbstractInstance.getValueEx(AbstractInstance.java:172)
	at com.haulmont.cuba.gui.components.data.table.ContainerTableItems.getItemValue(ContainerTableItems.java:135)
	at com.haulmont.cuba.web.gui.components.table.TableItemWrapper.getPropertyValue(TableItemWrapper.java:74)
	at com.haulmont.cuba.web.gui.components.table.TableItemPropertyWrapper.getValue(TableItemPropertyWrapper.java:34)
	at com.haulmont.cuba.web.gui.components.WebAbstractTable.formatCellValue(WebAbstractTable.java:1162)
	at com.haulmont.cuba.web.widgets.CubaTable.formatPropertyValue(CubaTable.java:354)
	at com.haulmont.cuba.web.widgets.CubaTable.getPropertyValue(CubaTable.java:270)
	at com.vaadin.v7.ui.Table.parseItemIdToCells(Table.java:2355)
	at com.vaadin.v7.ui.Table.getVisibleCellsNoCache(Table.java:2203)
	at com.vaadin.v7.ui.Table.refreshRenderedCells(Table.java:1746)
	at com.haulmont.cuba.web.widgets.CubaGroupTable.refreshRenderedCells(CubaGroupTable.java:751)
	at com.vaadin.v7.ui.Table.refreshRowCache(Table.java:2654)
	at com.haulmont.cuba.web.widgets.CubaTable.refreshRowCache(CubaTable.java:1128)
	at com.vaadin.v7.ui.Table.containerItemSetChange(Table.java:4556)
	at com.haulmont.cuba.web.gui.components.table.TableDataContainer.fireItemSetChanged(TableDataContainer.java:165)
	at com.haulmont.cuba.web.gui.components.table.TableDataContainer.datasourceItemSetChanged(TableDataContainer.java:278)
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170)
	at com.haulmont.cuba.gui.components.data.table.ContainerTableItems.containerCollectionChanged(ContainerTableItems.java:93)
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170)
	at com.haulmont.cuba.gui.model.impl.CollectionContainerImpl.fireCollectionChanged(CollectionContainerImpl.java:199)
	at com.haulmont.cuba.gui.model.impl.CollectionContainerImpl.replaceItem(CollectionContainerImpl.java:156)
	at com.haulmont.cuba.gui.builders.EditorBuilderProcessor.lambda$buildEditor$0(EditorBuilderProcessor.java:121)
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170)
	at com.haulmont.cuba.gui.screen.Screen.fireEvent(Screen.java:128)
	at com.haulmont.cuba.gui.screen.Screen.close(Screen.java:343)
	at com.haulmont.cuba.gui.screen.StandardEditor.lambda$closeWithCommit$6(StandardEditor.java:588)
	at com.haulmont.cuba.gui.util.SuccessOperationResult.compose(SuccessOperationResult.java:39)
	at com.haulmont.cuba.gui.screen.StandardEditor.closeWithCommit(StandardEditor.java:588)
	at com.haulmont.cuba.gui.screen.StandardEditor.commitAndClose(StandardEditor.java:553)
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170)
	at com.haulmont.cuba.gui.components.actions.BaseAction.actionPerform(BaseAction.java:222)
	at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67)
	at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76)
	at com.vaadin.ui.Button$1.click(Button.java:57)
	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.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
@knstvk knstvk self-assigned this Apr 2, 2020
@knstvk knstvk added the type: bug Something isn't working label Apr 2, 2020
@knstvk knstvk added this to the Release 7.2 milestone Apr 2, 2020
@knstvk knstvk changed the title Unfetched attribute error if editor view is narrower than browser view - again? Unfetched attribute error if editor view is narrower than browser view Apr 2, 2020
@haulmont-git haulmont-git added the ver: 7.2.5 Fixed in version label Jun 3, 2020
@haulmont-git haulmont-git added the ver: 7.3.0 Fixed in version label Jun 3, 2020
@natfirst natfirst self-assigned this Jun 3, 2020
@natfirst natfirst added the state: fixed Fixed by the developer label Jun 3, 2020
@natfirst natfirst closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: fixed Fixed by the developer type: bug Something isn't working ver: 7.2.5 Fixed in version ver: 7.3.0 Fixed in version
Projects
None yet
Development

No branches or pull requests

4 participants