-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Problem when migrating from Hibernate 2.0.3 to 2.1.2
PostPosted: Fri Apr 16, 2004 3:10 am 
Beginner
Beginner

Joined: Thu Dec 04, 2003 3:47 am
Posts: 31
Location: Hong Kong
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2004 5:24 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I am quite sure there are still old jar files in your classpath somewhere.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 18, 2004 10:07 pm 
Beginner
Beginner

Joined: Thu Dec 04, 2003 3:47 am
Posts: 31
Location: Hong Kong
Rite! Thank michael, after I re-arrange all the jar files, it works! Just don't know which old jar file causes the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.