I was getting this error: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: OneToOne or
ManyToOne on com....channelCategory references an unknown entity: com....model.ChannelCategory
The problem was that I had forgotten to define @Entity for ChannelCategory!
Of course it can have other reasons such as not defining the entity to session factory.