title: com.sybase.jdbc3.utils.UnimplementedOperationException: Only for Insert! [Spring+Hibernate]
body: <p>I'm trying to develop a simple Spring+Hibernate application as given in the below link:
  <a href="http://www.roseindia.net/hibernate/HibernateSpring.shtml" rel="nofollow">http://www.roseindia.net/hibernate/HibernateSpring.shtml</a></p>
  
  <p>I am using SybaseASE 11.zx-12.5-TDS5.5. I have created the following table:Employee 
  (emp_id,name,Address,salary)</p>
  
  <p>I am able to Display the list of employees and also delete an employee record through the application. But adding/inserting an employee record is throwing an Exception!</p>
  
  <p><strong>COnsole:</strong>
  INFO: FrameworkServlet 'dispatcher': initialization completed in 5379 ms
  Hibernate: insert into employee (emp_id, address, name, salary) values (null, ?, ?, ?)
  Aug 13, 2014 12:16:54 PM org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Servlet.service() for servlet dispatcher threw exception
  com.sybase.jdbc3.utils.UnimplementedOperationException: The method com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(String, int) has not been completed and should not be called.
      at com.sybase.jdbc3.jdbc.ErrorMessage.raiseRuntimeException(Unknown Source)
      at com.sybase.jdbc3.utils.Debug.notImplemented(Unknown Source)
      at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source)
      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$2.doPrepare(StatementPreparerImpl.java:124)
      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186)
      at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:122)
      at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:55)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3558)
      at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:98)
      at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:490)
      at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:195)
      at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:179)
      at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:214)
      at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324)
      at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288)
      at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194)
      at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125)
      at org.hibernate.event.internal.DefaultMergeEventListener.saveTransientEntity(DefaultMergeEventListener.java:271)
      at org.hibernate.event.internal.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:251)
      at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:189)
      at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:85)
      at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:876)
      at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:858)
      at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:863)
      at net.roseindia.dao.daoImpl.EmployeeDaoImpl.editEmployee(EmployeeDaoImpl.java:88)
      at net.roseindia.services.impl.EmployeeServiceImpl.editEmployee(EmployeeServiceImpl.java:42)
      at net.roseindia.controller.EmployeeController.saveEmployee(EmployeeController.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)
  net.roseindia.services.impl.EmployeeServiceImpl@f6e15e
  Hibernate: select employee0_.emp_id as emp_id1_0_, employee0_.address as address2_0_, employee0_.name as name3_0_, employee0_.salary as salary4_0_ from employee employee0_ where employee0_.emp_id=1
  Aug 13, 2014 12:17:27 PM org.displaytag.export.ExportViewFactory 
  INFO: Initializing ExportViewFactory with type={csv,excel,xml,pdf}
  Aug 13, 2014 12:17:27 PM org.displaytag.properties.TableProperties getLocaleResolverInstance
  INFO: No LocaleResolver configured.
  net.roseindia.services.impl.EmployeeServiceImpl@f6e15e
  Hibernate: select employee0_.emp_id as emp_id1_0_, employee0_.address as address2_0_, employee0_.name as name3_0_, employee0_.salary as salary4_0_ from employee employee0_
  delete..
  Hibernate: select employee0_.emp_id as emp_id1_0_, employee0_.address as address2_0_, employee0_.name as name3_0_, employee0_.salary as salary4_0_ from employee employee0_ where employee0_.emp_id=1
  delete..
  Hibernate: delete from employee where emp_id=?
  Hibernate: select this_.emp_id as emp_id1_0_0_, this_.address as address2_0_0_, this_.name as name3_0_0_, this_.salary as salary4_0_0_ from employee this_
  Hibernate: select this_.emp_id as emp_id1_0_0_, this_.address as address2_0_0_, this_.name as name3_0_0_, this_.salary as salary4_0_0_ from employee this_
  net.roseindia.services.impl.EmployeeServiceImpl@f6e15e
  Hibernate: select employee0_.emp_id as emp_id1_0_, employee0_.address as address2_0_, employee0_.name as name3_0_, employee0_.salary as salary4_0_ from employee employee0_</p>
  
  <p>Please Help me!</p>