com.sybase.jdbc3.utils.UnimplementedOperationException:仅用于插入! [春季+休眠]

时间:2014-08-13 06:59:55

标签: hibernate spring-mvc jdbc sybase-ase

我正在尝试开发一个简单的Spring + Hibernate应用程序,如下面的链接所示: http://www.roseindia.net/hibernate/HibernateSpring.shtml

我正在使用SybaseASE 11.zx-12.5-TDS5.5。我创建了下表:Employee (EMP_ID,姓名,地址,薪水)

我可以显示员工列表,也可以通过应用程序删除员工记录。但是添加/插入员工记录会引发异常!

控制台: 信息:FrameworkServlet'调度程序:初始化在5379毫秒内完成 Hibernate:插入employee(emp_id,address,name,salary)值(null,?,?,?) 2014年8月13日下午12:16:54 org.apache.catalina.core.StandardWrapperValve调用 严重:Servlet调度程序的Servlet.service()引发了异常 com.sybase.jdbc3.utils.UnimplementedOperationException:方法com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(String,int)尚未完成,因此不应调用。     at com.sybase.jdbc3.jdbc.ErrorMessage.raiseRuntimeException(Unknown Source)     在com.sybase.jdbc3.utils.Debug.notImplemented(未知来源)     在com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(未知来源)     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)     在org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:55)     在org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032)     在org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3558)     在org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:98)     在org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:490)     at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:195)     在org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:179)     在org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:214)     at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324)     在org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288)     在org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194)     在org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125)     在org.hibernate.event.internal.DefaultMergeEventListener.saveTransientEntity(DefaultMergeEventListener.java:271)     在org.hibernate.event.internal.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:251)     在org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:189)     在org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:85)     在org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:876)     在org.hibernate.internal.SessionImpl.merge(SessionImpl.java:858)     在org.hibernate.internal.SessionImpl.merge(SessionImpl.java:863)     at net.roseindia.dao.daoImpl.EmployeeDaoImpl.editEmployee(EmployeeDaoImpl.java:88)     在net.roseindia.services.impl.EmployeeServiceImpl.editEmployee(EmployeeServiceImpl.java:42)     在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)     在org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)     在org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)     在org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)     在org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)     在org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)     在org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)     在org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)     在org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)     在org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)     在org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:637)     在org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:717)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)     在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)     在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)     在org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:583)     在org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:447)     在java.lang.Thread.run(未知来源) net.roseindia.services.impl.EmployeeServiceImpl@f6e15e Hibernate:选择employee0_.emp_id为emp_id1_0_,employee0_.address为address2_0_,employee0_.name为name3_0_,employee0_.salary为salary4_0_来自员工employee0_其中employee0_.emp_id = 1 2014年8月13日下午12:17:27 org.displaytag.export.ExportViewFactory 信息:使用type = {csv,excel,xml,pdf}初始化ExportViewFactory 2014年8月13日下午12:17:27 org.displaytag.properties.TableProperties getLocaleResolverInstance 信息:未配置LocaleResolver。 net.roseindia.services.impl.EmployeeServiceImpl@f6e15e Hibernate:选择employee0_.emp_id为emp_id1_0_,employee0_.address为address2_0_,employee0_.name为name3_0_,employee0_.salary为salary4_0_来自员工employee__ 删除.. Hibernate:选择employee0_.emp_id为emp_id1_0_,employee0_.address为address2_0_,employee0_.name为name3_0_,employee0_.salary为salary4_0_来自员工employee0_其中employee0_.emp_id = 1 删除.. Hibernate:从员工中删除emp_id =? Hibernate:选择this_.emp_id为emp_id1_0_0_,this_.address为address2_0_0_,this_.name为name3_0_0_,this_.salary为salary4_0_0_来自员工this_ Hibernate:选择this_.emp_id为emp_id1_0_0_,this_.address为address2_0_0_,this_.name为name3_0_0_,this_.salary为salary4_0_0_来自员工this_ net.roseindia.services.impl.EmployeeServiceImpl@f6e15e Hibernate:选择employee0_.emp_id为emp_id1_0_,employee0_.address为address2_0_,employee0_.name为name3_0_,employee0_.salary为salary4_0_来自员工employee_ _

请帮助我!

0 个答案:

没有答案