Questions tagged [hibernate.cfg.xml]

hibernate.cfg.xml is the name of the default config file used by Hibernate.

The file usually contains the list of Hibernate mapping files (HBM) for objects that Hibernate persists. It also contains properties that control the behavior of Hibernate.

83 questions
3
votes
1 answer

Grails ignores hibernate.cfg.xml

Actually I deployed my grails application on two tomcat instances. Now I ran into a problem. My Quartz Job needs to be clustered. I read the plugin documentation and found a possibility to cluster the Quartz jobs in combination with the…
Fabian
  • 775
  • 2
  • 8
  • 18
3
votes
2 answers

Hibernate Tools - Not able to add configuration - dom4j connection Timedout -

I created a small project in my company today. In Hibernate Perspective I try to add new configuration so that I can create entities easily from db tables which have several columns. But when I select my project, it gives me…
abhihello123
  • 1,668
  • 1
  • 22
  • 38
3
votes
1 answer

hibernate configuration file and SessionFactory

I am struggling at the moment to find out why I get this error messages. I'm using hibernate for the first time so that I could have configured something wrong. IMO it could be one of this 3 problems. My hibernate.cfg.xml file is at the wrong…
3
votes
3 answers

Hibernate with JPA, connection time very slow

I have a project where I would like to use Hibernate for database access. In the application, the JPA api is used. The persistence.xml file is this
3
votes
6 answers
3
votes
1 answer

Am I configuring Hibernate hibernate.cfg.xml file correctly?

I am using Hibernate (4.2.3) in a project for the first time. I am trying to get it to connect to an H2 embedded (local) DB and have the h2-1.3.173.jar on the classpath as well as all the Hibernate JARs. I'm getting some disturbing error messages…
user1768830
2
votes
1 answer

How to connect to Oracle 12c PDB using Hibernate

I have created a sample Oracle 12c PDB (Pluggable Data Base) using the instructions from here. How do I connect to this pluggable database using Hibernate application? I am using a sample Hibernate application from here I changed the…
pikaraider
  • 187
  • 1
  • 14
2
votes
2 answers

Oracle11g+hibernate 4.2 buildSessionFactory throws Nullpointer exception

I am trying to use Hibernate 4.2 with Oracle 11g. Following is my hibernate.cfg.xml file:
2
votes
2 answers

Use Hibernate as a library

I have a jar library that have some class with persistence annotations. I need no hibernate.cfg.xml in my jar library so I create hibernate.cfg.xml in destination project that import jar .I guess this hibernate.cfg.xml use configuration file like…
ltt
  • 113
  • 1
  • 5
2
votes
2 answers

Configure NHibernate hibernate.cfg.xml file to have more connection strings

My client asked the posibility to switch from a c# app from the "CURRENT" database to a TEST database or DEV database. Only one can be active at a time. In a menu file she choose DEV or TEST database. How do I configure hibernate.cfg.xml file to…
Dan Nick
  • 132
  • 1
  • 2
  • 12
2
votes
0 answers

IReport + Hibernate Datasource set specific NamingStrategy in cfg.xml

I'm using IReport 4.5.1 and HQL for querying database. So I define an hibernate.cfg.xml, put its root folder and required *.jar files to IReport's classpath. The problem arises when I want to use my own Naming Strategy. It simply converts…
1
vote
2 answers

how to change driver class in HIbernate Configuration file (cfg.xml)

I am trying to create a my first hibernate application in these application by using hibernate tool i am trying to create cfg.xml file but in these file Driver class is "org.gjt.mm.mysql.Driver" itis coming default for MYSQL 5 but while doing…
Pranali
  • 105
  • 3
  • 13
1
vote
1 answer

Eclipse + Hibernate + windows xp to win 7

I have an eclipse installed at windows xp and everything works fine. My project is GWT with gilead hibernate and the database is oracle. When i decided to work from home, i just copied the entire eclipse to my flash memory with my workspace to my…
majd obeid
  • 111
  • 2
  • 6
1
vote
0 answers

Eclipse Indigo didn't find log4j.xml and hibernate.cfg.xml

I'm using Eclipse indigo (3.7) I added a hibernate config file and a logger config file, under "src" folder. The application run but when I try to open the server connection I get: log4j: Trying to find [log4j.xml] using context classloader …
Nicolas400
  • 563
  • 1
  • 7
  • 29
1
vote
1 answer