You need to properly declare a datatype class, e.g.: ComplexPojoTypeDatatype implements Datatype<ComplexPojoType>
etc.
Jmix cannot recognise your class as a datatype and considers it as an entity, which leads to the error.
You can check out the docs on custom types here:
Also you can look for solution in previous forum topics, for example: