java.lang.NoClassDefFoundError

AppFuse JIRA | Matt Raible | 1 decade ago
  1. 0

    Moved from java.net: https://appfuse.dev.java.net/issues/show_bug.cgi?id=73 I tried to install appfuse.war on Sun AppServer 8 (2004Q4 BETA). After setting up the JNDI name for jdbc/appfuse, I tried to deploy the war and when I ran the verifier, I got the following error. Test Name : tests.web.WebArchiveClassesLoadable Test Assertion : All classes in this Web Archive are loadable. Please refer to J2EE 1.4 Specification Section #8.1.2 for further information. Test Description : For [ /appfuse ] Error: [ class antlr.DefaultFileLineFormatter has interface antlr.FileLineFormatter as super class ] class used in [ antlr.DefaultFileLineFormatter ] class cannot be found within this jar [ appfuse ]. Error: Definition for [ org.codehaus.aspectwerkz.hook.ClassPreProcessor ] class used in [ net.sf.cglib.transform.hook.AbstractPreProcessor ] class could not be found within [ appfuse ]. ------- Additional comments from mraible Sat Oct 9 20:34:13 +0000 2004 ------- After building WAR against Tomcat 4.1.x (to remove <dispatcher>FORWARD</dispatcher> elements), and changing DataSource's jndi-name in web/WEB-INF/applicationContext-resources.xml to simply "jdbc/appfuse" - when I tried to deploy, it worked. However, then the app started up - the following exception occurred: [#|2004-10-09T14:30:42.703-0600|INFO|sun-appserver-pe8.1|javax.enterprise.system.stream.out|_ThreadI D=14;|[appfuse] ERROR [httpWorkerThread-8081-9] ContextLoader.initWebApplicationContext(108) | Conte xt initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto ry' defined in file [C:\Tools\sun-appserver-8.0\domains\domain1\applications\j2ee-modules\appfuse\WE B-INF\applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lan g.NoClassDefFoundError: null java.lang.NoClassDefFoundError at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215) at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:236) ------- Additional comments from mraible Wed Nov 10 16:12:17 +0000 2004 ------- Here's instructions for setting up Roller on Sun AppServer 8. Since they both use the same server configuration settings (JDBC Authentication, JNDI DataSource), it should be easy to use this and setup AppFuse too. http://blogs.sun.com/roller/page/akihito/20041109#roller_weblogger_now_runs_on ------- Additional comments from sjivan Thu Mar 10 23:52:44 +0000 2005 ------- java.lang.NoClassDefFoundError at net.sf.cglib.core.KeyFactory$Generator.generateClass occurs due to a lack of permission. You only need to add the following permissions to the config/server.policy file in order to run on Sun AppServer : permission java.lang.RuntimePermission "getProtectionDomain"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; If you're using ecache, add the following permssion as well. permission java.io.FilePermission "${java.io.tmpdir}${/}- ", "read,write,delete"; ------- Additional comments from mraible Mon Apr 18 05:06:31 +0000 2005 ------- This should be possible - I think it's just a matter of someone trying the instructions noted in this bug. Notice that nothing in AppFuse has to change, the steps just need to be documented. I'm reducing the priority and milestone of this bug since we get few requests for AppFuse to run on Sun's App Server. ------- Additional comments from mraible Mon Apr 18 05:06:56 +0000 2005 ------- Wrong Priority - P5 is least important.

    AppFuse JIRA | 1 decade ago | Matt Raible
    java.lang.NoClassDefFoundError
  2. 0

    Spring Transactional and CGLIB Proxy

    Stack Overflow | 3 years ago | Malvon
    java.lang.NoClassDefFoundError: net/sf/cglib/asm/util/TraceClassVisitor
  3. 0

    User - NoClassDefFoundError on ASM

    nabble.com | 1 year ago
    java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Random deployment error

    nexopen | 9 years ago | ytnash
    java.lang.NoClassDefFoundError: net/sf/cglib/core/DefaultNamingPolicy
  6. 0

    JasperServer 1.2 | Jaspersoft Community

    jaspersoft.com | 8 months ago
    java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.core.ReflectUtils

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      No message provided

      at net.sf.cglib.core.KeyFactory$Generator.generateClass()
    2. Code Generation Library
      KeyFactory.create
      1. net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
      2. net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
      3. net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
      4. net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
      5. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
      6. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
      7. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
      7 frames
    3. net.sf.hibernate
      SessionFactoryImpl.<clinit>
      1. net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:236)
      1 frame