-->
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: CGLIB exceptions when redeploying EARs in JBoss
PostPosted: Thu Feb 12, 2004 7:41 am 
Newbie

Joined: Tue Oct 07, 2003 3:58 pm
Posts: 16
Location: Netherlands
Hello

I'm using Hibernate 2 in JBoss.
hibernate2.jar and all 3rd party libs are in server/default/lib.
when JBoss is started fresh and application is deployed first time, it's OK
when I work with app and then redeploy it, I'm getting the following exception

net.sf.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.vocognition.project.ige.domain.IgeSessionState.setMission
at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:216)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2137)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:239)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:57)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:49)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:420)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1918)
at net.sf.hibernate.impl.SessionImpl.internalLoadOneToOne(SessionImpl.java:1872)
at net.sf.hibernate.type.OneToOneType.resolveIdentifier(OneToOneType.java:71)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:215)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2132)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:239)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at net.sf.hibernate.loader.SimpleEntityLoader.load(SimpleEntityLoader.java:58)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:420)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1967)
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1985)


when I set hibernate.cglib.use_reflection_optimizer=false, it looks like this

net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.vocognition.project.ige.domain.IgeSessionState.mission
at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:68)
at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:225)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2137)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:239)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:57)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:49)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:420)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1918)
at net.sf.hibernate.impl.SessionImpl.internalLoadOneToOne(SessionImpl.java:1872)
at net.sf.hibernate.type.OneToOneType.resolveIdentifier(OneToOneType.java:71)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:215)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2132)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:239)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at net.sf.hibernate.loader.SimpleEntityLoader.load(SimpleEntityLoader.java:58)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:420)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1967)
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1985)


all these problems DISAPPEAR when I put hibernate2.jar and 3rd party libs in same EAR
however it's not convenient because "recompile-redeploy" time of <10 seconds becomes >30 seconds

is there any good way around this?

thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 9:39 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
I do not see the cause, but I think it is ClassCastExeption.
You need to drop old configuration after reploy and to configure a new SessionFactory,
I think it stores references to old model classes and it will cause memory leaks too, if you do not redeploy hibernate itself.

BTW, try to develop outside container, it is one of the most useful hibernate features (POJO and testability).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 10:16 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Check the forum, somebody has the same problem recently. I can remember it's a JBOSS bug solved in the CVS (You'll have to check to be sure).

_________________
Emmanuel


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.