Exception is thrown while Hibernate loads configuration files, I used Hibernate Tools Alpha 4 to generate the xml mapping files, if that helps any. Don't know what caused the exception to be thrown, seems like maybe there is a an extremely long method in the class, but I looke at the class definition and nothing seemd longer then about 20 characters or so. Any ideas?
Hibernate version:
3.1 (latest)
Mapping documents:
There are 1300 of them let me which one you need
Code between sessionFactory.openSession() and session.close():
Code:
Configuration cfg = new Configuration();
cfg.configure("/hibernate.cfg.xml");
SessionFactory sessionFactory = cfg.buildSessionFactory();
Session session = sessionFactory.openSession();
session.close();
Full stack trace of any exception that occurs:Code:
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:236)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:100)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:158)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:88)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:245)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:402)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:213)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:981)
at com.Main.main(Main.java:12)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:218)
... 15 more
Caused by: java.lang.ClassFormatError: Invalid method Code length 107893 in class file com/RPpdmRowQuality$$EnhancerByCGLIB$$24bf1b20
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 20 more
22:51:25,640 WARN PojoTuplizer:170 - could not create proxy factory for:com.RPpdmRowQuality
org.hibernate.HibernateException: CGLIB Enhancement failed: com.RPpdmRowQuality
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:106)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:158)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:88)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:245)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:402)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:213)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:981)
at com.Main.main(Main.java:12)
Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:236)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:100)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:218)
... 15 more
Caused by: java.lang.ClassFormatError: Invalid method Code length 107893 in class file com/RPpdmRowQuality$$EnhancerByCGLIB$$24bf1b20
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 20 more
Name and version of the database you are using:Oracle 10g
The generated SQL (show_sql=true):NA
Debug level Hibernate log excerpt:before exception
Code:
22:51:16,000 DEBUG BasicEntityPersister:2225 - Static SQL for entity: com.LEntComponent
22:51:16,000 DEBUG BasicEntityPersister:2227 - Version select: select ENTITLEMENT_ID, COMPONENT_ID, AREA_ID, AREA_TYPE, BUSINESS_ASSOCIATE, CONTRACT_ID, DATA_SOURCE, DESCRIPTION, ENT_COMP_TYPE, ENT_RULE, FACILITY_ID, FACILITY_TYPE, FIELD_ID, INFORMATION_ITEM_ID, INFO_ITEM_TYPE, INTEREST_SET_ID, LAND_RIGHT_ID, LAND_RIGHT_TYPE, PDEN_ID, PDEN_SOURCE, PDEN_TYPE, RESENT_ID, PPDM_GUID, SEIS_SET_ID, SEIS_SET_TYPE, UWI from PPDM37.L_ENT_COMPONENT where ENTITLEMENT_ID =? and COMPONENT_ID =? and AREA_ID =? and AREA_TYPE =? and BUSINESS_ASSOCIATE =? and CONTRACT_ID =? and DATA_SOURCE =? and DESCRIPTION =? and ENT_COMP_TYPE =? and ENT_RULE =? and FACILITY_ID =? and FACILITY_TYPE =? and FIELD_ID =? and INFORMATION_ITEM_ID =? and INFO_ITEM_TYPE =? and INTEREST_SET_ID =? and LAND_RIGHT_ID =? and LAND_RIGHT_TYPE =? and PDEN_ID =? and PDEN_SOURCE =? and PDEN_TYPE =? and RESENT_ID =? and PPDM_GUID =? and SEIS_SET_ID =? and SEIS_SET_TYPE =? and UWI =?
22:51:16,000 DEBUG BasicEntityPersister:2228 - Snapshot select: select lentcompon_.ENTITLEMENT_ID, lentcompon_.COMPONENT_ID, lentcompon_.AREA_ID, lentcompon_.AREA_TYPE, lentcompon_.BUSINESS_ASSOCIATE, lentcompon_.CONTRACT_ID, lentcompon_.DATA_SOURCE, lentcompon_.DESCRIPTION, lentcompon_.ENT_COMP_TYPE, lentcompon_.ENT_RULE, lentcompon_.FACILITY_ID, lentcompon_.FACILITY_TYPE, lentcompon_.FIELD_ID, lentcompon_.INFORMATION_ITEM_ID, lentcompon_.INFO_ITEM_TYPE, lentcompon_.INTEREST_SET_ID, lentcompon_.LAND_RIGHT_ID, lentcompon_.LAND_RIGHT_TYPE, lentcompon_.PDEN_ID, lentcompon_.PDEN_SOURCE, lentcompon_.PDEN_TYPE, lentcompon_.RESENT_ID, lentcompon_.PPDM_GUID, lentcompon_.SEIS_SET_ID, lentcompon_.SEIS_SET_TYPE, lentcompon_.UWI from PPDM37.L_ENT_COMPONENT lentcompon_ where lentcompon_.ENTITLEMENT_ID=? and lentcompon_.COMPONENT_ID=? and lentcompon_.AREA_ID=? and lentcompon_.AREA_TYPE=? and lentcompon_.BUSINESS_ASSOCIATE=? and lentcompon_.CONTRACT_ID=? and lentcompon_.DATA_SOURCE=? and lentcompon_.DESCRIPTION=? and lentcompon_.ENT_COMP_TYPE=? and lentcompon_.ENT_RULE=? and lentcompon_.FACILITY_ID=? and lentcompon_.FACILITY_TYPE=? and lentcompon_.FIELD_ID=? and lentcompon_.INFORMATION_ITEM_ID=? and lentcompon_.INFO_ITEM_TYPE=? and lentcompon_.INTEREST_SET_ID=? and lentcompon_.LAND_RIGHT_ID=? and lentcompon_.LAND_RIGHT_TYPE=? and lentcompon_.PDEN_ID=? and lentcompon_.PDEN_SOURCE=? and lentcompon_.PDEN_TYPE=? and lentcompon_.RESENT_ID=? and lentcompon_.PPDM_GUID=? and lentcompon_.SEIS_SET_ID=? and lentcompon_.SEIS_SET_TYPE=? and lentcompon_.UWI=?
22:51:16,000 DEBUG BasicEntityPersister:2230 - Insert 0: insert into PPDM37.L_ENT_COMPONENT (ENTITLEMENT_ID, COMPONENT_ID, AREA_ID, AREA_TYPE, BUSINESS_ASSOCIATE, CONTRACT_ID, DATA_SOURCE, DESCRIPTION, ENT_COMP_TYPE, ENT_RULE, FACILITY_ID, FACILITY_TYPE, FIELD_ID, INFORMATION_ITEM_ID, INFO_ITEM_TYPE, INTEREST_SET_ID, LAND_RIGHT_ID, LAND_RIGHT_TYPE, PDEN_ID, PDEN_SOURCE, PDEN_TYPE, RESENT_ID, PPDM_GUID, SEIS_SET_ID, SEIS_SET_TYPE, UWI) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
22:51:16,000 DEBUG BasicEntityPersister:2231 - Update 0: null
22:51:16,000 DEBUG BasicEntityPersister:2232 - Delete 0: delete from PPDM37.L_ENT_COMPONENT where ENTITLEMENT_ID=? and COMPONENT_ID=? and AREA_ID=? and AREA_TYPE=? and BUSINESS_ASSOCIATE=? and CONTRACT_ID=? and DATA_SOURCE=? and DESCRIPTION=? and ENT_COMP_TYPE=? and ENT_RULE=? and FACILITY_ID=? and FACILITY_TYPE=? and FIELD_ID=? and INFORMATION_ITEM_ID=? and INFO_ITEM_TYPE=? and INTEREST_SET_ID=? and LAND_RIGHT_ID=? and LAND_RIGHT_TYPE=? and PDEN_ID=? and PDEN_SOURCE=? and PDEN_TYPE=? and RESENT_ID=? and PPDM_GUID=? and SEIS_SET_ID=? and SEIS_SET_TYPE=? and UWI=?
22:51:25,625 ERROR BasicLazyInitializer:104 - CGLIB Enhancement failed: com.RPpdmRowQuality