I used the development tool MyEclipse5.5.1. Instead of using the Hibernate tool of MyEclipse to automatically generate object classes, I wrote the hibernater configuration file manually. Unfortunately, an error occurs when Hibernate Reverse Engineering is used to generate an object class.
Select the Browse button after JAVA src Folder to bring up a gray dialog box. As shown in:
So I made a DEMO and used the myeclipse tool to automatically add the hibernate package. After careful comparison, I found that. there is a problem with the project file. In the final natures, there is no red line of code in the file I created myself. I added this line of code to my new project, this problem is solved.
<Natures>
<Nature> com. genuitec. eclipse. hibernate. hibernatenature </nature>
<Nature> com. genuitec. eclipse. ast. deploy. core. deploymentnature </nature>
<Nature> com. genuitec. eclipse. j2eedt. core. webnature </nature>
<Nature> org. eclipse. jdt. core. javanature </nature>
</Natures>