I had the same problem, which basically means the version of org.objectweb.asm.ClassWriter at runtime is different than that at compile time.
I got around this by reodering the libs, moving Hibernate ahead of Spring Framework 2.5. Hope this helps. - Right click SpringHibernateDaoInjection project and select Properties. - Observe that Project Properties dialog box appears. - Select Libraries under Categories on the left. - Select Hibernate, click Move up and move it pass Spring On Jun 19, 12:44 pm, JoshLucas <pxk5...@njit.edu> wrote: > I keep trying to run the first lab exercise and I keep getting this > error: > > Initial SessionFactory creation failed.java.lang.NoSuchMethodError: > org.objectweb.asm.ClassWriter.<init>(I)V > Exception in thread "main" java.lang.ExceptionInInitializerError > at HibernateUtil.<clinit>(HibernateUtil.java:32) > at Main.main(Main.java:10) > Caused by: java.lang.NoSuchMethodError: > org.objectweb.asm.ClassWriter.<init>(I)V > at net.sf.cglib.core.DebuggingClassWriter.<init> > (DebuggingClassWriter.java:47) > at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter > (DefaultGeneratorStrategy.java:30) > at net.sf.cglib.core.DefaultGeneratorStrategy.generate > (DefaultGeneratorStrategy.java:24) > at net.sf.cglib.core.AbstractClassGenerator.create > (AbstractClassGenerator.java:216) > at net.sf.cglib.core.KeyFactory$Generator.create > (KeyFactory.java:144) > at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116) > 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 > 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:295) > 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:1294) > at HibernateUtil.<clinit>(HibernateUtil.java:28) > ... 1 more > > I imported all the proper libraries. I don't understand why I keep on > getting this error. Is anyone else experiencing this? How should it be > resolved? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---