-->
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.  [ 1 post ] 
Author Message
 Post subject: delete transient
PostPosted: Tue Jun 21, 2005 12:28 am 
Newbie

Joined: Fri Jun 03, 2005 2:15 pm
Posts: 14
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:[/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]

When I tried to delete a detached object just after get from the database, hibernate complained that the object is transient and then rollback.

Client side code:
device = stub.getDeviceById(new Long(983040));
deleteReturn = stub.deleteDevice(device);


Server side print out:

[2005-06-20 22:19:24,291] DEBUG org.hibernate.transaction.JDBCTransaction begin
[2005-06-20 22:19:24,291] DEBUG org.hibernate.transaction.JDBCTransaction current autocommit status: false
[2005-06-20 22:19:24,291] INFO Transaction-2005-06-20 DeviceDAO:deleteDevice::starting --> the identifier is: 983040
[2005-06-20 22:19:24,291] DEBUG org.hibernate.event.def.DefaultDeleteEventListener deleting a transient instance
[2005-06-20 22:19:24,306] DEBUG org.hibernate.transaction.JDBCTransaction rollback
[2005-06-20 22:19:24,306] DEBUG org.hibernate.jdbc.JDBCContext before transaction completion
[2005-06-20 22:19:24,306] DEBUG org.hibernate.impl.SessionImpl before transaction completion
[2005-06-20 22:19:24,306] DEBUG org.hibernate.transaction.JDBCTransaction rolled back JDBC Connection
[2005-06-20 22:19:24,306] DEBUG org.hibernate.jdbc.JDBCContext after transaction completion
[2005-06-20 22:19:24,306] DEBUG org.hibernate.impl.SessionImpl after transaction completion
[2005-06-20 22:19:24,306] DEBUG org.hibernate.impl.SessionImpl closing session
[2005-06-20 22:19:24,306] DEBUG org.hibernate.jdbc.AbstractBatcher closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
[2005-06-20 22:19:24,306] DEBUG org.hibernate.connection.DriverManagerConnectionProvider returning connection to pool, pool size: 1
[2005-06-20 22:19:24,306] DEBUG org.hibernate.jdbc.JDBCContext after transaction completion
[2005-06-20 22:19:24,306] DEBUG org.hibernate.impl.SessionImpl after transaction completion
[2005-06-20 22:19:30,572] INFO DefaultTransaction Shutting down...
[2005-06-20 22:19:30,572] INFO org.mortbay.util.ThreadedServer Stopping Acceptor [SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=443]]
[2005-06-20 22:19:31,541] INFO org.mortbay.http.SocketListener Stopped SocketListener on 0.0.0.0:443
[2005-06-20 22:19:31,541] INFO org.mortbay.util.Container Stopped org.mortbay.jetty.servlet.WebApplicationHandler@d1fa5
[2005-06-20 22:19:31,541] INFO org.mortbay.util.Container Stopped WebApplicationContext[/jsentry,Apache-Axis]
[2005-06-20 22:19:31,541] INFO org.mortbay.util.Container Stopped org.mortbay.jetty.Server@1f9dc36

Any help would be appreciated.

Thanks.

Wade


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.