[1.5.x/Classic UI] "Unable to access value holder..."

I’m getting an odd runtime exception “Unable to access value holder for property” suddenly. This happens when saving from a fairly standard editor screen. And oddly, not in every case - I can create/save some instances of this entity from its editor screen just fine; others cause this exception. There isn’t a lot in the stack trace to go on; I need some help figuring out how to track this down and fix it.

The full trace:

com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:157) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:442) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:407) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:275) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:83) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1636) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:465) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) ~[javax.servlet-api-4.0.1.jar:4.0.1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at io.jmix.core.impl.logging.LogMdcFilter.doFilterInternal(LogMdcFilter.java:28) ~[jmix-core-1.5.4.jar:na]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:106) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:97) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:147) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) ~[spring-security-web-5.7.10.jar:5.7.10]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.29.jar:5.3.29]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.29.jar:5.3.29]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.29.jar:5.3.29]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1790) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.79.jar:9.0.79]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.GeneratedMethodAccessor268.invoke(Unknown Source) ~[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:568) ~[na:na]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	... 90 common frames omitted
Caused by: java.lang.RuntimeException: Unable to access value holder for property: carrier on entity com.medflex.medflexj.entity.RegistrationInsurance
	at io.jmix.eclipselink.impl.lazyloading.ValueHoldersSupport.getSingleValueHolder(ValueHoldersSupport.java:38) ~[jmix-eclipselink-1.5.4.jar:na]
	at io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder.replaceLoadOptions(AbstractValueHolder.java:348) ~[jmix-eclipselink-1.5.4.jar:na]
	at io.jmix.eclipselink.impl.lazyloading.AbstractSingleValueHolder$SingleValuePropertyVisitor.visit(AbstractSingleValueHolder.java:56) ~[jmix-eclipselink-1.5.4.jar:na]
	at io.jmix.core.MetadataTools.internalTraverseAttributes(MetadataTools.java:1255) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.core.MetadataTools.traverseAttributes(MetadataTools.java:991) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.eclipselink.impl.lazyloading.AbstractSingleValueHolder.afterLoadValue(AbstractSingleValueHolder.java:40) ~[jmix-eclipselink-1.5.4.jar:na]
	at io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder.getValue(AbstractValueHolder.java:278) ~[jmix-eclipselink-1.5.4.jar:na]
	at com.medflex.medflexj.entity.invoice.Invoice._persistence_get_responsibleInsurance(Invoice.java) ~[main/:na]
	at com.medflex.medflexj.entity.invoice.Invoice.getResponsibleInsurance(Invoice.java:585) ~[main/:na]
	at io.jmix.core.entity.BaseEntityEntry.getAttributeValue(BaseEntityEntry.java:85) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.core.entity.BaseEntityEntry.setAttributeValue(BaseEntityEntry.java:101) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.core.entity.EntityValues.setValue(EntityValues.java:89) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.setPropertyValue(DataContextImpl.java:349) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.setPropertyValue(DataContextImpl.java:343) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.mergeState(DataContextImpl.java:304) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.internalMerge(DataContextImpl.java:236) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.mergeState(DataContextImpl.java:319) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.internalMerge(DataContextImpl.java:236) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.merge(DataContextImpl.java:180) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.merge(DataContextImpl.java:191) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.mergeCommitted(DataContextImpl.java:786) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.model.impl.DataContextImpl.commit(DataContextImpl.java:659) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.screen.StandardEditor.lambda$commitChanges$9(StandardEditor.java:427) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.screen.StandardEditor.commitChanges(StandardEditor.java:456) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.screen.StandardEditor.closeWithCommit(StandardEditor.java:626) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.screen.StandardEditor.commitAndClose(StandardEditor.java:580) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.core.common.event.EventHub.publish(EventHub.java:170) ~[jmix-core-1.5.4.jar:na]
	at io.jmix.ui.action.BaseAction.actionPerform(BaseAction.java:220) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.component.impl.ButtonImpl.buttonClicked(ButtonImpl.java:75) ~[jmix-ui-1.5.4.jar:na]
	at io.jmix.ui.widget.JmixButton.fireClick(JmixButton.java:77) ~[jmix-ui-1.5.4.jar:na]
	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.14.3-4-jmix.jar:8.14.3-4-jmix]
	... 94 common frames omitted

The line in my code, Invoice.java line 585 is simply: RegistrationInsurance registrationInsurance = responsibleInsurance; - this is in the method getRegistrationInsurance - which used to be simply return registrationInsurance (a standard getter), but in an effort to fix this, I expanded the method to add the carrier property using fetchplan manipulation, but then the exception simply moves to the line accsessing the property.

I have no idea to where to even start with this one.

Something like this?

https://forum.jmix.io/t/runtimeexception-unable-to-access-value-holder-for-property-transient-property-since-jmix-1-3/2316

https://github.com/jmix-framework/jmix/issues/130

Not exactly the answer but it may help reading…

Hello Jon,

The best way to solve the issue - is to have some kind of reproducible example in order to debug the problem place, ehancing and value holder processing code.

If it is not possible, could you please, provide next information in order to start investigation of the issue:

  1. The definition of carrier attribute (type, annotation, etc.). Isn`t it a transient or method-based?
  2. Structure of entity graph that cause this problem during merge when screen closed.
  3. The exception thrown at the line accessing the property.
  4. List of fields and Interfaces for RegistrationInsurance.class in build/classes/java folder of the project. (Is it properly enhanced?)

Additionally, isn’t it a multi-module application with @MappedSuperclass in separate module without inheritors? It may also lead to similar problem.

Regards,
Dmitry