-->
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.  [ 5 posts ] 
Author Message
 Post subject: could not deserialize
PostPosted: Wed Jan 10, 2007 3:35 am 
Newbie

Joined: Thu Jan 04, 2007 1:52 am
Posts: 6
Hi I am using

Hibernate 3.2 Beta,IDE is Eclipse Version: 3.2.1.
DB2 8.1 is the database


This is the generated SQL query
Hibernate: select tcsr0_.SIGNATURE as SIGNATURE1_from CUTEST.TCSRP tcsr0_ where tcsr0_.USERID='A234'



In my Hbm i am using composte id with 2 key valued..

But i am getting this exception.


org.hibernate.type.SerializationException: could not deserialize
could not deserialize
org.hibernate.type.SerializationException: could not deserialize
could not deserialize
org.hibernate.type.SerializationException: could not deserialize
at com.slfc.cu.home.TcsrpTest.main(TcsrpTest.java:58)
Caused by: java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)
at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:240)
at org.hibernate.type.SerializableType.fromBytes(SerializableType.java:78)
at org.hibernate.type.SerializableType.get(SerializableType.java:39)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
at org.hibernate.type.ComponentType.hydrate(ComponentType.java:560)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:275)
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:1088)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:553)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2144)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
at org.hibernate.loader.Loader.list(Loader.java:2023)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.slfc.cu.home.TcsrpTest.main(TcsrpTest.java:32)

Please help me on this


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 4:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
pleaes go to the user forum for questions like this.

(and read the posting instructions so you can actually give readers enough info)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 7:43 am 
Newbie

Joined: Thu Jan 04, 2007 1:52 am
Posts: 6
My apologies on not being clear.I did have a look at forums but couldnt find any solution :(

Hibernate version: 3.2 beta IDE Eclipse 3.2.1

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>
<class name="com.clarica.hibernate.forms.Tcs" table="TCSRP" schema="CUTEST">
<composite-id class="com.clarica.util.ObjectId" mapped="true">
<key-property name="signature" type="com.clarica.util.Signature">
<column name="SIGNATURE" />
</key-property>
<key-property name="instanceId" type="com.clarica.util.UniqueIdentifier">
<column name="INSTANCE_ID" />
</key-property>
</composite-id>

<property name="userid" type="string">
<column name="USERID" length="8" />
</property>

</class>
<query name="csr">from Tcs</query>
</hibernate-mapping>




//Please note Signature type is string and InstanceId type is byte in the corresponding Signature and UniqueIDentifier classes

Code between sessionFactory.openSession() and session.close():
ScrollableResults customers = session.getNamedQuery("csr").scroll(
ScrollMode.FORWARD_ONLY);
Tcs t = new Tcs();
System.out.println("GetUserid " + t.getUserid());


while (customers.next()) {
Tcs customer = (Tcs) customers.get(0);
System.out
.println("Userid.... " + customer.getUserid());

}


Full stack trace of any exception that occurs:
16:22:52,109 INFO Environment:500 - Hibernate 3.2 cr4
16:22:52,125 INFO Environment:518 - loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=1800, hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver, hibernate.c3p0.max_statements=50, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.c3p0.max_size=20, hibernate.c3p0.min_size=5, hibernate.connection.username=db2admin , hibernate.connection.url=jdbc:db2://localhost:50000/CUTEST1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****}
16:22:52,125 INFO Environment:667 - Bytecode provider name : cglib
16:22:52,140 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
16:22:52,281 INFO Configuration:1350 - configuring from resource: /hibernate.cfg.xml
16:22:52,281 INFO Configuration:1327 - Configuration resource: /hibernate.cfg.xml
16:22:52,546 INFO Configuration:507 - Reading mappings from resource: Tcs.hbm.xml
16:22:52,734 INFO HbmBinder:300 - Mapping class: com.clarica.hibernate.forms.Tcs -> TCSRP
16:22:52,781 INFO Configuration:1465 - Configured SessionFactory: null
16:22:53,015 INFO C3P0ConnectionProvider:50 - C3P0 using driver: com.ibm.db2.jcc.DB2Driver at URL: jdbc:db2://localhost:50000/CUTEST
16:22:53,015 INFO C3P0ConnectionProvider:51 - Connection properties: {user=db2admin, password=****}
16:22:53,015 INFO C3P0ConnectionProvider:54 - autocommit mode: false
16:22:53,218 INFO MLog:80 - MLog clients using log4j logging.
16:22:53,265 INFO C3P0Registry:77 - Initializing c3p0-0.9.0 [built 11-July-2005 00:43:29 -0400; debug? true; trace: 10]
16:22:53,656 INFO PoolBackedDataSource:257 - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@77a7f9 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@15212bc [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 15212bc, idleConnectionTestPeriod -> 0, initialPoolSize -> 5, maxIdleTime -> 1800, maxPoolSize -> 20, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@e0b6f5 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> e0b6f5, jdbcUrl -> jdbc:db2://localhost:50000/CUTEST, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 77a7f9, numHelperThreads -> 3 ]
16:22:53,687 DEBUG BasicResourcePool:942 - awaitAvailable(): [unknown]
16:22:53,687 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 0, unused: 0, excluded: 0]
16:22:54,218 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 1, excluded: 0]
16:22:54,234 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39 ---> age: 16 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:54,234 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,265 INFO SettingsFactory:81 - RDBMS: DB2/NT, version: SQL08023
16:22:54,265 INFO SettingsFactory:82 - JDBC driver: IBM DB2 JDBC Universal Driver Architecture, version: 2.7.58
16:22:54,265 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
16:22:54,281 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:105)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:28)
16:22:54,281 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,312 INFO Dialect:141 - Using dialect: org.hibernate.dialect.DB2Dialect
16:22:54,343 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
16:22:54,343 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:22:54,343 INFO SettingsFactory:134 - Automatic flush during beforeCompletion(): disabled
16:22:54,343 INFO SettingsFactory:138 - Automatic session close at end of transaction: disabled
16:22:54,343 INFO SettingsFactory:153 - Scrollable result sets: enabled
16:22:54,343 INFO SettingsFactory:161 - JDBC3 getGeneratedKeys(): disabled
16:22:54,343 INFO SettingsFactory:169 - Connection release mode: auto
16:22:54,343 INFO SettingsFactory:196 - Default batch fetch size: 1
16:22:54,343 INFO SettingsFactory:200 - Generate SQL with comments: disabled
16:22:54,343 INFO SettingsFactory:204 - Order SQL updates by primary key: disabled
16:22:54,359 INFO SettingsFactory:369 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:22:54,359 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
16:22:54,359 INFO SettingsFactory:212 - Query language substitutions: {}
16:22:54,359 INFO SettingsFactory:217 - JPA-QL strict compliance: disabled
16:22:54,359 INFO SettingsFactory:222 - Second-level cache: enabled
16:22:54,359 INFO SettingsFactory:226 - Query cache: disabled
16:22:54,359 INFO SettingsFactory:356 - Cache provider: org.hibernate.cache.NoCacheProvider
16:22:54,359 INFO SettingsFactory:241 - Optimize cache for minimal puts: disabled
16:22:54,359 INFO SettingsFactory:250 - Structured second-level cache entries: disabled
16:22:54,375 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 2, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,390 INFO SettingsFactory:270 - Echoing all SQL to stdout
16:22:54,390 INFO SettingsFactory:277 - Statistics: disabled
16:22:54,390 INFO SettingsFactory:281 - Deleted entity synthetic identifier rollback: disabled
16:22:54,390 INFO SettingsFactory:296 - Default entity-mode: pojo
16:22:54,453 INFO SessionFactoryImpl:161 - building session factory
16:22:54,609 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 3, unused: 3, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,796 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 4, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,953 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 5, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:55,078 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
16:22:55,078 INFO SchemaUpdate:115 - Running hbm2ddl schema update
16:22:55,093 INFO SchemaUpdate:126 - fetching database metadata
16:22:55,093 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39 ---> age: 812 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:55,093 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:55,171 INFO SchemaUpdate:138 - updating schema
16:22:55,921 INFO TableMetadata:40 - table found: CUTEST.TCSRP
16:22:55,921 INFO TableMetadata:41 - columns: [instance_id, out_of_office_sw, session_token, bus_unit_code, status, last_updt_userid, work_mgr_id, last_update_date, desktop_lang, tivoli_logging_sw, userid, create_wp_lang, signature, language_two, lurnum, language_one, assigned_count, language_three, version_number, reply_to_queue, reply_to_qm, tier, location, def_work_mgr_id]
16:22:55,921 INFO TableMetadata:43 - foreign keys: []
16:22:55,921 INFO TableMetadata:44 - indexes: [xcsrp0, xcsrp2, xcsrp1]
16:22:55,921 INFO SchemaUpdate:160 - schema update complete
16:22:55,921 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
16:22:55,921 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.release(SuppliedConnectionProviderConnectionHelper.java:51)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:173)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:28)
16:22:55,921 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:56,343 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@c4fe76 ---> age: 1968 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:56,343 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:56,343 DEBUG SQL:393 - select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_
Hibernate: select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_
16:22:56,359 DEBUG GooGooStatementCache:381 - cxnStmtMgr.statementSet( com.ibm.db2.jcc.c.b@84cc09 ).size(): 1
16:22:56,359 DEBUG GooGooStatementCache:117 - checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 1; num connections: 1; num keys: 1
16:22:56,421 INFO SerializableType:128 - could not read column value from result set: SIGNATURE0_; could not deserialize
16:22:56,421 DEBUG GooGooStatementCache:171 - checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 0; num connections: 1; num keys: 1
16:22:56,421 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 0; num connections: 1; num keys: 1
16:22:56,437 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:445)
at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:400)
at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:287)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:241)
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:417)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1126)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:30)
16:22:56,437 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
org.hibernate.type.SerializationException: could not deserialize
could not deserialize




Name and version of the database you are using:
DB2 8.1

The generated SQL (show_sql=true):
select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 7:44 am 
Newbie

Joined: Thu Jan 04, 2007 1:52 am
Posts: 6
My apologies on not being clear.I did have a look at forums but couldnt find any solution :(

Hibernate version: 3.2 beta IDE Eclipse 3.2.1

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>
<class name="com.clarica.hibernate.forms.Tcs" table="TCSRP" schema="CUTEST">
<composite-id class="com.clarica.util.ObjectId" mapped="true">
<key-property name="signature" type="com.clarica.util.Signature">
<column name="SIGNATURE" />
</key-property>
<key-property name="instanceId" type="com.clarica.util.UniqueIdentifier">
<column name="INSTANCE_ID" />
</key-property>
</composite-id>

<property name="userid" type="string">
<column name="USERID" length="8" />
</property>

</class>
<query name="csr">from Tcs</query>
</hibernate-mapping>




//Please note Signature type is string and InstanceId type is byte in the corresponding Signature and UniqueIDentifier classes

Code between sessionFactory.openSession() and session.close():
ScrollableResults customers = session.getNamedQuery("csr").scroll(
ScrollMode.FORWARD_ONLY);
Tcs t = new Tcs();
System.out.println("GetUserid " + t.getUserid());


while (customers.next()) {
Tcs customer = (Tcs) customers.get(0);
System.out
.println("Userid.... " + customer.getUserid());

}


Full stack trace of any exception that occurs:
16:22:52,109 INFO Environment:500 - Hibernate 3.2 cr4
16:22:52,125 INFO Environment:518 - loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=1800, hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver, hibernate.c3p0.max_statements=50, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.c3p0.max_size=20, hibernate.c3p0.min_size=5, hibernate.connection.username=db2admin , hibernate.connection.url=jdbc:db2://localhost:50000/CUTEST1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****}
16:22:52,125 INFO Environment:667 - Bytecode provider name : cglib
16:22:52,140 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
16:22:52,281 INFO Configuration:1350 - configuring from resource: /hibernate.cfg.xml
16:22:52,281 INFO Configuration:1327 - Configuration resource: /hibernate.cfg.xml
16:22:52,546 INFO Configuration:507 - Reading mappings from resource: Tcs.hbm.xml
16:22:52,734 INFO HbmBinder:300 - Mapping class: com.clarica.hibernate.forms.Tcs -> TCSRP
16:22:52,781 INFO Configuration:1465 - Configured SessionFactory: null
16:22:53,015 INFO C3P0ConnectionProvider:50 - C3P0 using driver: com.ibm.db2.jcc.DB2Driver at URL: jdbc:db2://localhost:50000/CUTEST
16:22:53,015 INFO C3P0ConnectionProvider:51 - Connection properties: {user=db2admin, password=****}
16:22:53,015 INFO C3P0ConnectionProvider:54 - autocommit mode: false
16:22:53,218 INFO MLog:80 - MLog clients using log4j logging.
16:22:53,265 INFO C3P0Registry:77 - Initializing c3p0-0.9.0 [built 11-July-2005 00:43:29 -0400; debug? true; trace: 10]
16:22:53,656 INFO PoolBackedDataSource:257 - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@77a7f9 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@15212bc [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 15212bc, idleConnectionTestPeriod -> 0, initialPoolSize -> 5, maxIdleTime -> 1800, maxPoolSize -> 20, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@e0b6f5 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> e0b6f5, jdbcUrl -> jdbc:db2://localhost:50000/CUTEST, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 77a7f9, numHelperThreads -> 3 ]
16:22:53,687 DEBUG BasicResourcePool:942 - awaitAvailable(): [unknown]
16:22:53,687 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 0, unused: 0, excluded: 0]
16:22:54,218 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 1, excluded: 0]
16:22:54,234 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39 ---> age: 16 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:54,234 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,265 INFO SettingsFactory:81 - RDBMS: DB2/NT, version: SQL08023
16:22:54,265 INFO SettingsFactory:82 - JDBC driver: IBM DB2 JDBC Universal Driver Architecture, version: 2.7.58
16:22:54,265 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
16:22:54,281 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:105)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:28)
16:22:54,281 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 1, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,312 INFO Dialect:141 - Using dialect: org.hibernate.dialect.DB2Dialect
16:22:54,343 INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
16:22:54,343 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:22:54,343 INFO SettingsFactory:134 - Automatic flush during beforeCompletion(): disabled
16:22:54,343 INFO SettingsFactory:138 - Automatic session close at end of transaction: disabled
16:22:54,343 INFO SettingsFactory:153 - Scrollable result sets: enabled
16:22:54,343 INFO SettingsFactory:161 - JDBC3 getGeneratedKeys(): disabled
16:22:54,343 INFO SettingsFactory:169 - Connection release mode: auto
16:22:54,343 INFO SettingsFactory:196 - Default batch fetch size: 1
16:22:54,343 INFO SettingsFactory:200 - Generate SQL with comments: disabled
16:22:54,343 INFO SettingsFactory:204 - Order SQL updates by primary key: disabled
16:22:54,359 INFO SettingsFactory:369 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
16:22:54,359 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
16:22:54,359 INFO SettingsFactory:212 - Query language substitutions: {}
16:22:54,359 INFO SettingsFactory:217 - JPA-QL strict compliance: disabled
16:22:54,359 INFO SettingsFactory:222 - Second-level cache: enabled
16:22:54,359 INFO SettingsFactory:226 - Query cache: disabled
16:22:54,359 INFO SettingsFactory:356 - Cache provider: org.hibernate.cache.NoCacheProvider
16:22:54,359 INFO SettingsFactory:241 - Optimize cache for minimal puts: disabled
16:22:54,359 INFO SettingsFactory:250 - Structured second-level cache entries: disabled
16:22:54,375 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 2, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,390 INFO SettingsFactory:270 - Echoing all SQL to stdout
16:22:54,390 INFO SettingsFactory:277 - Statistics: disabled
16:22:54,390 INFO SettingsFactory:281 - Deleted entity synthetic identifier rollback: disabled
16:22:54,390 INFO SettingsFactory:296 - Default entity-mode: pojo
16:22:54,453 INFO SessionFactoryImpl:161 - building session factory
16:22:54,609 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 3, unused: 3, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,796 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 4, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:54,953 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 5, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:55,078 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
16:22:55,078 INFO SchemaUpdate:115 - Running hbm2ddl schema update
16:22:55,093 INFO SchemaUpdate:126 - fetching database metadata
16:22:55,093 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39 ---> age: 812 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:55,093 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:55,171 INFO SchemaUpdate:138 - updating schema
16:22:55,921 INFO TableMetadata:40 - table found: CUTEST.TCSRP
16:22:55,921 INFO TableMetadata:41 - columns: [instance_id, out_of_office_sw, session_token, bus_unit_code, status, last_updt_userid, work_mgr_id, last_update_date, desktop_lang, tivoli_logging_sw, userid, create_wp_lang, signature, language_two, lurnum, language_one, assigned_count, language_three, version_number, reply_to_queue, reply_to_qm, tier, location, def_work_mgr_id]
16:22:55,921 INFO TableMetadata:43 - foreign keys: []
16:22:55,921 INFO TableMetadata:44 - indexes: [xcsrp0, xcsrp2, xcsrp1]
16:22:55,921 INFO SchemaUpdate:160 - schema update complete
16:22:55,921 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 0; checked out: 0; num connections: 0; num keys: 0
16:22:55,921 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.release(SuppliedConnectionProviderConnectionHelper.java:51)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:173)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:28)
16:22:55,921 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:56,343 DEBUG BasicResourcePool:1081 - resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@c4fe76 ---> age: 1968 max: 1800000 [com.mchange.v2.resourcepool.BasicResourcePool@21b220]
16:22:56,343 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
16:22:56,343 DEBUG SQL:393 - select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_
Hibernate: select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_
16:22:56,359 DEBUG GooGooStatementCache:381 - cxnStmtMgr.statementSet( com.ibm.db2.jcc.c.b@84cc09 ).size(): 1
16:22:56,359 DEBUG GooGooStatementCache:117 - checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 1; num connections: 1; num keys: 1
16:22:56,421 INFO SerializableType:128 - could not read column value from result set: SIGNATURE0_; could not deserialize
16:22:56,421 DEBUG GooGooStatementCache:171 - checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 0; num connections: 1; num keys: 1
16:22:56,421 DEBUG GooGooStatementCache:197 - checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 0; num connections: 1; num keys: 1
16:22:56,437 DEBUG NewPooledConnection:294 - A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!
com.ibm.db2.jcc.a.SqlException: Connection.setTypeMap is not supported
at com.ibm.db2.jcc.a.p.setTypeMap(p.java:1752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.reset(NewPooledConnection.java:290)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1148)
at org.hibernate.connection.C3P0ConnectionProvider.closeConnection(C3P0ConnectionProvider.java:42)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:445)
at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:400)
at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:287)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:241)
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:417)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1126)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.clarica.cu.csrhibernate.TcsrpTest.main(TcsrpTest.java:30)
16:22:56,437 DEBUG BasicResourcePool:1159 - trace com.mchange.v2.resourcepool.BasicResourcePool@21b220 [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@1275d39)
org.hibernate.type.SerializationException: could not deserialize
could not deserialize




Name and version of the database you are using:
DB2 8.1

The generated SQL (show_sql=true):
select tcs0_.SIGNATURE as SIGNATURE0_, tcs0_.INSTANCE_ID as INSTANCE2_0_, tcs0_.USERID as USERID0_ from CUTEST.TCSRP tcs0_


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 12:48 am 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
Issues with setTypeMap() not being supported by some JDBC drivers are resolved in more recent versions of c3p0. Please try the latest prerelease c3p0-0.9.1 (it's a drop in replacement for what you're using).

Good luck!

Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.