aspose file tools*
The moose likes Object Relational Mapping and the fly likes cannot create Hibernate project. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "cannot create Hibernate project." Watch "cannot create Hibernate project." New topic
Author

cannot create Hibernate project.

sudeep prasad
Greenhorn

Joined: Apr 05, 2011
Posts: 8

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...

$udeep
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513

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.
sudeep prasad
Greenhorn

Joined: Apr 05, 2011
Posts: 8

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..
Anantha Sharma
Ranch Hand

Joined: Sep 01, 2010
Posts: 43

jboss eclipse plugin does not have the feature to create a hibernate project, however you can use netbeans to create the project & then import it to eclipse...
sudeep prasad
Greenhorn

Joined: Apr 05, 2011
Posts: 8

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...
Anantha Sharma
Ranch Hand

Joined: Sep 01, 2010
Posts: 43

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..
Pooja lachake
Greenhorn

Joined: Apr 15, 2011
Posts: 4
Sudeep,

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.

Pooja lachake
Greenhorn

Joined: Apr 15, 2011
Posts: 4
Refer site http://www.javahotchocolate.com/tutorials/hibernate.html ..to know how to create POJO
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
While you can't create a "Hibernate" project, you can create a JPA project or add a JPA facet to an existing project.
sudeep prasad
Greenhorn

Joined: Apr 05, 2011
Posts: 8

pooja
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...
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513

Can you try these links?
hibernatepojoge
and
this wiki link.

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.
Pooja lachake
Greenhorn

Joined: Apr 15, 2011
Posts: 4
hibernatepojoge link provides an Yourkit Java Profiler which can be used to create POJO.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot create Hibernate project.