-->
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: Cannot subclass final class
PostPosted: Tue Jan 18, 2005 7:01 am 
Newbie

Joined: Wed Aug 04, 2004 6:19 am
Posts: 9
[b]Hibernate version: 3.0a[/b]

Just in case someone is as stupid as me.
I got the following error message:

18.01.2005 11:43:45 ERROR - CGLIB Enhancement failed: de.ifbfag.crk.bl.cashflowgen.zusatzzahlung.conf.Bonus
java.lang.IllegalArgumentException: Cannot subclass final class class de.ifbfag.crk.bl.cashflowgen.zusatzzahlung.conf.Bonus
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:438)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:597)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:76)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:38)
at org.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:455)
at org.hibernate.persister.BasicEntityPersister.<init>(BasicEntityPersister.java:350)
at org.hibernate.persister.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:99)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:44)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:188)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:990)


The solution is quite simple. The corresponding java class was final:

public final class A extends B

and so the cglib optimizer is unable to subclass class A.

Yours,
pgrau


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.