Get all updates of Java4s
Follow Us: Email Newsletter

Jars Required For Hibernate Annotations

Hibernate » On Aug 28, 2011 { 8 Comments } By Sivateja

For working with annotations in hibernate,  ensure our java version must be 1.5 or higher and we must use hibernate version 3.3 or higher, and in fact no need to use all the jar files to work with these annotations.

Following jar files are pretty much enough…

  • antlr-2.7.6.jar
  • commons-collections-3.1.jar
  • dom4j-1.6.1.jar
  • hibernate-commons-annotations-3.2.0.Final.jar
  • hibernate-core-3.6.7.Final.jar
  • hibernate-jpa-2.0-api-1.0.1.Final.jar
  • javassist.jar
  • jms-1.1.jar
  • jsr250-api-1.0.jar
  • jta-1.1.jar
  • log4j-1.2.16.jar
  • ojdbc14.jar
  • slf4j-api-1.6.1.jar
  • slf4j-log4j12-1.6.1.jar

Total 14 jar files we need to set in the class path to work with these annotations with hibernate framework, actually i found all these jar files  in hibernate 3.3 and 3.4 versions, download both versions and pick these jar files. Still we can eliminate few jar files out of 14 jars but let it be :-)

And one more thing is jar files name must be same as what i have given above, with any version.

Let us start the applications on these annotations from the next session.

And click here to
Download Hibernate Annotations Jar Files

You Might Also Like

  ♦ About Author ♦

Java4s_Author
sivateja@java4s.com
Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

8 Responses to “Jars Required For Hibernate Annotations”
  1. Antione Breman says:

    Thanks for helping out, good information.

  2. adiaieue says:

    thanks for info

  3. Java4s says:

    @Antione Breman,@adiaieue

    You welcome friends :-)

  4. Reddy says:

    Excellent material
    can you please explain why we are using annotations with hibernate?

  5. RAJ says:

    Thank you very much for providing this valuable information.

  6. Sreekanth says:

    Thnks you very much such a simple as well as easy to get.

  7. MAHINDRA says:

    Thank u vey much for providing this much of easy way. could u please put mcq website for this site and Interview Questions.

  8. shaheed jahagirdar says:

    Please help me i am getting this exception and i am using hibernate 5 jars.

    Exception in thread “main” org.hibernate.MappingException: Unknown entity: com.gontuseries.hibernate.Student_Info
    at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:776)
    at org.hibernate.internal.SessionImpl.getEntityPersister(SessionImpl.java:1533)
    at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:104)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
    at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
    at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
    at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:682)
    at org.hibernate.internal.SessionImpl.save(SessionImpl.java:674)
    at org.hibernate.internal.SessionImpl.save(SessionImpl.java:669)
    at com.gontuseries.hibernate.Main.main(Main.java:23)

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
Upcoming
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.