I have a simple entity:
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">
<!-- Generated Sep 13, 2012 7:33:16 PM by Hibernate Tools 3.2.4.GA -->
<hibernate-mapping>
<class name="ru.niifhm.bioinformatics.biodb.model.SeqsRunsFile" table="SEQS$RUNS_FILES" schema="MSDBA">
<id name="fileId" type="java.lang.Long">
<column name="FILE_ID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<property name="runId" type="java.lang.Long">
<column name="RUN_ID" precision="22" scale="0" not-null="true" />
</property>
<property name="isFixed" type="java.lang.Boolean">
<column name="IS_FIXED" precision="1" scale="0" not-null="true" />
</property>
<property name="isTrimmed" type="java.lang.Boolean">
<column name="IS_TRIMMED" precision="1" scale="0" not-null="true" />
</property>
</class>
</hibernate-mapping>
and simple code example:
Code:
package ru.niifhm.bioinformatics.biodb;
import org.hibernate.Session;
import ru.niifhm.bioinformatics.biodb.model.SeqsRunsFile;
public class Test {
public static void main(String[] args) {
SeqsRunsFile runsFile = new SeqsRunsFile();
runsFile.setRunId(51416228L);
runsFile.setFileId(51416187L);
runsFile.setIsFixed(true);
runsFile.setIsTrimmed(false);
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
session.save(runsFile);
session.flush();
session.getTransaction().commit();
System.out.println("__OK__");
}
}
And some result:
Code:
11 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
12 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
15 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
18 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
144 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
145 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
149 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsBioproject.hbm.xml
180 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsBioproject -> SEQS$BIOPROJECTS
191 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsFile.hbm.xml
212 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsFile -> SEQS$FILES
214 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsFileType.hbm.xml
228 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsFileType -> SEQS$FILE_TYPES
228 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsRun.hbm.xml
242 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsRun -> SEQS$RUNS
243 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsRunsFile.hbm.xml
255 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsRunsFile -> SEQS$RUNS_FILES
256 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsSample.hbm.xml
268 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsSample -> SEQS$SAMPLES
269 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : model/SeqsSequencer.hbm.xml
282 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: ru.niifhm.bioinformatics.biodb.model.SeqsSequencer -> SEQS$SEQUENCERS
282 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
324 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
324 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
324 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
382 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@biodb.ripcm.com:1521/biodb
382 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=msdba, password=****}
551 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
551 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 11.2.0.1.0
568 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
576 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
577 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
577 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
577 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
577 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
578 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
578 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
578 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
578 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
580 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
580 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
580 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
580 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
580 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
580 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
580 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
580 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
582 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
583 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
583 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
583 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
583 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
583 [main] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
607 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
741 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
Hibernate: insert into MSDBA.SEQS$RUNS_FILES (RUN_ID, IS_FIXED, IS_TRIMMED, FILE_ID) values (?, ?, ?, ?)
We will never see the output "__OK__" of System.out.println("__OK__"); statment, because the process is hanged. Is it normal ??