gpt4 book ai didi

java - 无法打开事务 : ConnectionWrapper is not visible from class loader 的 Hibernate session

转载 作者:行者123 更新时间:2023-11-29 08:51:38 32 4
gpt4 key购买 nike

我有以下错误,它给了我应用程序,hibernate 3 use 并在我尝试重复访问查询时给了我,我无法将修复程序放在 DAOImpl 下,我多次调用该方法,如果有人可以提供帮助我非常感谢您的宝贵时间::

Exception in thread "AWT-EventQueue-0" 
org.springframework.transaction.CannotCreateTransactionException:
Could not open Hibernate Session for transaction;
nested exception is java.lang.IllegalArgumentException:
interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader

方法是

 public void checkattentiontable(){

for (int i = 0; i < listaoffice.size(); i++) {

if(i ==0){cantini0 = generalServices.cantAtenttionONtable(listaoffice.get(0));}
if(i ==1){cantini1 = generalServices.cantAtenttionONtable(listaoffice.get(1));}
if(i ==2){cantini2 = generalServices.cantAtenttionONtable(listaoffice.get(2));}
if(i ==3){cantini3 = generalServices.cantAtenttionONtable(listaoffice.get(3));}
if(i ==4){cantini4 = generalServices.cantAtenttionONtable(listaoffice.get(4));}
if(i ==5){cantini5 = generalServices.cantAtenttionONtable(listaoffice.get(5));}
if(i ==6){cantini6 = generalServices.cantAtenttionONtable(listaoffice.get(6));}
if(i ==7){cantini7 = generalServices.cantAtenttionONtable(listaoffice.get(7));}
if(i ==8){cantini8 = generalServices.cantAtenttionONtable(listaoffice.get(8));}
}

Timer timer = new Timer(5000, new java.awt.event.ActionListener() {

@Override
public void actionPerformed(ActionEvent arg0) {

if (cantinicialofice0 != cantini0) {
officetoupdate = 0;
cantinicialofice0 = cantini0;
updateindicadores(); //INSIDE THIS I ACCESS TO OTHER QUERYS
}


}
});

timer.start();
timer.setRepeats(true);

}

最佳答案

如果您使用的是 Hibernate 3.2.6/3.3.1,问题的原因很可能是 Hibernate 中的错误:

HHH-3529: ConnectionWrapper is not visible from class loader

BorrowedConnectionProxy 类中似乎存在关于 getProxyClassLoader() 方法的错误。

将 Hibernate 升级到 3.5.0 或更高版本。如果这不可能,您可以应用该 JIRA 中的补丁。

关于java - 无法打开事务 : ConnectionWrapper is not visible from class loader 的 Hibernate session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22550823/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com