Hi, I have installed Hibernate 3.3.1 and struts 1.2 into Eclipse Galileo through j boss from the following site- http://download.jboss.org/jbosstools/updates/stable/galileo/. I can create struts project through the plugin ,but i cannot create hibernate project using the hibernate plugin which i have mentioned above... If i try to create hibernate project in hibernate perspective it allows me to create only configuration files like cfg.xml and hbm.xml but not the classes or packages... Can any one help me in this regard... Thanks in advance...
Does the tool claim that classes and packages can be created using it.
May be it is meant to create only configuration files.
By classes do you mean Hibernate EnityClasses or general DataAccess Layer Code.
If you are not laughing at yourself, then you just didn't get the joke.
Sir their is no text document about the plugin, where i can get the information about the hibernate whether it can create only the configuration files or classes... About the classes you have asked, if I select the hibernate perspective it allows me to create only the configuration files and no other options are available... So how can i resolve this issue.... Thanks in advance..
Is their any other option other than using netbeans to create a hibernate project... I dont think so that we cannot create a hibernate project in eclipse... I guess I have not installed the plugin properly or else their is some settings that i have to make in eclipse in order to create a hibernate project... Can you let me know is their any settings that are required for me to create a hibernate project... Thanks in advance...
not really, jboss plugin for eclipse doexnot have the option to create a hibernate project, however like you said it has enough features to make the job easy (like build congfig files & mapping files) .. but thats about it.. you'd have to write the rest of the code yourself..
There are Eclipse plug-ins from JBoss that might make development easier. The below steps will help you
In the Eclipse workbench, pull down the Help menu, choose Install New Software....
Click Add, in Name: type "Hibernate" then entre the update site URL:
http://download.jboss.org/jbosstools/updates/stable/galileo/ Click the triangle next to Web and Java EE Development, then click the Hibernate Tools box.
Click Next and proceed as for any other Eclipse plug-in.
This adds a Hibernate item to some menus like Window -> Show View -> Hibernate with options to generate configuration and mapping files, etc. and Window -> Preferences -> HQL Editor.
So, you can get the Hibernate tools to generate hibernate.cfg.xml as well as any class-mapping file.
I have done the steps which you have said and I have installed all the plugins... I can create both hibernate configuration file(cfg.xml) and hibernate mapping file(hbm.xml) in hibernate prespective, but i cannot create a simple POJO class or a java class where I can create a session and perform few database operations like adding or deleting the database items.. My doubt is how to create pojo classes and both the xml files... Do I have to create the POJO classes in java prespective and then change the prespective to hibernate for creating both the xml files...
Thanks for all your replies.....
Thanks in advance for the next posts...
To me it seems to be a simple and straight forward task.
Can you tell me where you are stuck? May be you are missing some jars or not in right eclipse perspective.
"but i cannot create a simple POJO class or a java class where I can create a session and perform few database operations like adding or deleting the database items.."
-- If you are looking for Data access layer code and DAOs, then you can try some tools like this.
Joined: Apr 15, 2011
hibernatepojoge link provides an Yourkit Java Profiler which can be used to create POJO.