Upgrade jmix 2.45 to 2.5 - Error

When I tried to run my project y get this error message.

Execution failed for task ‘:compileJava’.

javassist.NotFoundException: io.jmix.data.entity.ReferenceToEntity

I find that in persistence.xml file is referenced. I want to know is that my problem, and how I fixed it?

There is a note about this in the documentation: What’s New :: Jmix Documentation

io.jmix.data.entity.ReferenceToEntity embeddable entity has been removed. If you need it in your project, create your own copy.

Where I make the copy. I get this error message when I open the java file.

image

Unfortunately, I cannot understand all your actions before receiving the error.

But you can take the code of this entity from github (jmix/jmix-audit/audit/src/main/java/io/jmix/audit/entity/ReferenceToEntity.java at 09e7a5865fc305f0fc4382d509f582b79f1945fa · jmix-framework/jmix · GitHub)

And put in your project saving the package name.

When we updated our application from Cuba to Jmix, there was a similar situation with two BPM addon classes.
We copied them into our application.

2025-05-21_161341

Tanks for your help Andrey. I fix the problem.

1 Like