Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.4
    • Component/s: hibernate-core
    • Labels:
      None
    • Environment:
      websphere 7.0.0.25, quartz 1.8.6, spring 3.0.7, hibernate 3.6.4.Final, Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      Creating blob within quartz scheduled job workmanager thread gives us following exception:

      interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader
      org.springframework.dao.InvalidDataAccessApiUsageException: interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader
      	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:296)
      	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:104)
      	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:403)
      	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
      	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
      	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      ....
      Caused by: java.lang.IllegalArgumentException: interface org.hibernate.engine.jdbc.WrappedBlob is not visible from class loader
      	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
      	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
      	at org.hibernate.engine.jdbc.SerializableBlobProxy.generateProxy(SerializableBlobProxy.java:92)
      	at org.hibernate.engine.jdbc.AbstractLobCreator.wrap(AbstractLobCreator.java:39) 
      

      Following change in SerializableBlobProxy resolves issue:

      	public static ClassLoader getProxyClassLoader() {
      		return WrappedBlob.class.getClassLoader();
      	}
      

      But is it correct solution?

      Similar issue is described here https://hibernate.atlassian.net/browse/HHH-3529

        Attachments

          Issue links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: