[jboss-user] [EJB 3.0] - Re: [JDBCExceptionReporter]'last_insert_id' is not a recogni
shipra
do-not-reply at jboss.com
Tue Jun 12 06:04:21 EDT 2007
Hi,
Thanks. Actually the id was set as Identity column in the Tables also.
I removed the @GeneratedValue from both the entities.
But again I'm getting an error.
15:05:25,757 ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert explicit value for identity column in table 'Address' when IDENTITY_INSERT is set to OFF.
15:05:25,757 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:218)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2220)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
In the Tables, I have id set as an Identity Column.
I looked for this on the Internet:
http://www.microsoft.com/downloads/details.aspx?FamilyId=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en
It asks for SQL Server Service Pack 4.
I installed that but still getting the same error.
I'm new to EJB. Please help me out. :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053429#4053429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053429
More information about the jboss-user
mailing list