From: <leg...@at...> - 2003-10-15 11:48:22
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 15 Oct 2003 6:47 AM Body: This is nothing to do with the reflection optimizer. Hibernate is trying to create a -proxy- factory in this section of code. I strongly suspect that your class is mapped with a proxy, but cannot be proxied in any version of Hibernate. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 5:32 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-15 12:00:20
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Wed, 15 Oct 2003 6:59 AM Body: Sorry, my mistake. My classes uses proxy. Why proxy with this class cannot be used with 2.1beta4? It worked perfectly in 2.1beta3 and before. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 6:56 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-15 12:15:19
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Wed, 15 Oct 2003 7:15 AM Body: I checked everything again. My class is mapped with a proxy and because of this reason fails in 2.1beta4. The same class with completely the same mapping works perfectly with Hibernate versions prior to 2.1beta4. The same class mapped without proxy works in 2.1beta4. Is this a bug or are there new conditions, under which class can be mapped with a proxy? Dominik --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 6:56 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-15 13:03:20
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 15 Oct 2003 8:02 AM Body: I stronly suspect that the only difference is that it now fails "earlier". I bet that previously Hibernate did not actually instantiate any proxy. (eg. you only used find() to get instances of the class). --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 6:56 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-15 14:38:35
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Wed, 15 Oct 2003 9:38 AM Body: We definitely did instantiate proxies for classes, which now cause failure. For the concrete example we used: session.load(PersonEntity.class, new Long(2334)); It worked perfectly fine. Look at the attached PartyEntity.hbm.xml --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 6:56 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-15 14:48:21
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Wed, 15 Oct 2003 9:47 AM Body: Just one idea: Persistent class PersonEntity, which fails in 2.1beta4 has one speciality. It is mapped as joined subclass and it's parametereless constructor sets value of one of its property, which is mapped with Hibernate. Maybe bacause if this reason Hibernate (in fact CGLIB) in beta4 cannot create proxy factory. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Wed, 15 Oct 2003 6:56 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-10-20 09:29:18
|
The following comment has been added to this issue: Author: Dominik Roblek Created: Mon, 20 Oct 2003 3:56 AM Body: Thanks for help. The problem really appeared because of CGLIB tried to instantiate an instance of the instrumented class and this instantiation was not possible at the Hibernate configuration time because of poor design of my class. I fixed it and now it works fine. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-401 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-401 Summary: reflection optimizer bug Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.1 beta 4 Assignee: Gavin King Reporter: Dominik Roblek Created: Wed, 15 Oct 2003 5:32 AM Updated: Sat, 18 Oct 2003 6:29 AM Description: I have some persistent classes, which cannot be instrumented with CGLIB reflection optimizer. In Hibernate versions prior to 2.1beta4 I've got the following correct log messages and everything worked fine: --- 14:26:48,230 INFO [:] SessionFactoryImpl:109 - building session factory 14:26:57,507 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.PersonEntity, NullPointerException: null 14:26:59,175 INFO [:] ReflectHelper:328 - reflection optimizer disabled for: si.marand.maf.server.jastreb.party.module.entity.BankEntity, NullPointerException: null 14:27:06,349 INFO [:] SessionFactoryObjectFactory:86 - Factory name: maf-server-hibernate-sessionFactory --- But in version 2.1beta4 is instead of this in the same phase of startup process thrown an exception, which stops application. The excerption from log it here: --- 12:18:51,464 ERROR [:] LazyInitializer:62 - CGLIB Enhancement failed net.sf.cglib.CodeGenerationException at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:200) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:186) at net.sf.cglib.ReflectUtils.newInstance(ReflectUtils.java:181) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:222) at net.sf.cglib.Enhancer.enhance(Enhancer.java:149) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:52) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:754) at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:737) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:63) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:132) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:660) ... --- Besides of this bug it seems, that hibernate.cglib.use_reflection_optimizer setting is ignored in beta4 and "true" is allways used as it's value. Dominik --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |