小编Har*_*GNS的帖子

Hibernate for Sybase DB 中的多语句事务中不允许使用 SELECT INTO 命令

我是 hibernate 的新手,并尝试使用 hibernate 执行从 Java 文件到 Sybase DB 的过程。当我尝试运行该应用程序时,我收到如下错误

存储过程“dbo.p_chklist_test”只能在非链式事务模式下运行。“SET CHAINED OFF”命令将导致当前会话使用非链接事务模式。

我已经检查了几个论坛,并通过运行以下命令将模式设置为“任何模式”。sp_procxmode p_chklist_test, "任意模式"

另外,我在休眠状态下将自动提交设置为 False。

现在我收到了如下所示的不同错误

Caused by: org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:198)
    at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1191)
    at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:357)
    at com.lcit_release.server.dao.ReleaseItemDao.searchRecordsNew(ReleaseItemDao.java:198)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy8.searchRecordsNew(Unknown Source)
    at com.lcit_release.server.logic.ReleaseItemLogic.searchExisting(ReleaseItemLogic.java:147)
    at com.lcit_release.server.adapter.ReleaseItemLogicAdapter.search(ReleaseItemLogicAdapter.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597) …
Run Code Online (Sandbox Code Playgroud)

java sql sybase hibernate sap-ase

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

hibernate ×1

java ×1

sap-ase ×1

sql ×1

sybase ×1