Here is Hibernate Trace, it seems like Hibernate thinks that the Entity is Transient in
these lines, but i can't understand why.
[org.hibernate.event.def.AbstractSaveEventListener] transient instance of: test.Flight
2009-06-01 14:11:08,466 TRACE [org.hibernate.event.def.DefaultPersistEventListener] saving
transient instance
anonymous wrote :
| 2009-06-01 14:11:08,404 DEBUG [org.hibernate.impl.SessionFactoryImpl] obtaining JTA
TransactionManager
| 2009-06-01 14:11:08,404 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext
properties:{}
| 2009-06-01 14:11:08,404 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 0 named
HQL queries
| 2009-06-01 14:11:08,404 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 0 named
SQL queries
| 2009-06-01 14:11:08,419 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext
properties:{}
| 2009-06-01 14:11:08,419 INFO
[org.hibernate.transaction.TransactionManagerLookupFactory] instantiating
TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
| 2009-06-01 14:11:08,419 INFO
[org.hibernate.transaction.TransactionManagerLookupFactory] instantiated
TransactionManagerLookup
| 2009-06-01 14:11:08,419 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext
properties:{}
| 2009-06-01 14:11:08,451 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered
Synchronization
| 2009-06-01 14:11:08,451 DEBUG [org.hibernate.impl.SessionImpl] opened session at
timestamp: 12438546684
| 2009-06-01 14:11:08,466 TRACE [org.hibernate.event.def.AbstractSaveEventListener]
transient instance of: test.Flight
| 2009-06-01 14:11:08,466 TRACE [org.hibernate.event.def.DefaultPersistEventListener]
saving transient instance
| 2009-06-01 14:11:08,466 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open
PreparedStatement (open PreparedStatements: 0, globally: 0)
| 2009-06-01 14:11:08,466 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC
connection
| 2009-06-01 14:11:08,466 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] total checked-out connections:
0
| 2009-06-01 14:11:08,466 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] using pooled JDBC connection,
pool size: 0
| 2009-06-01 14:11:08,466 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval
from dual
| 2009-06-01 14:11:08,466 INFO [STDOUT] Hibernate: select hibernate_sequence.nextval
from dual
| 2009-06-01 14:11:08,466 TRACE [org.hibernate.jdbc.AbstractBatcher] preparing
statement
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier
generated: 1
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close
PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2009-06-01 14:11:08,748 TRACE [org.hibernate.jdbc.AbstractBatcher] closing statement
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively
releasing JDBC connection
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC
connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2009-06-01 14:11:08,748 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] returning connection to pool,
pool size: 1
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.id.SequenceHiLoGenerator] new hi value:
1
| 2009-06-01 14:11:08,748 DEBUG [org.hibernate.event.def.AbstractSaveEventListener]
generated identifier: 10, using strategy: org.hibernate.id.SequenceHiLoGenerator
| 2009-06-01 14:11:08,748 TRACE [org.hibernate.event.def.AbstractSaveEventListener]
saving [test.Flight#10]
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
flushing session
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
processing flush-time cascades
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
dirty checking collections
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Flushing entities and processing referenced collections
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Processing unreferenced collections
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Scheduling collection removes/(re)creates/updates
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.pretty.Printer] listing entities:
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.pretty.Printer] test.Flight{id=10,
name=flightName}
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
executing flush
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.jdbc.ConnectionManager] registering flush
begin
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.persister.entity.AbstractEntityPersister]
Inserting entity: [test.Flight#10]
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open
PreparedStatement (open PreparedStatements: 0, globally: 0)
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC
connection
| 2009-06-01 14:11:08,763 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] total checked-out connections:
0
| 2009-06-01 14:11:08,763 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] using pooled JDBC connection,
pool size: 0
| 2009-06-01 14:11:08,763 DEBUG [org.hibernate.SQL] insert into tbl_flight (name, id)
values (?, ?)
| 2009-06-01 14:11:08,763 INFO [STDOUT] Hibernate: insert into tbl_flight (name, id)
values (?, ?)
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.jdbc.AbstractBatcher] preparing
statement
| 2009-06-01 14:11:08,763 TRACE [org.hibernate.persister.entity.AbstractEntityPersister]
Dehydrating entity: [test.Flight#10]
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.type.StringType] binding
'flightName' to parameter: 1
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.type.LongType] binding '10' to
parameter: 2
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.AbstractBatcher] Executing batch
size: 1
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.Expectations] success of batch
update unknown: 0
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close
PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.AbstractBatcher] closing statement
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping
aggressive-release due to flush cycle
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.ConnectionManager] registering flush
end
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively
releasing JDBC connection
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC
connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2009-06-01 14:11:08,779 TRACE
[org.hibernate.connection.DriverManagerConnectionProvider] returning connection to pool,
pool size: 1
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
post flush
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.transaction.CacheSynchronization]
transaction before completion callback
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.transaction.CacheSynchronization]
automatically flushing session
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.impl.SessionImpl] automatically flushing
session
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
flushing session
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
processing flush-time cascades
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
dirty checking collections
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Flushing entities and processing referenced collections
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Processing unreferenced collections
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
Scheduling collection removes/(re)creates/updates
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener]
Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.pretty.Printer] listing entities:
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.pretty.Printer] test.Flight{id=10,
name=flightName}
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
executing flush
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.ConnectionManager] registering flush
begin
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.ConnectionManager] registering flush
end
| 2009-06-01 14:11:08,779 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively
releasing JDBC connection
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.event.def.AbstractFlushingEventListener]
post flush
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.JDBCContext] before transaction
completion
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.impl.SessionImpl] before transaction
completion
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.transaction.CacheSynchronization]
transaction after completion callback, status: 3
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.JDBCContext] after transaction
completion
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.impl.SessionImpl] after transaction
completion
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.transaction.CacheSynchronization]
automatically closing session
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.impl.SessionImpl] automatically closing
session
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.impl.SessionImpl] closing session
| 2009-06-01 14:11:08,779 TRACE [org.hibernate.jdbc.ConnectionManager] connection
already null in cleanup : no action
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234435#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...