Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 654399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:29:24+00:00 2026-05-13T22:29:24+00:00

I am trying to a run an application with Hibernate annotation. I am getting

  • 0

I am trying to a run an application with Hibernate annotation. I am getting the following exception

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: net.sf.cglib.core.DebuggingClassWriter$1
Exception in thread "main" java.lang.ExceptionInInitializerError
   at tapes.test.validation.SessionUtil.<clinit>(SessionUtil.java:17)
   at java.lang.Class.initializeClass(libgcj.so.90)
   at tapes.test.validation.LuceneSearch.dbFullIndex(LuceneSearch.java:34)
   at tapes.test.validation.LuceneSearch.main(LuceneSearch.java:143)
Caused by: java.lang.NoClassDefFoundError: net.sf.cglib.core.DebuggingClassWriter$1
   at java.lang.Class.initializeClass(libgcj.so.90)
   at net.sf.cglib.core.DebuggingClassWriter.toByteArray(DebuggingClassWriter.java:73)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:26)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
   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.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
   at java.lang.Class.initializeClass(libgcj.so.90)
   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 tapes.test.validation.SessionUtil.<clinit>(SessionUtil.java:14)
   ...3 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.util.TraceClassVisitor not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/tomcat/webapps/SearchDoctors/Webcontent/WEB-INF/classes/,file:/usr/local/tomcat/webapps/SearchDoctors/WEB-INF/lib/ant-1.6.5.jar,file:/usr/local/tomcat/webapps/SearchDoctors/WEB-INF/lib/ant-antlr-1.6.5.jar,file:/usr/local/tomcat/webapps/SearchDoctors/WEB-INF/lib/ant-junit-1.6.5.jar,file:/usr/local/tomcat/webapps/SearchDoctors/WEB-INF/lib/ant-launcher-.....

Here is the code.

public static void  dbFullIndex() throws CorruptIndexException, LockObtainFailedException, IOException{
        try{
            directory = FSDirectory.getDirectory("/home/athreya/luceneindex/docsIndexFile");
            //Index of the User Table--> /home/araghu/aditya/indexFile
            Session session = SessionUtil.getSessionFactory().getCurrentSession();
            if(IndexReader.indexExists(directory)){
                writer = new IndexWriter(directory, new StandardAnalyzer(),true);
                System.out.println("Index exists");
            }
            else{
                writer = new IndexWriter(directory, new StandardAnalyzer(),true);
                System.out.println("Index doesn't Exist");
            }
            session.beginTransaction();
            org.hibernate.Query query = session.createQuery("from Doctors");
            java.util.List docList = query.list();
            session.getTransaction().commit();
            for( int iter=0;iter< docList.size();iter++){
                Doctors docs=(Doctors) docList.get(iter);
                String pkid=docs.getId()+"";
                String indexString= docs.getFirstName()+" "+docs.getMiddleName()+" "+docs.getLastName()+
                " "+docs.getAddress()+" "+docs.getCity()+" "+docs.getHospitalNames()+" "+docs.getSpecialization()+" "
                +docs.getQualification()+" "+docs.getNatProId();
                //String specialString =docs.getSpecialization()+" "+docs.getHospitalNames();
                writer.addDocument(createDoc(indexString,pkid));
                System.out.println("Name ="+ docs.getFirstName());
                //  writer.addDocument(createSpDoc(specialString));
            }
            writer.close();
        }catch(Exception e){
            e.printStackTrace();
        }
    }       

Can anyone please explain me the problem. I have the cglib jar in place in the lib. my java_home is set as follows — export JAVA_HOME=/usr/jdk1.6.0_18/

Please Help I’m struggling with this for a long time.

Thanks,
Aditya

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:29:25+00:00Added an answer on May 13, 2026 at 10:29 pm

    Thanks a lot everyone! The problem was the default version in Eclipse was different from the JAVA_HOME path. I guess this was the problem. Its fine now. If there are any more problems I know where that you guys are there for me. Thanks a lot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a simple Hibernate application, but I get this error: org.hibernate.exception.SQLGrammarException:
I'm trying to run my app on Mono and I'm getting the following error.
I am trying to run an application that normally works when I install on
I was trying to run my application and check for some output on the
I am working on a UNIX box, and trying to run an application, which
I am trying to run a simple multiple processes application in Python. The main
I am trying to run a simple SQLITE application on Windows Mobile developed with
We are trying to run shark on our iphone application. However, in the analyzed
I am trying to run an action when the application starts. The action checkAtStart
I'm trying to run an ASP.NET 2.0 application on an XP machine. As far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.