-->
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.  [ 1 post ] 
Author Message
 Post subject: problem after upgrading to hibernate2.1
PostPosted: Thu Jun 24, 2004 1:09 pm 
Newbie

Joined: Mon Feb 09, 2004 6:45 pm
Posts: 10
Location: Feltre, BL Italy
Hi all.
My working app were using hib 2.0.3 and spring 1.0-m2
After upgrading to hibernate 2.1 and spring 1.0.2
it stopped working, throwing exception
during the init phase.
exception is as follows, and stepping into the hibernate code,
it is thrown at the line:

QUERY_KEY_FACTORY = (QueryCacheKeyFactory) KeyFactory.create(QueryCacheKeyFactory.class);

line 235 of file net.sf.hibernate.impl.SessionFactoryImpl;

I'm wondering what is wrong since applicationContext file
was not changed in the meanwhile, nor the hbm.xml files

Could someone please to the right direction
to address waht the problem is?

best regards,
davide

EXCEPTION:-----------------------------------------------------
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [.\applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalAccessError: null
java.lang.IllegalAccessError
at net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:85)
at net.sf.cglib.core.ClassEmitter.<init>(ClassEmitter.java:77)
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:197)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:63)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:192)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:177)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:149)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:142)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:235)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:436)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:374)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:177)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268)
at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:60)

----------------------------------------------------
APPLICATIONCONTEXT.XML (relevant part of it):
<!-- Local MySQL Datasource -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property>
<property name="url"><value>jdbc:mysql:///test</value></property>
<property name="username"><value>root</value></property>
<property name="password"><value></value></property>
</bean>

<!-- Hibernate SessionFactory -->
<!-- Is bound to the defined data source -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">

<property name="dataSource"><ref local="dataSource"/></property>

<property name="mappingResources">
<list>
<value>barcode/Barcode.hbm.xml</value>
<value>barcode/PurchasedBarcode.hbm.xml</value>
<value>category/Category.hbm.xml</value>
<value>item/Item.hbm.xml</value>
<value>item/PurchasedItem.hbm.xml</value>
<value>pricelist/PriceList.hbm.xml</value>
<value>pricelist/PriceListItem.hbm.xml</value>
<value>pricelist/PurchasedPriceListItem.hbm.xml</value>
<value>reparto/Reparto.hbm.xml</value>
<value>offer/OfferHeader.hbm.xml</value>
<value>offer/OfferRow.hbm.xml</value>
<value>offer/RemovedOfferHeader.hbm.xml</value>
<value>barcode/RemovedBarcode.hbm.xml</value>
<value>promotion/Fidelity.hbm.xml</value>
<value>promotion/Promotion.hbm.xml</value>
<value>promotion/RemovedPromotion.hbm.xml</value>
<value>promotion/prize/Prize.hbm.xml</value>
<value>config/GPVConfig.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>


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

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.