Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Hibernate 3.0rc1
Mapping documents:
<?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>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.igate.iquest.dataaccess.MListvalue"
table="M_LISTVALUE"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="M_LISTVALUE"
</meta>
<id
name="nodeId"
type="java.math.BigDecimal"
column="NODE_ID"
>
<meta attribute="field-description">
@hibernate.id
generator-class="assigned"
type="java.math.BigDecimal"
column="NODE_ID"
</meta>
<generator class="assigned" />
</id>
<property
name="CValue"
type="java.lang.String"
column="C_VALUE"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_VALUE"
length="4000"
</meta>
</property>
<property
name="CDisplayvalue"
type="java.lang.String"
column="C_DISPLAYVALUE"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DISPLAYVALUE"
length="4000"
</meta>
</property>
<property
name="CIsdefault"
type="java.lang.String"
column="C_ISDEFAULT"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_ISDEFAULT"
length="4000"
</meta>
</property>
<property
name="CShoworder"
type="java.lang.String"
column="C_SHOWORDER"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_SHOWORDER"
length="4000"
</meta>
</property>
<property
name="CIscustomizable"
type="java.lang.String"
column="C_ISCUSTOMIZABLE"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_ISCUSTOMIZABLE"
length="4000"
</meta>
</property>
<property
name="CCreationDate"
type="java.lang.String"
column="C_CREATION_DATE"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_CREATION_DATE"
length="4000"
</meta>
</property>
<property
name="CModifiedDate"
type="java.lang.String"
column="C_MODIFIED_DATE"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_MODIFIED_DATE"
length="4000"
</meta>
</property>
<property
name="CDummy1"
type="java.lang.String"
column="C_DUMMY1"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY1"
length="4000"
</meta>
</property>
<property
name="CDummy2"
type="java.lang.String"
column="C_DUMMY2"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY2"
length="4000"
</meta>
</property>
<property
name="CDummy3"
type="java.lang.String"
column="C_DUMMY3"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY3"
length="4000"
</meta>
</property>
<property
name="CDummy4"
type="java.lang.String"
column="C_DUMMY4"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY4"
length="4000"
</meta>
</property>
<property
name="CDummy5"
type="java.lang.String"
column="C_DUMMY5"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY5"
length="4000"
</meta>
</property>
<property
name="CDummy6"
type="java.lang.String"
column="C_DUMMY6"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY6"
length="4000"
</meta>
</property>
<property
name="CDummy7"
type="java.lang.String"
column="C_DUMMY7"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY7"
length="4000"
</meta>
</property>
<property
name="CDummy8"
type="java.lang.String"
column="C_DUMMY8"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY8"
length="4000"
</meta>
</property>
<property
name="CDummy9"
type="java.lang.String"
column="C_DUMMY9"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY9"
length="4000"
</meta>
</property>
<property
name="CDummy10"
type="java.lang.String"
column="C_DUMMY10"
length="4000"
>
<meta attribute="field-description">
@hibernate.property
column="C_DUMMY10"
length="4000"
</meta>
</property>
<!-- Associations -->
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
I am using HibernateUtil session factory
Class c = Class.forName("MListvalue");
Object obj = c.newInstance();
String fieldN[] = {"nodeId", "CValue", "CDisplayvalue","CIsdefault", "CShoworder"};
Class[][] argType = new Class[][] {{java.math.BigDecimal.class},
{String.class}, {String.class},{String.class},{String.class}};
long nodeId = 76767675;
Object[][] argValue = new Object[][] { {new java.math.BigDecimal(nodeId)},
{"test1"}, {"test2"},{"test3"},{"test4"}};
for(int i=0; i<fieldN.length; i++)
{
callMethod(obj, fieldN[i], argType[i], argValue[i]);
}
HibernateUtil.beginTransaction();
session.save(obj);
Full stack trace of any exception that occurs:
No exception.
Name and version of the database you are using:
Oracle 9
The generated SQL (show_sql=true):
No SQL statements shown on the console.
Debug level Hibernate log excerpt:
16:39:38,503 INFO Environment:456 - Hibernate 3.0rc1
16:39:38,519 INFO Environment:474 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.c3p0.acquire_increment=1, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.c3p0.idle_test_period=100, hibernate.show_sql=true, hibernate.c3p0.max_statements=0, hibernate.c3p0.timeout=0, hibernate.transaction.flush_before_completion=true, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=4, hibernate.c3p0.min_size=10, hibernate.connection.username=iquest_new, hibernate.transaction.auto_close_session=true, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.c3p0.max_size=100, hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider, hibernate.cglib.use_reflection_optimizer=true, hibernate.order_updates=false, hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@192.168.210.109:1521:EIPTEST1}
16:39:38,519 INFO Environment:501 - using java.io streams to persist binary types
16:39:38,519 INFO Environment:502 - using CGLIB reflection optimizer
16:39:38,535 INFO Environment:532 - using JDK 1.4 java.sql.Timestamp handling
16:39:38,535 INFO Configuration:1228 - configuring from resource: /hibernate.cfg.xml
16:39:38,535 INFO Configuration:1199 - Configuration resource: /hibernate.cfg.xml
16:39:41,831 INFO Configuration:439 - Mapping resource: com/igate/iquest/dataaccess/MListvalue.hbm.xml
16:39:41,847 INFO HbmBinder:256 - Mapping class: com.igate.iquest.dataaccess.MListvalue -> M_LISTVALUE
16:39:42,300 INFO Configuration:1340 - Configured SessionFactory: null
16:39:42,300 INFO Configuration:844 - processing extends queue
16:39:42,300 INFO Configuration:848 - processing collection mappings
16:39:42,300 INFO Configuration:857 - processing association property references
16:39:42,300 INFO Configuration:884 - processing foreign key constraints
16:39:42,675 INFO Dialect:89 - Using dialect: org.hibernate.dialect.Oracle9Dialect
16:39:42,691 INFO SettingsFactory:87 - Maximum outer join fetch depth: 4
16:39:42,691 INFO SettingsFactory:90 - Default batch fetch size: 1
16:39:42,691 INFO SettingsFactory:94 - Generate SQL with comments: disabled
16:39:42,691 INFO SettingsFactory:98 - Order SQL updates by primary key: disabled
16:39:42,691 INFO SettingsFactory:273 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:39:42,691 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
16:39:42,691 INFO SettingsFactory:106 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
16:39:42,691 INFO ConnectionProviderFactory:53 - Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
16:39:42,706 INFO C3P0ConnectionProvider:50 - C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@192.168.210.109:1521:EIPTEST1
16:39:42,706 INFO C3P0ConnectionProvider:51 - Connection properties: {user=iquest_new, password=****}
16:39:42,706 INFO C3P0ConnectionProvider:54 - autocommit mode: false
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@b60b93 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@10d593e [ acquireIncrement -> 1, autoCommitOnClose -> false, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, idleConnectionTestPeriod -> 100, initialPoolSize -> 10, maxIdleTime -> 0, maxPoolSize -> 100, maxStatements -> 0, minPoolSize -> 10, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@1b1fbf4 [ description -> null, driverClass -> null, factoryClassLocation -> null, jdbcUrl -> jdbc:oracle:thin:@192.168.210.109:1521:EIPTEST1, properties -> {user=iquest_new, password=iquest_new123} ] , propertyCycle -> 300, testConnectionOnCheckout -> false ] , factoryClassLocation -> null, numHelperThreads -> 3 ]
16:39:43,550 INFO SettingsFactory:148 - JDBC batch size: 15
16:39:43,550 INFO SettingsFactory:151 - JDBC batch updates for versioned data: enabled
16:39:43,550 INFO SettingsFactory:156 - Scrollable result sets: enabled
16:39:43,550 INFO SettingsFactory:164 - JDBC3 getGeneratedKeys(): disabled
16:39:43,550 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
16:39:43,550 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:39:43,550 INFO SettingsFactory:176 - Automatic flush during beforeCompletion(): enabled
16:39:43,566 INFO SettingsFactory:179 - Automatic session close at end of transaction: enabled
16:39:43,566 INFO SettingsFactory:260 - Cache provider: org.hibernate.cache.HashtableCacheProvider
16:39:43,566 INFO SettingsFactory:187 - Second-level cache: enabled
16:39:43,566 INFO SettingsFactory:192 - Optimize cache for minimal puts: disabled
16:39:43,566 INFO SettingsFactory:196 - Cache region prefix: hibernate.test
16:39:43,566 INFO SettingsFactory:199 - Structured second-level cache entries: enabled
16:39:43,566 INFO SettingsFactory:203 - Query cache: disabled
16:39:43,566 INFO SettingsFactory:210 - Echoing all SQL to stdout
16:39:43,566 INFO SettingsFactory:214 - Statistics: disabled
16:39:43,566 INFO SettingsFactory:218 - Deleted entity synthetic identifier rollback: disabled
16:39:43,566 INFO SettingsFactory:232 - Default entity-mode: pojo
16:39:43,706 INFO SessionFactoryImpl:140 - building session factory
16:39:53,378 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
16:39:53,378 INFO SessionFactoryImpl:366 - Checking 0 named queries
Static Block - Initialization