[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - identity fields in Entity beans
cesar_takaide
do-not-reply at jboss.com
Fri Mar 28 19:04:22 EDT 2008
Hello, I'm new in EJB3 technology. I'm working with an entity bean that has a identity field, so i wrote this on the field declaration:
@Id
@Column(name = "codigo", nullable = false)
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long codigo;
But, when the entity is persisted, Jboss warns me with a message :
16:42:52,947 WARN [WrappedConnection] Closing a result set you left open! Pleas
e close it yourself.
java.lang.Throwable: STACKTRACE
at org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(Wr
appedStatement.java:617)
at org.jboss.resource.adapter.jdbc.WrappedStatement.getGeneratedKeys(Wra
ppedStatement.java:533)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
...... etc...........
Why is this happening? Is something wrong in my code? Thank you very much for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139787#4139787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139787
More information about the jboss-user
mailing list