Auto Hibernate metamodel generation
I am trying to configure STS to auto-generate Hibernate metamodel classes. I go to the project properties then to Java Compiler then Annotation Processing and enable annotation processing with "target/model" as the generated source directory. Then I went to the Factory Path tab and entered the jars hibernate-jpamodelgen-1.1.1.Final.jar and hibernate-jpa-2.0-api-1.0.0.Final jar. When I hit O.K. the STS prompted me to rebuild the project to which I responded yes. The folder target/metamodel appeared, but it was empty. There were no error messages on the build.
I am using STS 3.1.0. Am I missing a step?
Thank you
Auto Hibernate metamodel generation
Quote:
Originally Posted by
Martin Lippert
Hey!
Sorry for the delay... Do you still have this problem or did you solve it in the meantime? I never did this metamodel class generation myself, so I am afraid I cannot help you here directly, but I would take a look at the Hibernate support forums, there seem to be some topics around this metamodel generation. Sorry for not being more helpful here...
-Martin
Thanks for replying Martin. Unfortunately, my pc did a Bios upgrade and now won't boot up. Thanks Toshiba. I have to send it in for repair. There was a code update to the chapter on GitHub, but I have not had a chance to try it since my machine is dead. Luckily, I used Acronis for nightly backups, so as soon as I get it back, I should be able to restore it fairly quickly! Then I'll give it another try. You may have notice the other problem I was having with STS was that generation of a Spring MVC template project would not work. Once generated, you should be able to run it on the VMware tc server and see a hello world page. You get a 404 although all the required files are generated. You also get a lot of server errors, though the server does start. I downloaded Eclipse, then installed STS and Maven and tried it within Eclipse and it worked fine.
Mike