I have applications using Hibernate 2.0.3 which works fine. When I'm trying to upgrade to Hibernate 2.1.2 (with some code modifications about Expression, Criteria etc.), the code can compile but it has exception when I first try to open a session, here is the capture of the exceptions
Code:
2004-04-16 14:52:02,946 ERROR [main] ALSComponent.prepare(): prepare: failed to initialize hibernate session
org.astri.inos.pes.service.SessionException: Unable to configure a new SessionFactory
at org.astri.inos.pes.service.SessionFactoryImpl.getSessionFactory(SessionFactoryImpl.java:29)
at org.astri.inos.pes.service.SessionFactoryImpl.newSession(SessionFactoryImpl.java:15)
at org.astri.ims.ccs.als.ALSComponent.prepare(ALSComponent.java:184)
at org.astri.ims.ccs.CCSMain.prepareComponents(CCSMain.java:150)
at org.astri.ims.ccs.CCSMain.startServer(CCSMain.java:236)
at org.astri.ims.ccs.CCSMain.main(CCSMain.java:297)
Caused by: java.lang.IllegalAccessError
at net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:87)
at net.sf.cglib.core.ClassEmitter.<init>(ClassEmitter.java:79)
at net.sf.cglib.reflect.FastClassEmitter.<init>(FastClassEmitter.java:91)
at net.sf.cglib.reflect.FastClass$Generator.generateClass(FastClass.java:100)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:63)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:190)
at net.sf.cglib.reflect.FastClass$Generator.create(FastClass.java:92)
at net.sf.cglib.reflect.FastClass.create(FastClass.java:74)
at net.sf.hibernate.type.ComponentType.<init>(ComponentType.java:113)
at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:886)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:286)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:973)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:928)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856)
at org.astri.inos.pes.service.SessionFactoryImpl.getSessionFactory(SessionFactoryImpl.java:26)
... 5 more
I have replaced the old .jar files with c3p0-0.8.3.jar and cglib-2.0-rc2.jar, any ideas how to solve?