This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate@ oracle Express Edition (XE) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate@ oracle Express Edition (XE)" Watch "Hibernate@ oracle Express Edition (XE)" New topic

Hibernate@ oracle Express Edition (XE)

Gupta Saurabh

Joined: Dec 22, 2006
Posts: 4
Hibernate Mapping file is :

<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc racle:thin:@localhost:1521:xe</property>
<property name="hibernate.connection.username">SAURABH-PRACTICE</property>
<property name="hibernate.connection.password">sys123</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="">update</property>
<!-- Mapping files -->
<mapping resource="contact.hbm.xml"/>

I was trying to insert a simple data inside a table (Contact).

try {
SessionFactory sessionFactory = new Configuration().configure()
session = sessionFactory.openSession();
System.out.println("Inserting Record");
Contact contact = new Contact();
} catch (Exception e) {
} finally {

<<<<< Problem: It is going smoothly, but it is not inserting any data in the table and also not throwing any exception for the same. >>>>>>

Is there any problem with the OracleDialect?
should i use something else?

~Regards<br />Saurabh Gupta
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

No, you just need to get and begin a Transaction, then commit it.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Gupta Saurabh

Joined: Dec 22, 2006
Posts: 4
Thanks Mark.
I really appreciate that you have taken effort in answering the very simple question.
I agree. Here's the link:
subject: Hibernate@ oracle Express Edition (XE)
Similar Threads
NullPointerException on SessionFactory sessionFactory = new Configuration().configure().buildSession
Beginner in hibernate getting error : org.hibernate.MappingException: Unknown entity
Cannot insert record into Database!
NullPointerException in session.flush()
Problem with running my first Hibernate App