Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11317

[OSGi, camel-jpa] Problems with mapping idempotent.jpa.MessageProcessed with Aries + Hibernate

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.7, 2.18.3, 2.19.0
    • Fix Version/s: 2.18.5, 2.19.1, 2.20.0
    • Component/s: camel-jpa, osgi
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When JPA idempotent JpaMessageIdRepository is used in blueprint, with Hibernate JPA Provider we may end up with:

      2017-05-16 13:23:38,739 | ERROR | {pool-28-thread-1} [org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer] (JavassistLazyInitializer.java:166) | 236 - org.hibernate.core - 4.2.22.Final | HHH000142: Javassist Enhancement failed: org.apache.camel.processor.idempotent.jpa.MessageProcessed
      java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
          at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:515)[157:javassist:3.19.0.GA]
          at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492)[157:javassist:3.19.0.GA]
          at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428)[157:javassist:3.19.0.GA]
          at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:400)[157:javassist:3.19.0.GA]
          at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:163)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:229)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:212)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:82)[236:org.hibernate.core:4.2.22.Final]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_131]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_131]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_131]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_131]
          at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:135)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:188)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:341)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:506)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:146)[236:org.hibernate.core:4.2.22.Final]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_131]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_131]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_131]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_131]
          at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:398)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1854)[236:org.hibernate.core:4.2.22.Final]
          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)[237:org.hibernate.entitymanager:4.2.22.Final]
          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)[237:org.hibernate.entitymanager:4.2.22.Final]
          at org.hibernate.osgi.OsgiPersistenceProvider.createContainerEntityManagerFactory(OsgiPersistenceProvider.java:99)[238:org.hibernate.osgi:4.2.22.Final]
          at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.createEntityManagerFactories(EntityManagerFactoryManager.java:432)[166:org.apache.aries.jpa.container:1.0.4]
          at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.registerEntityManagerFactories(EntityManagerFactoryManager.java:292)[166:org.apache.aries.jpa.container:1.0.4]
          at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.access$000(EntityManagerFactoryManager.java:74)[166:org.apache.aries.jpa.container:1.0.4]
          at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager$1.call(EntityManagerFactoryManager.java:203)[166:org.apache.aries.jpa.container:1.0.4]
          at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager$1.call(EntityManagerFactoryManager.java:199)[166:org.apache.aries.jpa.container:1.0.4]
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
          at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
      Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
          at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170)[157:javassist:3.19.0.GA]
          at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507)[157:javassist:3.19.0.GA]
          ... 37 more
      Caused by: java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy
          at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_131]
          at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[:1.8.0_131]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_131]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_131]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
          at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
          at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182)[157:javassist:3.19.0.GA]
          at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)[157:javassist:3.19.0.GA]
          ... 38 more
      Caused by: java.lang.ClassNotFoundException: org.hibernate.proxy.HibernateProxy not found by org.apache.camel.camel-jpa [180]
          at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)
          at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)
          at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_131]
          ... 46 more
      

        Attachments

          Activity

            People

            • Assignee:
              gzres Grzegorz Grzybek
              Reporter:
              gzres Grzegorz Grzybek
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: