我有以下错误,它给了我应用程序,hibernate 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
方法是
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);
}
答案 0 :(得分:0)
如果您正在使用Hibernate 3.2.6 / 3.3.1,则可能是问题的原因是Hibernate中的错误:
<强> HHH-3529: ConnectionWrapper is not visible from class loader 强>
BorrowedConnectionProxy
类中有关getProxyClassLoader()
方法的错误。
将Hibernate升级到3.5.0或更高版本。如果这不可行,那么您可以申请JIRA中的补丁。