org.hibernate.LazyInitializationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Summary Quarantined tests on master prevent Bamboo from creating plan branches. h3. Steps to reproduce # Create linked repo with branch support (Git / Hg) # Create plan for this repo and configure it automatically create plan branches for new branches in repository # Enable test quarantine feature # Mark some failed tests as quarantined for master branch # Create and push new branch to repository h3. Expected Results A new plan branch is created. h3. Actual Results Exception: {code} 2016-05-27 01:25:36.613474500 2016-05-27 01:25:36,613 INFO [11-BranchDetectionBackgroundThread:pool-19-thread-3] [DefaultErrorHandler] Recording an error: Unable to create plan branch for plan: TEST-GIT, branch: VCS Branch [test2]. could not initialize proxy - no Session : TEST-GIT : could not initialize proxy - no Session 2016-05-27 01:25:36.615605500 2016-05-27 01:25:36,615 ERROR [11-BranchDetectionBackgroundThread:pool-19-thread-3] [BranchDetectionServiceImpl] Unable to create plan branch for plan: TEST-GIT, branch: VCS Branch [test2]. could not initialize proxy - no Session 2016-05-27 01:25:36.615608500 org.hibernate.LazyInitializationException: could not initialize proxy - no Session 2016-05-27 01:25:36.615609500 at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167) 2016-05-27 01:25:36.615609500 at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215) 2016-05-27 01:25:36.615617500 at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) 2016-05-27 01:25:36.615618500 at com.atlassian.bamboo.plan.AbstractChain_$$_javassist_1.equals(AbstractChain_$$_javassist_1.java) 2016-05-27 01:25:36.615619500 at com.atlassian.bamboo.plan.PlanHelper.getBranchedJob(PlanHelper.java:201) 2016-05-27 01:25:36.615619500 at com.atlassian.bamboo.build.creation.ChainBranchCreationServiceImpl.cloneQuarantinedTestsFromMaster(ChainBranchCreationServiceImpl.java:421) 2016-05-27 01:25:36.615636500 at com.atlassian.bamboo.build.creation.ChainBranchCreationServiceImpl.triggerCreationCompleteEvents(ChainBranchCreationServiceImpl.java:457) 2016-05-27 01:25:36.615642500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createChainBranch(BranchDetectionServiceImpl.java:955) 2016-05-27 01:25:36.615643500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createPlanBranches(BranchDetectionServiceImpl.java:590) 2016-05-27 01:25:36.615644500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createPlanBranchesIfAutoCreationIsEnabled(BranchDetectionServiceImpl.java:511) 2016-05-27 01:25:36.615647500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createNewBranchesForChainNoLock(BranchDetectionServiceImpl.java:451) 2016-05-27 01:25:36.615648500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.lambda$run$0(BranchDetectionServiceImpl.java:262) 2016-05-27 01:25:36.615649500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1$$Lambda$332/31564453.doInHibernate(Unknown Source) 2016-05-27 01:25:36.615653500 at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) 2016-05-27 01:25:36.615654500 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:341) 2016-05-27 01:25:36.615655500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.run(BranchDetectionServiceImpl.java:249) 2016-05-27 01:25:36.615661500 at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:192) 2016-05-27 01:25:36.615662500 at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:182) 2016-05-27 01:25:36.615663500 at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:132) 2016-05-27 01:25:36.615664500 at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector.run(BranchDetectionServiceImpl.java:306) 2016-05-27 01:25:36.615667500 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) 2016-05-27 01:25:36.615668500 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) 2016-05-27 01:25:36.615669500 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) 2016-05-27 01:25:36.615670500 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) 2016-05-27 01:25:36.615673500 at java.lang.Thread.run(Thread.java:745) {code} h3.Note When the above branch plan run for the first time, the build queue will have problem showing the list of builds. The following exception is shown in atlassian-bamboo.log: {noformat} 2016-07-20 23:20:17,143 INFO [http-nio-8085-exec-9] [AccessLogFilter] kahloun.foong GET http://localhost:8085/build/admin/ajax/getDashboardSummary.action?_=1469028016966 624707kb 2016-07-20 23:20:17,155 ERROR [http-nio-8085-exec-9] [ExceptionMappingInterceptor] null Caught an Ognl exception while getting property jsonObject - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 1456 - ognl/OgnlRuntime.java:1456:-1 at com.opensymphony.xwork2.ognl.OgnlValueStack.handleOtherException(OgnlValueStack.java:265) at com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:242) at com.opensymphony.webwork.dispatcher.json.JSONResult.getJSONObject(JSONResult.java:172) at com.opensymphony.webwork.dispatcher.json.JSONResult.execute(JSONResult.java:137) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.validateWorkflow(BambooWorkflowInterceptor.java:54) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.access$000(BambooWorkflowInterceptor.java:16) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:33) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:29) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:39) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.doIntercept(BambooWorkflowInterceptor.java:28) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265) ... Caused by: Caught an Ognl exception while getting property jsonObject - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 1456 - ognl/OgnlRuntime.java:1456:-1 at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:143) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2317) at ognl.ASTProperty.getValueBody(ASTProperty.java:114) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.Ognl.getValue(Ognl.java:494) at ognl.Ognl.getValue(Ognl.java:458) at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:251) at com.opensymphony.xwork2.ognl.OgnlValueStack.getValueUsingOgnl(OgnlValueStack.java:293) at com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValue(OgnlValueStack.java:276) at com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValueWhenExpressionIsNotNull(OgnlValueStack.java:258) at com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:238) ... 260 more Caused by: ognl.OgnlException: jsonObject [java.lang.NullPointerException] at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1456) at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60) at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147) at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.getProperty(ObjectAccessor.java:17) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2317) at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:138) ... 271 more Caused by: java.lang.NullPointerException at com.atlassian.bamboo.ww2.actions.build.CurrentlyBuildingJsonDecorator.<init>(CurrentlyBuildingJsonDecorator.java:57) at com.atlassian.bamboo.ww2.actions.build.BuildJsonProviderAction.getJsonObject(BuildJsonProviderAction.java:157) {noformat} Please note that with auto branch creation, the branch gets created but the initial build does not run. h3. Workaround Remove quarantined tests from master plan.
    via by Alexey Chystoprudov,
  • Hibernate Lazy Load Error after merge
    via Stack Overflow by Scott
    ,
    • org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) at com.atlassian.bamboo.plan.AbstractChain_$$_javassist_1.equals(AbstractChain_$$_javassist_1.java) at com.atlassian.bamboo.plan.PlanHelper.getBranchedJob(PlanHelper.java:201) at com.atlassian.bamboo.build.creation.ChainBranchCreationServiceImpl.cloneQuarantinedTestsFromMaster(ChainBranchCreationServiceImpl.java:421) at com.atlassian.bamboo.build.creation.ChainBranchCreationServiceImpl.triggerCreationCompleteEvents(ChainBranchCreationServiceImpl.java:457) at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createChainBranch(BranchDetectionServiceImpl.java:955) at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createPlanBranches(BranchDetectionServiceImpl.java:590) at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createPlanBranchesIfAutoCreationIsEnabled(BranchDetectionServiceImpl.java:511) at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.createNewBranchesForChainNoLock(BranchDetectionServiceImpl.java:451) at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.lambda$run$0(BranchDetectionServiceImpl.java:262)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    linxiaolong
    2 times, last one,
    SteVio1989
    124 times, last one,
    18 more bugmates