If you getting bellow exception while executing project. Reason behind this add asm jar in your lib folder either add maven dependency in pom.xml :-
asm asm-all 3.1
Initial Session factory createion Errororg/objectweb/asm/Type Exception in thread "main" java.lang.ExceptionInInitializerError at com.javastoreroom.session.config.HibernateUtils.(HibernateUtils.java:16) at com.javastoreroom.dao.PropertiesDAOImpl.persistContent(PropertiesDAOImpl.java:17) at com.javastoreroom.properties.Main.ReadProperties.main(ReadProperties.java:24) Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180) at net.sf.cglib.core.KeyFactory. (KeyFactory.java:66) at net.sf.cglib.proxy.Enhancer. (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. (AbstractEntityTuplizer.java:135) at org.hibernate.tuple.entity.PojoEntityTuplizer. (PojoEntityTuplizer.java:55) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping. (EntityEntityModeToTuplizerMapping.java:56) at org.hibernate.tuple.entity.EntityMetamodel. (EntityMetamodel.java:302) at org.hibernate.persister.entity.AbstractEntityPersister. (AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister. (SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl. (SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at com.insonix.session.config.HibernateUtils. (HibernateUtils.java:12) ... 2 more Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 19 more
No comments:
Post a Comment