Errors in views post upgrade to 6.8.0

Post upgrade I am not able to login (will create separate issue) and facing following error in logs:

Caused by: com.haulmont.cuba.core.global.DevelopmentException: View bpm$ProcInstance/ definition error: property entityId doesn't exists
at com.haulmont.cuba.core.sys.AbstractViewRepository.loadView(AbstractViewRepository.java:557) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.loadView(AbstractViewRepository.java:620) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.deployView(AbstractViewRepository.java:461) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.init(AbstractViewRepository.java:109) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.checkInitialized(AbstractViewRepository.java:81) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.findView(AbstractViewRepository.java:223) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.getView(AbstractViewRepository.java:195) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.global.LoadContext.setView(LoadContext.java:150) ~[cuba-global-6.8.0.jar:6.8.0]
at com.leapmile.qikpod.pds.repository.CrudRepository.getByPropertyContext(CrudRepository.java:211) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.CrudRepository.findAllByProperties(CrudRepository.java:143) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository.getAllByStates(ParcelRepository.java:74) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository.getAllByState(ParcelRepository.java:67) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository$$FastClassBySpringCGLIB$$3ec38150.invoke(<generated>) ~[na:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]

Funny thing is the view name mentioned above ‘bpm$ProcInstance’ is a system view and I cant edit that. I have not included stack trace with my code lines above but the place from where its thrown is not even fetching proc instance, not sure why is it failing.

Thanks

Are you sure that none of your project entities has a field of ‘ProcInstance’ type which is included into the view? Like this:

<view class="com.company.entity.MyEntity" name="myView">
     <property name="procIntance">
           <property name="entityId"/>
     </property>
</view>

Yes I am sure. 2 views had it which I fixed up. Even Intellij was showing errors in views.xml for entityId and now its not showing any issues. However upon server start I am getting the above error in logs.

Please check that you don’t have jars of previous platform release in your tomcat. Or even better drop the tomcat. You can do it with the dropTomcat gradle command

I dropped tomcat and I think that helped me move 1 step further. Now the error mentioned in topic description is gone but I am facing following:

Caused by: com.haulmont.cuba.core.global.DevelopmentException: No ancestor view found: proctask-list for pds$ExtProcTask
at com.haulmont.cuba.core.sys.AbstractViewRepository.getAncestorView(AbstractViewRepository.java:534) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.deployView(AbstractViewRepository.java:454) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.init(AbstractViewRepository.java:109) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.checkInitialized(AbstractViewRepository.java:81) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.findView(AbstractViewRepository.java:223) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.sys.AbstractViewRepository.getView(AbstractViewRepository.java:195) ~[cuba-global-6.8.0.jar:6.8.0]
at com.haulmont.cuba.core.global.LoadContext.setView(LoadContext.java:150) ~[cuba-global-6.8.0.jar:6.8.0]
at com.leapmile.qikpod.pds.repository.CrudRepository.getByPropertyContext(CrudRepository.java:211) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.CrudRepository.findAllByProperties(CrudRepository.java:143) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository.getAllByStates(ParcelRepository.java:74) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository.getAllByState(ParcelRepository.java:67) ~[app-core-0.1-SNAPSHOT.jar:na]
at com.leapmile.qikpod.pds.repository.ParcelRepository$$FastClassBySpringCGLIB$$3ec38150.invoke() ~[na:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
at com.leapmile.qikpod.pds.repository.ParcelRepository$$EnhancerBySpringCGLIB$$8888d2de.getAllByState() ~[na:na]
at com.leapmile.qikpod.pds.cron.ProcessParcelJobBean.run(ProcessParcelJobBean.java:63) ~[app-core-0.1-SNAPSHOT.jar:na]

I have view proctask-list in Studio but not able to open it because of issue:
https://www.cuba-platform.com/discuss/t/error-in-studio-in-opening-some-views-post-upgrade-to-6-8-0/3528

Also, shouldn’t upgrade itself clean tomcat as well. Because if this is required to be done manually I am not sure how I will do this in production. I use uberjar to deploy it to production btw.

Thanks

As far as I know, Studio undeploys the previous platform version artifacts from the tomcat automatically when you migrate to a new minor version. The same for uberjar, you don’t need to do any additional steps - just change the version and build a new jar file.

As for the view, do any of your views extend the “proctask-list”?

1 Like

I indeed had 2 views with name ‘proctask-list’, 1 on entity ProcTask and 1 on entity ExtProcTask (my extended version of ProcTask) and later extending former. Not sure if 2 views with same name should be allowed as it was working like that before 6.8.0 and IntelliJ was not giving any errors as well.

However I removed 1 of them and now extending _minimal in the other view and everything works fine now.

Thanks for pointing the right issue and prompt response