net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165]

Atlassian JIRA | rajneesh sharma | 3 years ago
  1. 0

    Please give me more info on what went wrong here, and how to resolve it. I see the following on my Bamboo pages - Bamboo failed to run the backup on 06 Jul 2013. See the logs for further details. I see the following on my bamboo server (/opt/bamboo/atlassian-bamboo-4.4.4/logs/atlassian-bamboo.log) - 2013-07-06 00:12:10,692 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper@2ff18952 2013-07-06 00:12:10,724 ERROR [QuartzScheduler_Worker-9] [LazyInitializer] Exception initializing proxy net.sf.hibernate.ObjectNotFoundException: No row with the given identifier exists: 3375165, of class: com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl at net.sf.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:24) at net.sf.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1948) at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:53) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$c1601371.getPlanResultKey(<generated>) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:87) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:27) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:98) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:149) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:128) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportData(ConsumedSubscriptionMapper.java:133) at com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:499) at com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:429) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629) at com.atlassian.bamboo.migration.XmlMigrator$$EnhancerByCGLIB$$8177804.exportXml(<generated>) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooExport(ImportExportManagerImpl.java:94) at com.atlassian.bamboo.configuration.ScheduledBackupJob.execute(ScheduledBackupJob.java:74) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) 2013-07-06 00:12:10,746 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Ensuring the the file has been unmounted 2013-07-06 00:12:10,746 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Unmounted /mnt/external/bamboo/atlassian-bamboo-4.4.4/backups/bamboo_backup_2013_07_06.zip 2013-07-06 00:12:10,749 INFO [QuartzScheduler_Worker-9] [ServerLifecycleManagerImpl] Server state changed to 'RUNNING' from 'PAUSED' 2013-07-06 00:12:10,749 ERROR [QuartzScheduler_Worker-9] [ScheduledBackupJob] net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165] net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$c1601371.getPlanResultKey(<generated>) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:87) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:27) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:98) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:149) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:128) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportData(ConsumedSubscriptionMapper.java:133) at com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:499) at com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:429) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) +++++++++++++++++++++++++ I also see the following - [root@ip-10-170-101-34 atlassian-bamboo-4.4.4]# cd /mnt/external/bamboo/atlassian-bamboo-4.4.4/backups [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# ls -lrt total 9640 -rw-r--r--. 1 bamboo bamboo 4430460 Mar 16 00:01 bamboo_backup_2013_03_16.zip -rw-rw-r--. 1 bamboo bamboo 142132 Mar 23 00:01 bamboo_backup_2013_03_23.zip -rw-rw-r--. 1 bamboo bamboo 195266 Mar 30 00:01 bamboo_backup_2013_03_30.zip -rw-r--r--. 1 bamboo bamboo 273492 Apr 6 00:01 bamboo_backup_2013_04_06.zip -rw-r--r--. 1 bamboo bamboo 418151 Apr 13 00:01 bamboo_backup_2013_04_13.zip -rw-r--r--. 1 bamboo bamboo 176225 Apr 20 00:01 bamboo_backup_2013_04_20.zip -rw-rw-r--. 1 bamboo bamboo 185179 Apr 27 00:01 bamboo_backup_2013_04_27.zip -rw-rw-r--. 1 bamboo bamboo 204153 May 4 01:00 bamboo_backup_2013_05_04.zip -rw-rw-r--. 1 bamboo bamboo 231989 May 11 01:00 bamboo_backup_2013_05_11.zip -rw-rw-r--. 1 bamboo bamboo 295644 May 18 01:00 bamboo_backup_2013_05_18.zip -rw-rw-r--. 1 bamboo bamboo 322224 May 25 01:00 bamboo_backup_2013_05_25.zip -rw-rw-r--. 1 bamboo bamboo 343318 Jun 1 01:00 bamboo_backup_2013_06_01.zip -rw-rw-r--. 1 bamboo bamboo 367570 Jun 8 01:00 bamboo_backup_2013_06_08.zip -rw-rw-r--. 1 bamboo bamboo 434358 Jun 15 01:00 bamboo_backup_2013_06_15.zip -rw-rw-r--. 1 bamboo bamboo 455438 Jun 22 01:00 bamboo_backup_2013_06_22.zip -rw-rw-r--. 1 bamboo bamboo 537870 Jun 29 00:09 bamboo_backup_2013_06_29.zip -rw-rw-r--. 1 bamboo bamboo 821518 Jul 6 00:12 bamboo_backup_2013_07_06.zip

    Atlassian JIRA | 3 years ago | rajneesh sharma
    net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165]
  2. 0

    Please give me more info on what went wrong here, and how to resolve it. I see the following on my Bamboo pages - Bamboo failed to run the backup on 06 Jul 2013. See the logs for further details. I see the following on my bamboo server (/opt/bamboo/atlassian-bamboo-4.4.4/logs/atlassian-bamboo.log) - 2013-07-06 00:12:10,692 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper@2ff18952 2013-07-06 00:12:10,724 ERROR [QuartzScheduler_Worker-9] [LazyInitializer] Exception initializing proxy net.sf.hibernate.ObjectNotFoundException: No row with the given identifier exists: 3375165, of class: com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl at net.sf.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:24) at net.sf.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1948) at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:53) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$c1601371.getPlanResultKey(<generated>) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:87) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:27) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:98) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:149) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:128) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportData(ConsumedSubscriptionMapper.java:133) at com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:499) at com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:429) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629) at com.atlassian.bamboo.migration.XmlMigrator$$EnhancerByCGLIB$$8177804.exportXml(<generated>) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooExport(ImportExportManagerImpl.java:94) at com.atlassian.bamboo.configuration.ScheduledBackupJob.execute(ScheduledBackupJob.java:74) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) 2013-07-06 00:12:10,746 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Ensuring the the file has been unmounted 2013-07-06 00:12:10,746 INFO [QuartzScheduler_Worker-9] [XmlMigrator] Unmounted /mnt/external/bamboo/atlassian-bamboo-4.4.4/backups/bamboo_backup_2013_07_06.zip 2013-07-06 00:12:10,749 INFO [QuartzScheduler_Worker-9] [ServerLifecycleManagerImpl] Server state changed to 'RUNNING' from 'PAUSED' 2013-07-06 00:12:10,749 ERROR [QuartzScheduler_Worker-9] [ScheduledBackupJob] net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165] net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$c1601371.getPlanResultKey(<generated>) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:87) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:27) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:98) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:149) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:128) at com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportData(ConsumedSubscriptionMapper.java:133) at com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:499) at com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:429) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) +++++++++++++++++++++++++ I also see the following - [root@ip-10-170-101-34 atlassian-bamboo-4.4.4]# cd /mnt/external/bamboo/atlassian-bamboo-4.4.4/backups [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# [root@ip-10-170-101-34 backups]# ls -lrt total 9640 -rw-r--r--. 1 bamboo bamboo 4430460 Mar 16 00:01 bamboo_backup_2013_03_16.zip -rw-rw-r--. 1 bamboo bamboo 142132 Mar 23 00:01 bamboo_backup_2013_03_23.zip -rw-rw-r--. 1 bamboo bamboo 195266 Mar 30 00:01 bamboo_backup_2013_03_30.zip -rw-r--r--. 1 bamboo bamboo 273492 Apr 6 00:01 bamboo_backup_2013_04_06.zip -rw-r--r--. 1 bamboo bamboo 418151 Apr 13 00:01 bamboo_backup_2013_04_13.zip -rw-r--r--. 1 bamboo bamboo 176225 Apr 20 00:01 bamboo_backup_2013_04_20.zip -rw-rw-r--. 1 bamboo bamboo 185179 Apr 27 00:01 bamboo_backup_2013_04_27.zip -rw-rw-r--. 1 bamboo bamboo 204153 May 4 01:00 bamboo_backup_2013_05_04.zip -rw-rw-r--. 1 bamboo bamboo 231989 May 11 01:00 bamboo_backup_2013_05_11.zip -rw-rw-r--. 1 bamboo bamboo 295644 May 18 01:00 bamboo_backup_2013_05_18.zip -rw-rw-r--. 1 bamboo bamboo 322224 May 25 01:00 bamboo_backup_2013_05_25.zip -rw-rw-r--. 1 bamboo bamboo 343318 Jun 1 01:00 bamboo_backup_2013_06_01.zip -rw-rw-r--. 1 bamboo bamboo 367570 Jun 8 01:00 bamboo_backup_2013_06_08.zip -rw-rw-r--. 1 bamboo bamboo 434358 Jun 15 01:00 bamboo_backup_2013_06_15.zip -rw-rw-r--. 1 bamboo bamboo 455438 Jun 22 01:00 bamboo_backup_2013_06_22.zip -rw-rw-r--. 1 bamboo bamboo 537870 Jun 29 00:09 bamboo_backup_2013_06_29.zip -rw-rw-r--. 1 bamboo bamboo 821518 Jul 6 00:12 bamboo_backup_2013_07_06.zip

    Atlassian JIRA | 3 years ago | rajneesh sharma
    net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165]
  3. 0

    We started getting: {code} 2011-06-11 00:59:30,420 ERROR [QuartzScheduler_Worker-8] [JobRunShell] Job elastic agent monitor job group.elastic agent monitor job threw an unhandled Exception: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#262570023] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$cdcad96f.getBuildCompletedDate(<generated>) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.isIdleLongerThan(ElasticRunningInstancesOptimizer.java:349) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:340) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:327) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:616) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135) at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) {code} This will be fixed properly of course, but in any case, since this exception interferes only with the "is idle longer than" condition, it should not prevent the optimiser from shutting down the instance if all other conditions are met.

    Atlassian JIRA | 5 years ago | Przemek Bruski
    net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#262570023]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We started getting: {code} 2011-06-11 00:59:30,420 ERROR [QuartzScheduler_Worker-8] [JobRunShell] Job elastic agent monitor job group.elastic agent monitor job threw an unhandled Exception: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#262570023] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$cdcad96f.getBuildCompletedDate(<generated>) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.isIdleLongerThan(ElasticRunningInstancesOptimizer.java:349) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:340) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:327) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:616) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135) at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) {code} This will be fixed properly of course, but in any case, since this exception interferes only with the "is idle longer than" condition, it should not prevent the optimiser from shutting down the instance if all other conditions are met.

    Atlassian JIRA | 5 years ago | Przemek Bruski
    net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#262570023]
  6. 0

    Is it legal to map a many-to-one class to an interface. I have done this with the father property (in the attached example), however, I am receiving errors when I try to load records where the parent property is not null. I have attached a set of files that demonstrate the error I am getting. To use: 1. run the sql script to build files and populate data Note: I'm using MySQL so you might have to change for a different DB 2. Change eg.test configuration properites to reflect your DB setup 3. Run eg.test Everything should work fine and "Detail B1 - F3" should be printed to the output 4. Now in eg.test, change the configuration to use eg.IFather instead of eg.Father 5. In IDetail, change the m-1 father property from eg.Father to eg.IFather 6. Re-run and you will get this error. Exception in thread "main" java.lang.IllegalArgumentException: No visible constructors in interface eg.IFather at net.sf.cglib.EnhancerGenerator.<init>(EnhancerGenerator.java:128) at net.sf.cglib.Enhancer.enhanceClassHelper(Enhancer.java:224) at net.sf.cglib.Enhancer.enhanceHelper(Enhancer.java:206) at net.sf.cglib.Enhancer.enhance(Enhancer.java:162) at net.sf.cglib.Enhancer.enhance(Enhancer.java:139) at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:26) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1790) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1728) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1971) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:392) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1901) at net.sf.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1710) at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:48) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:55) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:153) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:49) at eg.DetailB$$EnhancedByCGLIB$$0.getTestValue(<generated>) at com.test.main(test.java:39) rethrown as net.sf.hibernate.HibernateException: CGLIB Enhancement failed: No visible constructors in interface eg.IFather at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:37) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1790) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1728) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1971) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:392) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1901) at net.sf.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1710) at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:48) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:55) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:153) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:49) at eg.DetailB$$EnhancedByCGLIB$$0.getTestValue(<generated>) at com.test.main(test.java:39) rethrown as net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem: CGLIB Enhancement failed: No visible constructors in interface eg.IFather at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:59) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:153) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:49) at eg.DetailB$$EnhancedByCGLIB$$0.getTestValue(<generated>) at eq.test.main(test.java:43) Chris....

    Hibernate JIRA | 1 decade ago | Chris Hane
    net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem: CGLIB Enhancement failed: No visible constructors in interface eg.IFather

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.LazyInitializationException

      Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#3375165]

      at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions()
    2. net.sf.hibernate
      CGLIBLazyInitializer.intercept
      1. net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64)
      2. net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164)
      3. net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108)
      3 frames
    3. com.atlassian.bamboo
      XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke
      1. com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$c1601371.getPlanResultKey(<generated>)
      2. com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:87)
      3. com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportProperties(ConsumedSubscriptionMapper.java:27)
      4. com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:98)
      5. com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:149)
      6. com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:128)
      7. com.atlassian.bamboo.migration.stream.ConsumedSubscriptionMapper.exportData(ConsumedSubscriptionMapper.java:133)
      8. com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:499)
      9. com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:429)
      10. com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>)
      10 frames
    4. IDEA
      MethodProxy.invoke
      1. net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      1 frame