4 Replies Latest reply on Feb 28, 2010 1:34 PM by Denys Kurylenko

    java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory

    Oren Livne Novice

      Dear All,

       

      As part of getting Hibernate to work on the bus, I started getting these errors in my bundle even though I explicitly embed all cglib classes in that bundle (just in case, although this is not desirable in a production system, of course). This happens with almost any bean in my context file, as spring attempts to proxy them and fails. What am I doing wrong?

       

      Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.Invocati

      onTargetException-->null

              at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato

      r.java:237)

              at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)

              at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)

              at org.springframework.beans.factory.support.CglibSubclassingInstantiati

      onStrategy$CglibSubclassCreator.instantiate(CglibSubclassingInstantiationStrateg

      y.java:116)

              at org.springframework.beans.factory.support.CglibSubclassingInstantiati

      onStrategy.instantiateWithMethodInjection(CglibSubclassingInstantiationStrategy.

      java:70)

              at org.springframework.beans.factory.support.SimpleInstantiationStrategy

      .instantiate(SimpleInstantiationStrategy.java:65)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

      Factory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

              ... 61 more

      Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

      sorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)

              at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato

      r.java:219)

              ... 67 more

      Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory

              at java.lang.ClassLoader.defineClass1(Native Method)

              at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

              ... 72 more

      Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.Factory

              at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourc

      eByDelegation(ModuleImpl.java:558)

              at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleI

      mpl.java:59)

              at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.

      loadClass(ModuleImpl.java:1427)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

              ... 74 more

       

      tail of osgi/list :

      further-mdr-impl (1.0.0.SNAPSHOT)

      wrap_mvn_cglib_cglib_rc2-1.0 (0)

      wrap_mvn_cglib_cglib-nodep_2.1_3 (0)

       

      See attached pom for the felix config. Its full dependency tree follows:

       

      dependency:tree {execution: default-cli}

      edu.utah.further.mdr:mdr-impl:bundle:1.0.0-SNAPSHOT

      +- edu.utah.further.core:core-util:jar:1.0.0-SNAPSHOT:compile

      |  +- edu.utah.further.core:core-api:jar:1.0.0-SNAPSHOT:compile

      |  |  +- org.springframework:spring-core:jar:2.5.6:compile

      |  |  +- org.springframework:spring-beans:jar:2.5.6:compile

      |  |  +- org.apache.commons:com.springsource.org.apache.commons.lang:jar:

      2.4.0:compile

      |  |  +- org.slf4j:slf4j-api:jar:1.5.6:compile

      |  |  +- javax.ws.rs:jsr311-api:jar:1.0:compile

      |  |  \- org.slf4j:slf4j-log4j12:jar:1.5.6:runtime

      |  +- log4j:log4j:jar:1.2.15:compile

      |  |  +- javax.mail:mail:jar:1.4:compile

      |  |  +- javax.jms:jms:jar:1.1:compile

      |  |  +- com.sun.jdmk:jmxtools:jar:1.2.1:compile

      |  |  \- com.sun.jmx:jmxri:jar:1.2.1:compile

      |  +- commons-math:commons-math:jar:20040218.045431:compile

      |  +- commons-io:commons-io:jar:1.4:compile

      |  +- net.sourceforge.collections:collections-generic:jar:4.01:compile

      |  +- org.springframework:org.springframework.context.support:jar:2.5.6:c

      ompile

      |  |  +- org.apache.commons:com.springsource.org.apache.commons.logging:j

      ar:1.1.1:compile

      |  |  +- org.springframework:org.springframework.beans:jar:2.5.6:compile

      |  |  +- org.springframework:org.springframework.context:jar:2.5.6:compil

      e

      |  |  |  +- org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0:co

      mpile

      |  |  |  \- org.springframework:org.springframework.aop:jar:2.5.6:compile

       

      |  |  \- org.springframework:org.springframework.core:jar:2.5.6:compile

      |  +- javax.xml.bind:jaxb-api:jar:2.1:compile

      |  |  \- javax.xml.stream:stax-api:jar:1.0-2:compile

      |  +- com.sun.xml.bind:jaxb-impl:jar:2.1.11:compile

      |  +- xerces:xercesImpl:jar:2.9.1:compile

      |  |  \- xml-apis:xml-apis:jar:1.3.04:compile

      |  +- net.java.dev.stax-utils:stax-utils:jar:20060502:compile

      |  \- org.springframework:spring-aspects:jar:2.5.6:compile

      |     +- org.aspectj:aspectjrt:jar:1.6.1:compile

      |     +- org.aspectj:aspectjweaver:jar:1.6.1:compile

      |     \- commons-logging:commons-logging:jar:1.1.1:compile

      +- edu.utah.further.core:core-data-oracle:jar:1.0.0-SNAPSHOT:compile

      |  +- edu.utah.further.core:core-data:jar:1.0.0-SNAPSHOT:compile

      |  |  +- org.springframework:spring-aop:jar:2.5.6:compile

      |  |  +- edu.utah.further.core:core-query:jar:1.0.0-SNAPSHOT:compile

      |  |  +- javax.persistence:com.springsource.javax.persistence:jar:1.99.0:

      compile

      |  |  +- javax.transaction:com.springsource.javax.transaction:jar:1.1.0:c

      ompile

      |  |  +- org.hibernate:com.springsource.org.hibernate:jar:3.3.1.GA:compil

      e

      |  |  |  +- org.apache.commons:com.springsource.org.apache.commons.collec

      tions:jar:3.2.0:compile

      |  |  |  +- org.antlr:com.springsource.antlr:jar:2.7.6:compile

      |  |  |  +- org.jboss.javassist:com.springsource.javassist:jar:3.3.0.ga:c

      ompile

      |  |  |  +- org.jgroups:com.springsource.org.jgroups:jar:2.2.8:compile

      |  |  |  |  +- edu.oswego.cs.concurrent:com.springsource.edu.oswego.cs.dl

      .util.concurrent:jar:1.3.4:compile

      |  |  |  |  \- org.apache.log4j:com.springsource.org.apache.log4j:jar:1.2

      .15:compile

      |  |  |  +- net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3

      :compile

      |  |  |  +- org.dom4j:com.springsource.org.dom4j:jar:1.6.1:compile

      |  |  |  +- org.objectweb.asm:com.springsource.org.objectweb.asm:jar:1.5.

      3:compile

      |  |  |  \- org.objectweb.asm:com.springsource.org.objectweb.asm.attrs:ja

      r:1.5.3:compile

      |  |  +- org.hibernate:com.springsource.org.hibernate.annotations:jar:3.4

      .0.GA:compile

      |  |  |  \- org.hibernate:com.springsource.org.hibernate.annotations.comm

      on:jar:3.3.0.ga:compile

      |  |  +- org.hibernate:com.springsource.org.hibernate.ejb:jar:3.4.0.GA:co

      mpile

      |  |  |  \- org.jboss.util:com.springsource.org.jboss.util:jar:2.0.4.GA:c

      ompile

      |  |  +- org.springframework:org.springframework.orm:jar:2.5.6:compile

      |  |  |  \- org.springframework:org.springframework.transaction:jar:2.5.6

      :compile

      |  |  +- org.apache.commons:com.springsource.org.apache.commons.dbcp:jar:

      1.2.2.osgi:compile

      |  |  |  \- org.apache.commons:com.springsource.org.apache.commons.pool:j

      ar:1.3.0:compile

      |  |  +- jcs:jcs:jar:20030822.182132:compile

      |  |  \- org.springframework:org.springframework.jdbc:jar:2.5.6:compile

      |  +- com.oracle:ojdbc6:jar:11.1.0.7.0:compile

      |  +- com.oracle:xdb:jar:11.1.0.7.0:compile

      |  +- com.oracle:xmlparserv2:jar:11.1.0.7.0:compile

      |  \- com.mchange.c3p0:com.springsource.com.mchange.v2.c3p0:jar:0.9.1.2:c

      ompile

      +- edu.utah.further.mdr:mdr-api:jar:1.0.0-SNAPSHOT:compile

      |  +- edu.utah.further.core:core-metadata:jar:1.0.0-SNAPSHOT:compile

      |  +- edu.utah.further.dts:dts-api:jar:1.0.0-SNAPSHOT:compile

      |  \- org.basex:basex-xqj:jar:5.0:compile

      +- net.sf.saxon:saxon:jar:9.2-noxpath:runtime

      +- edu.utah.further.dts:dts-impl:jar:1.0.0-SNAPSHOT:runtime

      |  +- org.aspectj:com.springsource.org.aspectj.runtime:jar:1.6.2.RELEASE:

      runtime

      |  +- org.aspectj:com.springsource.org.aspectj.weaver:jar:1.6.2.RELEASE:r

      untime

      |  +- org.springframework.osgi:spring-osgi-core:jar:1.1.3:runtime

      |  |  \- org.springframework.osgi:spring-osgi-io:jar:1.1.3:runtime

      |  +- org.springframework:spring-context:jar:2.5.6:runtime

      |  +- edu.utah.further.party3:party3-apelon:jar:1.0.0-SNAPSHOT:runtime

      |  |  +- com.apelon:apelon-beans:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-message:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-server:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-soap:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-classifier:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-common:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dag:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-graph:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-matchpack:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-selext:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-wizard:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dtsapps:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dtscore:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dtsmc:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dtswfclient:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-dtswfserver:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-wrapper:jar:3.4.1.122:runtime

      |  |  +- com.apelon:apelon-tqlutil:jar:3.4.1.122:runtime

      |  |  +- com.apelon:jaxb-libs:jar:3.4.1.122:runtime

      |  |  +- javax.xml:jax-qname:jar:1.1:runtime

      |  |  +- xalan:xalan:jar:2.7.1:runtime

      |  |  |  \- xalan:serializer:jar:2.7.1:runtime

      |  |  +- xpp3:xpp3:jar:1.1.4c:runtime

      |  |  +- com.thoughtworks.xstream:xstream:jar:1.3:runtime

      |  |  |  \- xpp3:xpp3_min:jar:1.1.4c:runtime

      |  |  +- activemq:xsdlib:jar:20050407:runtime

      |  |  +- relaxngDatatype:relaxngDatatype:jar:20020414:runtime

      |  |  \- mseries:mdateselector:jar:3.4.1.122:runtime

      |  +- cglib:cglib:jar:rc2-1.0:runtime

      |  \- cglib:cglib-nodep:jar:2.1_3:runtime

      +- commons-logging:commons-logging-api:jar:1.1:compile

      +- junit:junit:jar:4.4:test

      +- org.hamcrest:hamcrest-core:jar:1.1:test

      +- org.hamcrest:hamcrest-library:jar:1.1:test

      \- org.springframework:spring-test:jar:2.5.6:test

      -


      BUILD SUCCESSFUL

      -


      Total time: 4 seconds

      Finished at: Tue Sep 01 15:12:57 MDT 2009

      Final Memory: 20M/254M

      -


       

      oren@BMI-FURTHER-SE1 /cygdrive/c/further/app/mdr/mdr-impl

       

      Thanks so much in advance.

        • 1. Re: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory
          Oren Livne Novice

          I tried to create my own osgi bundle around cglib and cglib_nodep and use it in my bundle (including importing net.sf.cglib,net.sf.cglib.*), but that didn't help. I suppose that the cglib Factory class is not found by the OSGi spring context extender bundle. However, I am sure that many people are using cglib in their bundle, and it is also a system bundle (#41 in my installation). So why isn't it found in my bundle?

           

          Here's the latest error message:

           

          further-party3-cglib (1.0.0.SNAPSHOT)

          further-fuse-hibernate (1.0.0.SNAPSHOT)

          CGLIB Code Generation Library (2.1.3)

          smx@root:osgi> update 262

          smx@root:osgi> update 261

          smx@root:osgi> Exception in thread "SpringOsgiExtenderThread-144" org.springfram

          ework.beans.factory.BeanCreationException: Error creating bean with name 'xquery

          Tester': Autowiring of fields failed; nested exception is org.springframework.be

          ans.factory.BeanCreationException: Could not autowire field: protected edu.utah.

          further.mdr.api.util.XQueryDataSource edu.utah.further.examples.fuse.hibernate.t

          est.XQueryTester.xqueryDataSource; nested exception is org.springframework.beans

          .factory.BeanCreationException: Error creating bean with name 'xqueryDataSource'

          defined in URL [bundle://261.0:0/META-INF/spring/fuse-hibernate-context-service

          s.xml]: Instantiation of bean failed; nested exception is net.sf.cglib.core.Code

          GenerationException: java.lang.reflect.InvocationTargetException-->null

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP

          ostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.

          java:243)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.populateBean(AbstractAutowireCapableBeanFactory.java:959)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb

          ject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr

          y.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe

          an(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

          (AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

          (AbstractBeanFactory.java:164)

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.

          preInstantiateSingletons(DefaultListableBeanFactory.java:429)

                  at org.springframework.context.support.AbstractApplicationContext.finish

          BeanFactoryInitialization(AbstractApplicationContext.java:728)

                  at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

          plicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:6

          8)

                  at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

          plicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)

                  at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCus

          tomTCCL(PrivilegedUtils.java:85)

                  at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

          plicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.ja

          va:308)

                  at org.springframework.osgi.extender.internal.dependencies.startup.Depen

          dencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterAp

          plicationContextExecutor.java:138)

                  at java.lang.Thread.run(Thread.java:619)

          Caused by: org.springframework.beans.factory.BeanCreationException: Could not au

          towire field: protected edu.utah.further.mdr.api.util.XQueryDataSource edu.utah.

          further.examples.fuse.hibernate.test.XQueryTester.xqueryDataSource; nested excep

          tion is org.springframework.beans.factory.BeanCreationException: Error creating

          bean with name 'xqueryDataSource' defined in URL [bundle://261.0:0/META-INF/spri

          ng/fuse-hibernate-context-services.xml]: Instantiation of bean failed; nested ex

          ception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.Invocati

          onTargetException-->null

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP

          ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j

          ava:435)

                  at org.springframework.beans.factory.annotation.InjectionMetadata.inject

          Fields(InjectionMetadata.java:105)

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP

          ostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.

          java:240)

                  ... 18 more

          Caused by: org.springframework.beans.factory.BeanCreationException: Error creati

          ng bean with name 'xqueryDataSource' defined in URL [bundle://261.0:0/META-INF/s

          pring/fuse-hibernate-context-services.xml]: Instantiation of bean failed; nested

          exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.Invoc

          ationTargetException-->null

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)

                  at java.security.AccessController.doPrivileged(Native Method)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb

          ject(AbstractBeanFactory.java:264)

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr

          y.getSingleton(DefaultSingletonBeanRegistry.java:222)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe

          an(AbstractBeanFactory.java:261)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

          (AbstractBeanFactory.java:185)

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

          (AbstractBeanFactory.java:164)

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.

          findAutowireCandidates(DefaultListableBeanFactory.java:671)

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.

          resolveDependency(DefaultListableBeanFactory.java:610)

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP

          ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j

          ava:412)

                  ... 20 more

          Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.Invocati

          onTargetException-->null

                  at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato

          r.java:237)

                  at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)

                  at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)

                  at org.springframework.beans.factory.support.CglibSubclassingInstantiati

          onStrategy$CglibSubclassCreator.instantiate(CglibSubclassingInstantiationStrateg

          y.java:116)

                  at org.springframework.beans.factory.support.CglibSubclassingInstantiati

          onStrategy.instantiateWithMethodInjection(CglibSubclassingInstantiationStrategy.

          java:70)

                  at org.springframework.beans.factory.support.SimpleInstantiationStrategy

          .instantiate(SimpleInstantiationStrategy.java:65)

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBean

          Factory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

                  ... 33 more

          Caused by: java.lang.reflect.InvocationTargetException

                  at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

          sorImpl.java:25)

                  at java.lang.reflect.Method.invoke(Method.java:597)

                  at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)

                  at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerato

          r.java:219)

                  ... 39 more

          Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory

                  at java.lang.ClassLoader.defineClass1(Native Method)

                  at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

                  ... 44 more

          Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.Factory

                  at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourc

          eByDelegation(ModuleImpl.java:558)

                  at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleI

          mpl.java:59)

                  at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.

          loadClass(ModuleImpl.java:1427)

                  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

                  ... 46 more

           

          See also the attached context file in META-INF/spring of my bundle.

          • 2. Re: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory
            Oren Livne Novice

            The first bean seems to be fine (abstractFactory). I think it uses cglib as well there too. Why does only the second bean fail? Do I need to change anything in the module that declares that abstract bean whose method is injected here (edu.utah.further.mdr.api.util.XQueryDataSource)? I tried to add net.sf.cglib* there, but it still fails.

            • 3. Re: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory
              Oren Livne Novice

              Solved the Hibernate issues using a truly complicated pattern that includes embedding the Hibernate classes into the bundle using the Felix BND maven plugin.

              • 4. Re: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Factory
                Denys Kurylenko Newbie

                Please take a look to this bug

                Link: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3826

                 

                I gave explanation how to fix this problem.