I have a program that is giving this error

class org.hibernate.metamodel.mapping.internal.BasicAttributeMapping cannot be cast to class org.hibernate.sql.ast.tree.from.TableGroupJoinProducer

What are the possible solutions that I can start doing to find the error?
I can’t share the code because it belongs to the company where I intern
and I couldn’t find anything related to this error on Google.

Try to copy the model and query to a separate project and remove one by one, fields that seem irrelevant while ensuring the problem is still reproducible. Finally, just rename the model classes to something that has nothing to do with your business and voila, you have a minimal reproducer that has nothing to do with your company code :wink: