[英]Could not open Hibernate Session for transaction: ConnectionWrapper is not visible from class loader
I have the following error that gives me the application, hibernate 3 use and gives me when I try to access a query repeatedly and I could not put the fix below DAOImpl and where I call the method multiple times, if someone could help me I would appreciate thanks for your time: : 我遇到以下错误,该错误为我提供了应用程序,休眠3的使用方式,并在我尝试重复访问查询时给出了错误,并且我无法将修复程序放在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
And the method is 方法是
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);
}
If you're using Hibernate 3.2.6/3.3.1, it is likely the cause of the problem is a bug in Hibernate: 如果您使用的是Hibernate 3.2.6 / 3.3.1,则问题的原因很可能是Hibernate中的错误:
HHH-3529: ConnectionWrapper is not visible from class loader HHH-3529:从类加载器中看不到ConnectionWrapper
Looks like there's a bug in the BorrowedConnectionProxy
class regarding the getProxyClassLoader()
method. 看起来BorrowedConnectionProxy
类中有一个与getProxyClassLoader()
方法有关的getProxyClassLoader()
。
Upgrade Hibernate to 3.5.0 or later. 将Hibernate升级到3.5.0或更高版本。 If that's not possible, there's a patch in that JIRA you can apply. 如果不可能,可以在JIRA中打补丁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.