Recovering Taggable gives exception

I add Taggable addon and did everything as in this example. When im trying to recover Taggable Records with “Recover Deleted Records” screen it gives me Exception (When choosing Taggable class):

com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method select in com.vaadin.shared.data.selection.SelectionServerRpc
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:157) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) ~[cuba-web-7.2.4.jar:7.2.4]
at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) ~[cuba-web-7.2.4.jar:7.2.4]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) ~[cuba-web-7.2.4.jar:7.2.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:9.0.27]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[catalina.jar:9.0.27]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.27]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) ~[catalina.jar:9.0.27]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.27]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.27]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-coyote.jar:9.0.27]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:9.0.27]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-coyote.jar:9.0.27]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-coyote.jar:9.0.27]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.27]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.27]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
… 38 common frames omitted
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method selectionChange in com.vaadin.ui.ComboBox$$Lambda$773/0x0000000800d6b440 failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:516) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1041) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.ui.AbstractSingleSelect.setSelectedItem(AbstractSingleSelect.java:358) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at com.vaadin.ui.AbstractSingleSelect$1.select(AbstractSingleSelect.java:291) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
… 43 common frames omitted
Caused by: java.lang.IllegalArgumentException: MetaClass not found for interface com.haulmont.cuba.core.entity.Entity
at com.haulmont.cuba.core.sys.CachingMetadataSession.getClassNN(CachingMetadataSession.java:81) ~[cuba-global-7.2.4.jar:7.2.4]
at com.haulmont.cuba.core.sys.MetadataImpl.getClassNN(MetadataImpl.java:345) ~[cuba-global-7.2.4.jar:7.2.4]
at com.haulmont.cuba.core.sys.AbstractViewRepository.getView(AbstractViewRepository.java:167) ~[cuba-global-7.2.4.jar:7.2.4]
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.buildView(EntityRestore.java:242) ~[cuba-gui-7.2.4.jar:7.2.4]
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.buildLayout(EntityRestore.java:165) ~[cuba-gui-7.2.4.jar:7.2.4]
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.lambda$init$0(EntityRestore.java:78) ~[cuba-gui-7.2.4.jar:7.2.4]
at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.4.jar:7.2.4]
at com.haulmont.cuba.web.gui.components.WebAbstractComponent.publish(WebAbstractComponent.java:100) ~[cuba-web-7.2.4.jar:7.2.4]
at com.haulmont.cuba.web.gui.components.WebAbstractValueComponent.componentValueChanged(WebAbstractValueComponent.java:152) ~[cuba-web-7.2.4.jar:7.2.4]
at com.haulmont.cuba.web.gui.components.WebV8AbstractField.lambda$attachValueChangeListener$ab1c93c8$1(WebV8AbstractField.java:144) ~[cuba-web-7.2.4.jar:7.2.4]
at com.vaadin.ui.ComboBox.lambda$addValueChangeListener$bddd7469$1(ComboBox.java:825) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:496) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
… 48 common frames omitted

Is there any solution to this?

Hi,
Can you share a Demo Project and a screencast to show what you did in particular?

Im not sure I really understand what you mean.

Cheers
Mario

The easiest way is to copy the example, run it, in Top Menu go to Administration -> Restore Deleted Entities -> choose Persistent Tagging -> Unexpected error

image

Ok, I See. Most likely this is related to the entity-soft-reference addon, which is used by taggable.

Can you share the complete stacktrace. I think the one you shared is not containing the root cause.

As a quick fix I would suggest you remove the attributes deleteTs from the rows in DB. This will do the same thing. The problem is that JPA is involved here…

Cheers
Mario

In my question I provided stacktrace from catalina.out. Thats all I have. If u need stacktrace from screenshot

java.lang.IllegalArgumentException: MetaClass not found for interface com.haulmont.cuba.core.entity.Entity
at com.haulmont.cuba.core.sys.CachingMetadataSession.getClassNN(CachingMetadataSession.java:81)
at com.haulmont.cuba.core.sys.MetadataImpl.getClassNN(MetadataImpl.java:345)
at com.haulmont.cuba.core.sys.AbstractViewRepository.getView(AbstractViewRepository.java:167)
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.buildView(EntityRestore.java:242)
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.buildLayout(EntityRestore.java:165)
at com.haulmont.cuba.gui.app.core.restore.EntityRestore.lambda$init$0(EntityRestore.java:78)
at com.haulmont.bali.events.EventHub.publish(EventHub.java:170)
at com.haulmont.cuba.web.gui.components.WebAbstractComponent.publish(WebAbstractComponent.java:100)
at com.haulmont.cuba.web.gui.components.WebAbstractValueComponent.componentValueChanged(WebAbstractValueComponent.java:152)
at com.haulmont.cuba.web.gui.components.WebV8AbstractField.lambda$attachValueChangeListener$ab1c93c8$1(WebV8AbstractField.java:144)
at com.vaadin.ui.ComboBox.lambda$addValueChangeListener$bddd7469$1(ComboBox.java:825)
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:567)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:496)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1041)
at com.vaadin.ui.AbstractSingleSelect.setSelectedItem(AbstractSingleSelect.java:358)
at com.vaadin.ui.AbstractSingleSelect$1.select(AbstractSingleSelect.java:291)
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:567)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:835)