Can't find getter for Property abc at class xyz

Hi,

I get the following error when trying to open the edit screen for an Entity “ScheduleUnit”.
This entity has two composition Entities, “TravelRoute” and “OtherFee”, both displayed as tables in the edit screen of ScheduleUnit, set up as nested Datasources.

" Can’t find getter for property ‘paymentType’ at class com.company.tojm.entity.TravelRoute"

What puzzles me is that I have no “paymentType” property in my TravelRoute entity…
What could be happening?

Steps to reproduce:

  1. Create a new ScheduleUnit (itself a composition of an “Event entity”) from my “Event” browse screen.
  2. From the ScheduleUnit editor, enter property data
  3. Click save & close (ScheduleUnit editor)
  4. Re-open the same ScheduleUnit via edit action

14:33:44.556 ERROR com.haulmont.cuba.web.log.AppLog - Exception in com.haulmont.cuba.web.gui.components.WebTable$1:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method itemClick in com.haulmont.cuba.web.gui.components.WebAbstractTable$$Lambda$96/155377527 failed.
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
        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.vaadin.ui.Table.handleClickEvent(Table.java:3221)
        at com.vaadin.ui.Table.changeVariables(Table.java:2998)
        at com.haulmont.cuba.web.toolkit.ui.CubaTable.changeVariables(CubaTable.java:252)
        at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:634)
        at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:468)
        at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:418)
        at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
        at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
        at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.lambda$synchronizedHandleRequest$0(CubaVaadinServletService.java:314)
        at com.haulmont.cuba.web.sys.CubaVaadinServletService.withUserSession(CubaVaadinServletService.java:196)
        at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.synchronizedHandleRequest(CubaVaadinServletService.java:314)
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:384)
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
        at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.vaadin.ui.Table$CacheUpdateException: Error during Table cache update. Additional causes not shown.
        at com.vaadin.ui.Table.maybeThrowCacheUpdateExceptions(Table.java:1802)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1791)
        at com.vaadin.ui.Table.attach(Table.java:4373)
        at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:646)
        at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:713)
        at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:646)
        at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:713)
        at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:646)
        at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:713)
        at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:646)
        at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:713)
        at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:646)
        at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:713)
        at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:618)
        at com.vaadin.ui.Window.setParent(Window.java:173)
        at com.vaadin.ui.UI.attachWindow(UI.java:558)
        at com.vaadin.ui.UI.addWindow(UI.java:547)
        at com.haulmont.cuba.web.WebWindowManager.showWindowDialog(WebWindowManager.java:754)
        at com.haulmont.cuba.web.WebWindowManager.showWindow(WebWindowManager.java:382)
        at com.haulmont.cuba.gui.WindowManager.openEditor(WindowManager.java:727)
        at com.haulmont.cuba.web.WebWindowManager.openEditor(WebWindowManager.java:157)
        at com.haulmont.cuba.gui.components.WindowDelegate.openEditor(WindowDelegate.java:250)
        at com.haulmont.cuba.web.gui.WebWindow.openEditor(WebWindow.java:448)
        at com.haulmont.cuba.gui.components.actions.EditAction.internalOpenEditor(EditAction.java:232)
        at com.haulmont.cuba.gui.components.actions.EditAction.actionPerform(EditAction.java:225)
        at com.haulmont.cuba.web.gui.components.WebAbstractTable.handleClickAction(WebAbstractTable.java:780)
        at com.haulmont.cuba.web.gui.components.WebAbstractTable.lambda$initComponent$4fd149ee$1(WebAbstractTable.java:664)
        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)
        ... 46 more
Caused by: java.lang.IllegalArgumentException: Can't find getter for property 'paymentType' at class com.company.tojm.entity.TravelRoute
        at com.haulmont.chile.core.model.utils.MethodsCache.invokeGetter(MethodsCache.java:69)
        at com.haulmont.chile.core.model.impl.AbstractInstance.getValue(AbstractInstance.java:102)
        at com.haulmont.cuba.core.entity.BaseGenericIdEntity.getValue(BaseGenericIdEntity.java:151)
        at com.haulmont.chile.core.model.utils.InstanceUtils.getValueEx(InstanceUtils.java:139)
        at com.haulmont.cuba.web.gui.data.PropertyWrapper.getValue(PropertyWrapper.java:76)
        at com.haulmont.cuba.web.gui.components.WebAbstractTable$TablePropertyWrapper.getValue(WebAbstractTable.java:1966)
        at com.haulmont.cuba.web.gui.data.PropertyWrapper.getFormattedValue(PropertyWrapper.java:149)
        at com.haulmont.cuba.web.gui.components.WebAbstractTable$TablePropertyWrapper.getFormattedValue(WebAbstractTable.java:1952)
        at com.haulmont.cuba.web.toolkit.ui.CubaTable.formatPropertyValue(CubaTable.java:240)
        at com.haulmont.cuba.web.toolkit.ui.CubaTable.getPropertyValue(CubaTable.java:200)
        at com.vaadin.ui.Table.parseItemIdToCells(Table.java:2432)
        at com.vaadin.ui.Table.getVisibleCellsNoCache(Table.java:2282)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1780)
        ... 76 more

The problem seems to have been solved by doing the following (but I’m not sure it this is really what solved the issue).

In my ScheduleUnit Entity, I used to initialize the composition OtherFee Entity as new empty set.
I have removed this initialization (leaving OtherFee as null Set), and now I don’t have the problem.

What is puzzling is that the error was mentionning getter property for TravelRoute Entity, and not for OtherFee entity…

I spoke too quickly… the same error still appears.

Perhaps you forgot to attach a sample project.

Indeed, my apologies. Let me describe the steps to reproduce the issue.

  1. In the TOJM menu, select “Concert”.
  2. Create a new concert (any values)
  3. Select the new concert and click “Edit Schedule” button. This will open the schedule Editor
  4. In the Schedule Editor, click “New” action
  5. In the popup editor, select “Routes” tab
  6. Click Create action, and then check the “Overnight Stay” box, and enter an amount in the “Stay/Per Diem Amount”.
  7. Click save -> Click Save & Close -> Click Save & Close.

Get Error: IllegalArgumentException: Property ‘amount’ not found in tojm$TravelRoute

It seems that the properties called are being mixed up with that of another table in the “Expense” tab.
Please kindly take a look!

Regards,

tojm_0203.zip (1.8M)

Hi,

Thank you for your sample project.
I have tried the steps but have not seen any exceptions.

Do the problems persist if to restart the application?
It seems that you made some changes in Entities (properties were added or removed) and did not restart the server expecting the sources to be hot-deployed.

Sources in the global module are not hot-deployed so the specified exception might occur.

Also, try to re-deploy the application: stop the server, launch Run->Undeploy, start the server.

Hi, thanks for your help.

I am still unable to solve this issue. I have cleaned, undeployed, rebooted everything, deleted every build folder, etc… :slight_smile:

Here are additional steps that bring the error now:

  1. In the TOJM menu, select “Concert”.
  2. Create a new concert (any values)
  3. Select the new concert and click “Edit Schedule” button. This will open the schedule Editor
  4. In the Schedule Editor, click “New” action
  5. In the popup editor, select “Routes” tab
  6. Click Create action, and then check the “Overnight Stay” box, and enter an amount in the “Stay/Per Diem Amount” -> OK
  7. Now go the Other Payment tab, click create, and add anything -> Save and Close
  8. Close the “Unit Editor” dialog using “Save and Close”
  9. Now re-open the Unit you have just create using “Edit” button.

–> IllegalArgumentException: Can’t find getter for property ‘paymentType’ at class com.company.tojm.entity.TravelRoute

Apologies for the long steps and thanks for any help.
Regards,

Matthis

Couldn’t figure out what was going wrong in the end, so I just deleted the TravelRouteTable in the screen causing the error, and created a new one in place. Seems to have solved the problem.

Hi Matthis,

Assumably it is a bug. PaymenType - is a property of the OtherFee entity, but for some reason, the platform tries to get it while painting the table with TravelRoutes.

Probably, if to modify views for the Concerts browser, it could help.

We have created a YouTrack issue. The link is on the right. Thank you.

Hi Matthis,

Glad to announce you that the issue is fixed. The fix will be delivered with the next 6.4.2 platform release.

Great news, and impressive team speed!
Best regards

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8697