-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Problem Inserting
PostPosted: Tue May 24, 2005 6:23 am 
Newbie

Joined: Tue May 24, 2005 5:08 am
Posts: 6
Hi,
after many problems i think i´ve got all ok, but i´m trying to insert in my database (Oracle), i´ve got no errors but i can´t see the data inserted.

Any solutions?

the log i obtain:

12:17:44,258 INFO Environment:483 - Hibernate 2.1.8
12:17:44,258 INFO Environment:512 - hibernate.properties not found
12:17:44,258 INFO Environment:543 - using CGLIB reflection optimizer
12:17:44,273 INFO Environment:572 - using JDK 1.4 java.sql.Timestamp handling
12:17:44,273 INFO Configuration:909 - configuring from resource: /hibernate.cfg.xml
12:17:44,273 INFO Configuration:881 - Configuration resource: /hibernate.cfg.xml
12:17:44,664 INFO Configuration:332 - Mapping resource: src/beans/Per01t00.hbm.xml
12:17:44,774 INFO Binder:229 - Mapping class: src.beans.Per01t00 -> PER01T00
12:17:44,852 INFO Configuration:1067 - Configured SessionFactory: null
12:17:44,867 INFO Configuration:641 - processing one-to-many association mappings
12:17:44,867 INFO Configuration:650 - processing one-to-one association property references
12:17:44,867 INFO Configuration:675 - processing foreign key constraints
12:17:44,883 INFO Dialect:86 - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
12:17:44,899 INFO SettingsFactory:74 - Use outer join fetching: true
12:17:44,899 INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
12:17:44,899 INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 20
12:17:44,977 INFO DriverManagerConnectionProvider:77 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:Farmacia
12:17:44,977 INFO DriverManagerConnectionProvider:78 - connection properties: {user=FARMA00, password=FARMA00}
12:17:44,977 INFO TransactionFactoryFactory:31 - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
12:17:44,992 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
12:17:45,445 INFO SettingsFactory:114 - Use scrollable result sets: true
12:17:45,445 INFO SettingsFactory:117 - Use JDBC3 getGeneratedKeys(): false
12:17:45,445 INFO SettingsFactory:120 - Optimize cache for minimal puts: false
12:17:45,445 INFO SettingsFactory:126 - echoing all SQL to stdout
12:17:45,445 INFO SettingsFactory:129 - Query language substitutions: {}
12:17:45,445 INFO SettingsFactory:140 - cache provider: net.sf.hibernate.cache.EhCacheProvider
12:17:45,445 INFO Configuration:1130 - instantiating and configuring caches
12:17:45,461 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/hibernate-3.0/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
12:17:45,602 INFO SessionFactoryImpl:119 - building session factory
12:17:46,071 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
12:17:46,071 INFO Dialect:86 - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
12:17:46,071 INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
12:17:46,086 INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 20
12:17:46,086 INFO DriverManagerConnectionProvider:77 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:Farmacia
12:17:46,086 INFO DriverManagerConnectionProvider:78 - connection properties: {user=FARMA00, password=FARMA00}
12:17:46,086 INFO SchemaUpdate:102 - Running hbm2ddl schema update
12:17:46,086 INFO SchemaUpdate:112 - fetching database metadata
12:17:46,133 INFO SchemaUpdate:127 - updating schema
12:17:46,133 INFO Configuration:641 - processing one-to-many association mappings
12:17:46,133 INFO Configuration:650 - processing one-to-one association property references
12:17:46,133 INFO Configuration:675 - processing foreign key constraints
12:17:46,461 INFO TableMetadata:39 - table found: FARMA00.PER01T00
12:17:46,461 INFO TableMetadata:40 - columns: [seg11_numint_usu, mdn16_rol, per01_fec_mod_reg, per01_ni_persona, per01_fec_alt_reg, per01_obs, per01_fec_baja, mdn16_tipo_persona, seg04_entidad, per01_timestamp]
12:17:46,461 INFO TableMetadata:41 - foreign keys: [per01_seg04_fk, per01_mdn16_01_fk, per01_mdn16_02_fk, per01_seg11_fk]
12:17:46,461 INFO TableMetadata:42 - indexes: [per01t00_pk]
12:17:46,461 INFO SchemaUpdate:146 - schema update complete
12:17:46,477 INFO DriverManagerConnectionProvider:143 - cleaning up connection pool: jdbc:oracle:thin:@localhost:1521:Farmacia
Hibernate: insert into PER01T00 (SEG04_ENTIDAD, MDN16_ROL, MDN16_TIPO_PERSONA, PER01_OBS, PER01_FEC_BAJA, PER01_TIMESTAMP, SEG11_NUMINT_USU, PER01_FEC_ALT_REG, PER01_FEC_MOD_REG, PER01_NI_PERSONA) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


Thanks for all...


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 7:26 am 
Newbie

Joined: Mon Apr 04, 2005 6:01 am
Posts: 9
Location: INDIA
Hi

Have you called

session.flush() after the session.create();

session.flush() is the one who is going to commit the changes to the database.

Regards
RamnathN


Top
 Profile  
 
 Post subject: problem inserting
PostPosted: Tue May 24, 2005 7:52 am 
Newbie

Joined: Tue May 24, 2005 5:08 am
Posts: 6
Yes thanks.

i´ve called:

session.save(Persona);
session.flush();
session.close();

I´ve probed updating and listing and all is ok!!

but inserting no.

thanks to all.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.