Hi all, my employer has been taken over from a different company. I have to program a new version of my project, and in this new version, the name of the old employer must not be seen anywhere. So I changed also the package paths of my Java classes from “com.oldemployer...
” to “com.newemployer...
” . That also affected some enums I am using. Some of these enums are also saved as runtime variables of the Camunda process instance. When I now start my new application with the old database contents, I get some ClassCastExceptions for those enums.
So I modified the contents of the Camunda table act_ru_variable
: I changed the entry in the column text2_
from the old to the new package path. But that was obviously not enough. Now I get this exception:
Caused by: java.lang.ClassNotFoundException: com.oldemployer.MyEnumeration
at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[?:?]
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:398) ~[?:?]
at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:88) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.variable.serializer.JavaObjectSerializer$ClassloaderAwareObjectInputStream.resolveClass(JavaObjectSerializer.java:96) ~[camunda-engine-7.12.0.jar:7.12.0]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1995) ~[?:?]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1862) ~[?:?]
at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:2121) ~[?:?]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1673) ~[?:?]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:493) ~[?:?]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:451) ~[?:?]
at org.camunda.bpm.engine.impl.variable.serializer.JavaObjectSerializer.deserializeFromByteArray(JavaObjectSerializer.java:59) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.variable.serializer.AbstractObjectValueSerializer.deserializeFromByteArray(AbstractObjectValueSerializer.java:113) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer.readValue(AbstractSerializableValueSerializer.java:83) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer.readValue(AbstractSerializableValueSerializer.java:31) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.persistence.entity.util.TypedValueField.getTypedValue(TypedValueField.java:96) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.getTypedValue(VariableInstanceEntity.java:269) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.getValueFromVariableInstance(AbstractVariableScope.java:146) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.getVariable(AbstractVariableScope.java:133) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.getVariable(AbstractVariableScope.java:129) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.el.VariableScopeElResolver.getValue(VariableScopeElResolver.java:70) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.javax.el.CompositeELResolver.getValue(CompositeELResolver.java:231) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:81) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.AstBinary$SimpleOperator.eval(AstBinary.java:27) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.AstBinary.eval(AstBinary.java:106) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:40) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) ~[camunda-engine-7.12.0.jar:7.12.0]
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:60) ~[camunda-engine-7.12.0.jar:7.12.0]
The old package path seems still to be residing inside of a Camunda table. What else do I need to do for this migration?
Many Thanks in advance,
Christian