Hi guys,
I have a
java web application and I'm not able to do a SAVE to the database. I'm able to fetch records from DB, but not a save.
The save used to work until I bought a new laptop and imported my database and application to this new computer. I'm using MS Server 2005 (before and after).
Below is the error I got. Does anyone did what's causing it???:
javax.servlet.ServletException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not insert: [com.RXCoreApp.datamodel.BusinessServiceCbo]; uncategorized SQLException for SQL [insert into RX.dbo.Business_Service (Service_Id, Business_Id) values (?, ?)]; SQL state [null]; error code [0]; The statement must be run before the generated keys are available.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The statement must be run before the generated keys are available.
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:196)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
root cause
Pls HeLP...