java.lang.NoClassDefFoundError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Hi all, We installed sonar 1.8 on a linux server, connecting to an Oracle database. If we run the sonar:sonar mojo on our development Windows Desktops, everything works fine. When we run the mojo on a Linux machine, we get the error below. The strange thing is that the NoClassDefFoundError does not tell us which class was not found ??? We plan to use sonar from continuum, but it also happens when we run maven from a shell command line. We cleaned up the local repository to be sure that we had the correct jars, but this didn't help. See attached out.txt for full maven output. [FATAL ERROR] org.sonar.mojo.InternalMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.codehaus.sonar.runtime:sonar-core-maven-plugin] urls[0] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/sonar-core-maven-plugin/20090507124450/sonar-core-maven-plugin-20090507124450.jar urls[1] = file:/data01/continuum/repository/org/codehaus/sonar/sonar-commons/1.8/sonar-commons-1.8.jar urls[2] = file:/data01/continuum/repository/org/picocontainer/picocontainer/2.7/picocontainer-2.7.jar urls[3] = file:/data01/continuum/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar urls[4] = file:/data01/continuum/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar urls[5] = file:/data01/continuum/repository/ch/qos/logback/logback-classic/0.9.15/logback-classic-0.9.15.jar urls[6] = file:/data01/continuum/repository/ch/qos/logback/logback-core/0.9.15/logback-core-0.9.15.jar urls[7] = file:/data01/continuum/repository/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar urls[8] = file:/data01/continuum/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar urls[9] = file:/data01/continuum/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar urls[10] = file:/data01/continuum/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar urls[11] = file:/data01/continuum/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar urls[12] = file:/data01/continuum/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar urls[13] = file:/data01/continuum/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar urls[14] = file:/data01/continuum/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar urls[15] = file:/data01/continuum/repository/asm/asm/1.5.3/asm-1.5.3.jar urls[16] = file:/data01/continuum/repository/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar urls[17] = file:/data01/continuum/repository/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga.jar urls[18] = file:/data01/continuum/repository/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar urls[19] = file:/data01/continuum/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar urls[20] = file:/data01/continuum/repository/org/hibernate/hibernate-entitymanager/3.3.1.ga/hibernate-entitymanager-3.3.1.ga.jar urls[21] = file:/data01/continuum/repository/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar urls[22] = file:/data01/continuum/repository/jboss/javassist/3.3.ga/javassist-3.3.ga.jar urls[23] = file:/data01/continuum/repository/jboss/jboss-common-core/2.0.4.GA/jboss-common-core-2.0.4.GA.jar urls[24] = file:/data01/continuum/repository/commons-configuration/commons-configuration/1.5/commons-configuration-1.5.jar urls[25] = file:/data01/continuum/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar urls[26] = file:/data01/continuum/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar urls[27] = file:/data01/continuum/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar urls[28] = file:/data01/continuum/repository/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar urls[29] = file:/data01/continuum/repository/commons-io/commons-io/1.4/commons-io-1.4.jar urls[30] = file:/data01/continuum/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar urls[31] = file:/data01/continuum/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar urls[32] = file:/data01/continuum/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar urls[33] = file:/data01/continuum/repository/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar urls[34] = file:/data01/continuum/repository/org/codehaus/sonar/sonar-plugin-api/1.8/sonar-plugin-api-1.8.jar urls[35] = file:/data01/continuum/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar urls[36] = file:/data01/continuum/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar urls[37] = file:/data01/continuum/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar urls[38] = file:/data01/continuum/repository/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar urls[39] = file:/data01/continuum/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar urls[40] = file:/data01/continuum/repository/org/codehaus/woodstox/woodstox-core-lgpl/4.0.3/woodstox-core-lgpl-4.0.3.jar urls[41] = file:/data01/continuum/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar urls[42] = file:/data01/continuum/repository/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar urls[43] = file:/data01/continuum/repository/pmd/pmd/4.2.5/pmd-4.2.5.jar urls[44] = file:/data01/continuum/repository/ant/ant/1.6/ant-1.6.jar urls[45] = file:/data01/continuum/repository/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar urls[46] = file:/data01/continuum/repository/jdom/jdom/1.0/jdom-1.0.jar urls[47] = file:/data01/continuum/repository/xom/xom/1.0/xom-1.0.jar urls[48] = file:/data01/continuum/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar urls[49] = file:/data01/continuum/repository/xalan/xalan/2.6.0/xalan-2.6.0.jar urls[50] = file:/data01/continuum/repository/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar urls[51] = file:/data01/continuum/repository/junit/junit/4.4/junit-4.4.jar urls[52] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/jdbc-driver/parent/20090507124450/parent-20090507124450.pom urls[53] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/jdbc-driver/classes12-10.2.0.1.0/20090507124450/classes12-10.2.0.1.0-20090507124450.jar urls[54] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/parent/20090507124450/parent-20090507124450.pom urls[55] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-checkstyle-1.8/20090507124450/sonar-plugin-checkstyle-1.8-20090507124450.jar urls[56] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-clover-1.8/20090507124450/sonar-plugin-clover-1.8-20090507124450.jar urls[57] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-cobertura-1.8/20090507124450/sonar-plugin-cobertura-1.8-20090507124450.jar urls[58] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-core-1.8/20090507124450/sonar-plugin-core-1.8-20090507124450.jar urls[59] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-cpd-1.8/20090507124450/sonar-plugin-cpd-1.8-20090507124450.jar urls[60] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-findbugs-1.8/20090507124450/sonar-plugin-findbugs-1.8-20090507124450.jar urls[61] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-googleanalytics-1.8/20090507124450/sonar-plugin-googleanalytics-1.8-20090507124450.jar urls[62] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-javancss-1.8/20090507124450/sonar-plugin-javancss-1.8-20090507124450.jar urls[63] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-pmd-1.8/20090507124450/sonar-plugin-pmd-1.8-20090507124450.jar urls[64] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/plugins/sonar-plugin-surefire-1.8/20090507124450/sonar-plugin-surefire-1.8-20090507124450.jar urls[65] = file:/data01/continuum/repository/org/codehaus/sonar/runtime/rules-extensions/parent/20090507124450/parent-20090507124450.pom urls[66] = file:/data01/continuum/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/usr/local/maven2/lib/maven-2.0.9-uber.jar [FATAL ERROR] org.sonar.mojo.bootstrap.SonarMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.codehaus.sonar:sonar-maven-plugin] urls[0] = file:/data01/continuum/repository/org/codehaus/sonar/sonar-maven-plugin/1.8/sonar-maven-plugin-1.8.jar urls[1] = file:/data01/continuum/repository/commons-io/commons-io/1.4/commons-io-1.4.jar urls[2] = file:/data01/continuum/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar urls[3] = file:/data01/continuum/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar urls[4] = file:/data01/continuum/repository/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar urls[5] = file:/data01/continuum/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/usr/local/maven2/lib/maven-2.0.9-uber.jar [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoClassDefFoundError at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43) at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162) at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135) at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) at org.sonar.commons.database.DriverDatabaseConnector.getEntityManagerFactory(DriverDatabaseConnector.java:134)
    via by Geert Pante,
    • java.lang.NoClassDefFoundError at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:111) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43) at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
    No Bugmate found.