简体   繁体   English

无法为事务打开Hibernate会话:从类加载器中看不到ConnectionWrapper

[英]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.

相关问题 休眠会话无法打开进行交易 - Hibernate Session Could not open for transaction CannotCreateTransactionException:无法打开休眠会话进行事务 - CannotCreateTransactionException: Could not open Hibernate Session for transaction 无法为事务打开Hibernate Session,JavaConfig - Could not open Hibernate Session for transaction, JavaConfig 为什么会发生这种“无法打开Hibernate Session进行交易”的情况? - why this “Could not open Hibernate Session for transaction” occured? 首次登录时无法为事务打开休眠会话 - Could not open Hibernate Session for transaction on First Login 无法为事务打开 Hibernate Session; 嵌套异常是无法打开连接 - Could not open Hibernate Session for transaction; nested exception is Could not open connection org.springframework.transaction.CannotCreateTransactionException:无法打开Hibernate Session进行事务处理 - org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction CannotCreateTransactionException:无法打开事务的Hibernate会话(Hibernate,MySQL,MVC) - CannotCreateTransactionException: Could not open Hibernate Session for transaction(Hibernate, MySQL, MVC) SpringMVC和Hibernate:CannotCreateTransactionException:无法打开Hibernate Session进行事务处理; - SpringMVC & Hibernate : CannotCreateTransactionException: Could not open Hibernate Session for transaction; 无法为事务 JAVA MAVEN SPRING 打开 Hibernate 会话 - Could not open Hibernate Session for transaction JAVA MAVEN SPRING
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM