UUID exception when create Process instance at BPM

Hi, when creating a process instance an exception is raised when i select Entity Id from create process instance screen. The entity is a Long type Id, but has the attribute “HasUUID” set.

java.lang.IllegalArgumentException: You have attempted to set a value of type class java.util.UUID for parameter entityId with expected type of class java.lang.Long from query string select e from caerp$Clientes e where e.id = :entityId.
	at org.eclipse.persistence.internal.jpa.QueryImpl.setParameterInternal(QueryImpl.java:937)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:594)
	at com.haulmont.cuba.core.sys.QueryImpl$Param.apply(QueryImpl.java:655)
	at com.haulmont.cuba.core.sys.QueryImpl.getQuery(QueryImpl.java:145)
	at com.haulmont.cuba.core.sys.QueryImpl.getSingleResult(QueryImpl.java:334)
	at com.haulmont.cuba.core.app.RdbmsStore.executeQuery(RdbmsStore.java:690)
	at com.haulmont.cuba.core.app.RdbmsStore.load(RdbmsStore.java:136)
	at com.haulmont.cuba.core.app.DataManagerBean.load(DataManagerBean.java:68)
	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.haulmont.cuba.core.app.DataManagerBean$SecureDataManagerInvocationHandler.invoke(DataManagerBean.java:362)
	at com.sun.proxy.$Proxy341.load(Unknown Source)
	at com.haulmont.cuba.core.app.DataServiceBean.load(DataServiceBean.java:46)
	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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:117)
	at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy249.load(Unknown Source)
	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.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:148)
	at com.sun.proxy.$Proxy32.load(Unknown Source)
	at com.haulmont.cuba.client.sys.DataManagerClientImpl.load(DataManagerClientImpl.java:47)
	at com.haulmont.bpm.gui.procinstance.ProcInstanceEdit.findEntity(ProcInstanceEdit.java:280)
	at com.haulmont.bpm.gui.procinstance.ProcInstanceEdit.initOpenEntityBtn(ProcInstanceEdit.java:257)
	at com.haulmont.bpm.gui.procinstance.ProcInstanceEdit$3.lambda$generateField$0(ProcInstanceEdit.java:247)
	at com.haulmont.bali.events.EventRouter.fireEvent(EventRouter.java:45)
	at com.haulmont.cuba.web.gui.components.WebAbstractField.lambda$attachListener$6f56ebaa$1(WebAbstractField.java:321)
	at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
	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)
	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.AbstractField.fireValueChange(AbstractField.java:1178)
	at com.vaadin.ui.AbstractField.setValue(AbstractField.java:579)
	at com.vaadin.ui.AbstractField.setValueIgnoreReadOnly(AbstractField.java:458)
	at com.haulmont.cuba.web.gui.components.WebAbstractField.setValue(WebAbstractField.java:234)
	at com.haulmont.cuba.web.gui.components.WebPickerField.setValue(WebPickerField.java:143)
	at com.haulmont.cuba.gui.components.PickerField$LookupAction.handleLookupWindowSelection(PickerField.java:409)
	at com.haulmont.cuba.gui.components.SelectAction.actionPerform(SelectAction.java:54)
	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)

image

Hi,
take a look at this topic: IllegalArgumentException when trying to init the procActionsFrame with a BaseStringIdEntity entity reference

1 Like