Announcement Announcement Module
No announcement yet.
NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor

    I did not change anything about this part of the code but it does not work anymore... Although i see the result of the query at server side, i get an exception at client side...

    Please help me.

    Here is the exception i get :

    java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at n Source)
    at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.access$100(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader$ Source)
    at Method)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at net.sf.hibernate.proxy.SerializableProxy.readResol ve(
    at $Proxy12.getTermsAsTrainee(Unknown Source)
    at .CurrentProgramController.queryCurrentTerms(Curren
    at .CurrentProgramController.startUp(CurrentProgramCo
    at com.ayesas.intranet.client.infra.navigation.Naviga tionView$NavigationNodeMouseListener.mouseClicked(

    This is the line referred as

    List lstTermsAsTrainee = this.getTdbProgramDao().getTermsAsTrainee(userCurrent);

    And this is TdbProgramDao.getTermsAsTrainee
    public List getTermsAsTrainee(User user) throws DataAccessException{
              log.debug("\n\n\n.....getTermsAsTrainee user =" + user);
                        String strQuery = "select term from TdbProgramTermTrainee trainee ";
                        strQuery = strQuery + "join trainee.parentTerm term ";
                        strQuery = strQuery + "join trainee.traineeUser user ";
                        strQuery = strQuery + "where" + user.getId();
                        log.debug("strQuery = " + strQuery);
                        List resultObjects = getHibernateTemplate().find(strQuery);
                        log.debug("calls Utility.hibernateInitializeObjectGraph");
                        Utility.hibernateInitializeObjectGraph(resultObjects, getHibernateTemplate());
                        log.debug("returns resultObjects =" + resultObjects);
                        return resultObjects;		
    public static void hibernateInitializeObjectGraph(Object object, 				HibernateTemplate template) {
              new HibernateObjectGraphInitalizer().initialize(object,      template);

    Here is the server side output :

    .....getTermsAsTrainee user =Ugurlu Orhan
    [DEBUG][training.TdbProgramDaoImpl] strQuery = select term from TdbProgramTermTrainee trainee join trainee.parentTerm term join trainee.traineeUser user where

    [DEBUG][training.TdbProgramDaoImpl] calls Utility.hibernateInitializeObjectGraph

    [DEBUG][training.TdbProgramDaoImpl] returns resultObjects =[1.:TERM id=127, parentProgramId=114 Instructor=13-Esmer Betul, Trainees=[id=135, user=Ugurlu Orhan, attendance=false]][/code]

  • #2
    You are missing the cglib library on the client side - you can get it from teh spring-with-dependencies.jar.


    • #3
      It works on the development environment, but does not work after i deployed on the real server... I checked the build files, all libraries are copied, there is not any exclude.

      Finally i dropped the term trainee table, and deployed again. There is not any problem now. But i wonder why???? I could not find any reasonable explanation for the problem which means it can happen again. This is truly disturbing...


      • #4
        It's ClassPathRelated plus in case of JavaWebStart (I saw you are using jnpl) there might be some caching involved. Try to do the deployment several times on several machines in order to spot the problem.