File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Databases
»
Object Relational Mapping
Author
Not Store data in oracle db
bala kumar
Greenhorn
Joined: Sep 13, 2007
Posts: 10
posted
Sep 16, 2007 23:47:00
0
My code ran in without any error, but data doesnt store in oracle db.
my table mapping code
===================
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="events.Event" table="EVENTS">
<id name="id" type="long" column="ID">
<generator class="assigned"/>
</id>
<property name="title" column="TITLE" type="string"/>
</class>
</hibernate-mapping>
hibernate.cfg.xml
====================
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">
jdbc
racle:thin:@172.16.1.26:1521
evdb</property>
<property name="connection.username">test_admin</property>
<property name="connection.password">test_admin</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">10</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update</property>
<mapping resource="Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17231
1
I like...
posted
Sep 17, 2007 08:57:00
0
OK, so you are saying you no longer get the Connection exception you were getting before?
So then what is the code that you have that opens the session, starts a transation, tries the insert, commits the transaction and closes the session?
Mark
Perfect World Programming, LLC
-
Two Laptop Bag
-
Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Not Store data in oracle db
Similar Threads
Hibernate Oracle problem
Hibernate Maping error
using multiple datasources in hibernate app
Parsing Exception - Hibernate
query on Hibernate
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter