Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1093419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:49:29+00:00 2026-05-16T23:49:29+00:00

I have some basic questions: 1) How many xml files involved in JPA+Hibernate combination,

  • 0

I have some basic questions:

1) How many xml files involved in JPA+Hibernate combination, if JPA annotations were used? i am having just persistence.xml.

2) Is hibernate.cfg.xml needed, if i use JPA annotaions. Because, i didnt added it till now.

3) Shall anyone give me the list of basic JAR file names, in case of using JPA 2.0 & Hibernate!!!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:49:29+00:00Added an answer on May 16, 2026 at 11:49 pm

    1) How many xml files involved in
    JPA+Hibernate combination, if JPA
    annotations were used? i am having
    just persistence.xml.

    Usually this one file is enough, annotated entities will be automatically picked up through class path scanning. But you can define external mapping files (an example is available on this page). The mechanism is this:

    <persistence-unit name="xyz">
        <mapping-file>../orm.xml</mapping-file>
        <!-- ... -->
    </persistence-unit>
    

    2) Is hibernate.cfg.xml needed, if i
    use JPA annotaions. Because, i didnt
    added it till now.

    hibernate.cfg.xml is proprietary hibernate stuff and not needed for jpa.
    In JPA, you can use <properties> to configure vendor-specific properties. Example:

    <properties>
        <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
    </properties>
    

    See this document for Hibernate / JPA configuration

    3) Shall anyone give me the list of basic JAR file names, in case of using
    JPA 2.0 & Hibernate!!!

    you should use maven and add this dependency to your pom.xml:

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>3.5.6-Final</version>
    </dependency>
    

    (see this directory for the latest version, scan this file for the latest occurrence of *.*.*-Final or just read the Hibernate web site)

    You will also need to add the JBoss repository to the pom.xml or settings.xml:

    <repositories>
      <repository>
        <id>jboss-public-repository-group</id>
        <name>JBoss Public Repository Group</name>
        <url>http://repository.jboss.org/nexus/content/groups/public</url>
      </repository>
      ...
    </repositories>
    

    that will automatically add everything else that’s needed, see this previous answer for more details.

    If you don’t want to use maven, you can use the release bundles provided by sourceforge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just getting started with Visual Studio (2010 Beta) and have some basic questions
I have some basic questions around understanding fundamentals of Performance testing. I know that
I have some basic questions of calling a Fortran model from GAE. I uploaded
I'm working through the Stanford iPhone podcasts and have some basic questions. The first:
I am new to both GAE and PiCould, and have some basic questions when
Im new on Google Chrome Extensions coding, and i have some basic questions. I
I have some basic (stupid) questions about AWS EC2 instances or AMIs. I created
I have some basic questions related to the conversion of Web Service (.asmx) into
Good Afternoon, I have some very basic questions on GUI Event Handling. Firstly with
I have an SQL question which may be basic to some but is confusing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.