Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot create Hibernate project.

 
sudeep prasad
Greenhorn
Posts: 8
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sudeep prasad
Greenhorn
Posts: 8
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer site http://www.javahotchocolate.com/tutorials/hibernate.html ..to know how to create POJO
 
Hauke Ingmar Schmidt
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hibernatepojoge link provides an Yourkit Java Profiler which can be used to create POJO.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic