net.sf.hibernate.AssertionFailure: possible nonthreadsafe access to session

runawfe | nobody | 1 decade ago
  1. 0

    AssertionFailure possible nonthreadsafe acces

    runawfe | 1 decade ago | nobody
    net.sf.hibernate.AssertionFailure: possible nonthreadsafe access to session
  2. 0

    Hibernate Community • View topic - AssertionFailure: possible nonthreadsafe access to session

    hibernate.org | 3 months ago
    net.sf.hibernate.AssertionFailure: possible nonthreadsafe access to session
  3. 0

    Hibernate Community • View topic - AssertionFailure: possible nonthreadsafe access to session?

    hibernate.org | 7 months ago
    net.sf.hibernate.AssertionFailure: possible nonthreadsafe access to session
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When trying to delete a build from the list of completed builds for a plan, the following error is thrown: {code} Version: 3.0-m1 Build: 2001 Build Date: 16 Jun 2010 system.error.request.information: Request URL: https://bamboo.extranet.atlassian.com/build/admin/deleteBuildResultsBuilds.action Scheme: https Server: bamboo.extranet.atlassian.com Port: 443 URI: /build/admin/deleteBuildResultsBuilds.action Context Path: Servlet Path: /build/admin/deleteBuildResultsBuilds.action Path Info: Query String: buildNumber=4348&buildKey=CRUC-TRUNK Stack Trace: net.sf.hibernate.AssertionFailure: owner not associated with session at net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImpl.java:2945) at net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2814) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2280) at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1813) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3650) at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238) at net.sf.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:385) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.getBuildResultsSummaryByBuildKeyAndBuildNumber(BuildResultsSummaryHibernateDao.java:82) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.removeBuildResult(BuildResultsSummaryManagerImpl.java:415) at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 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.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy26.removeBuildResult(Unknown Source) at com.atlassian.bamboo.build.DeleteBuildResults.doExecute(DeleteBuildResults.java:31) at com.atlassian.bamboo.ww2.BambooActionSupport.execute(BambooActionSupport.java:902) at sun.reflect.GeneratedMethodAccessor550.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:218) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:192) at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:175) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.doIntercept(BambooWorkflowInterceptor.java:33) at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:116) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.doIntercept(BambooValidationInterceptor.java:33) at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.intercept(JSONValidationInterceptor.java:78) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:174) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptor.intercept(WebworkSecurityInterceptor.java:55) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptorProxy.intercept(WebworkSecurityInterceptorProxy.java:30) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.intercept(PaginationAwareInterceptor.java:84) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.StatisticsAwareInterceptor.intercept(StatisticsAwareInterceptor.java:41) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.ResultsListAwareInterceptor.intercept(ResultsListAwareInterceptor.java:49) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.BuildResultsSummaryAwareInteceptor.intercept(BuildResultsSummaryAwareInteceptor.java:66) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.ChainAwareInterceptor.intercept(ChainAwareInterceptor.java:93) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.BuildAwareInterceptor.intercept(BuildAwareInterceptor.java:46) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.atlassian.bamboo.ww2.interceptors.PlanAwareInterceptor.intercept(PlanAwareInterceptor.java:53) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116) at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:274) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.bamboo.filter.AccessLogFilter.doFilter(AccessLogFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at com.atlassian.bamboo.filter.SeraphLoginFilter.doFilter(SeraphLoginFilter.java:66) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at com.atlassian.bamboo.filter.BambooAcegiProxyFilter.doFilter(BambooAcegiProxyFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.bamboo.filter.LicenseFilter.doFilter(LicenseFilter.java:73) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:219) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.bamboo.persistence.BambooSessionInViewFilter.doFilterInternal(BambooSessionInViewFilter.java:31) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.bamboo.filter.CompressingFilter.doFilter(CompressingFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.bamboo.filter.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686) at java.lang.Thread.run(Thread.java:619) {code} e.g. https://bamboo.extranet.atlassian.com/build/admin/deleteBuildResultsBuilds.action?buildNumber=4348&buildKey=CRUC-TRUNK

    Atlassian JIRA | 6 years ago | Nick Pellow [Atlassian]
    net.sf.hibernate.AssertionFailure: owner not associated with session
  6. 0

    Hi, When using lazy="false" with a derby database in a Set with a one-to-many relationship I have the following error. This error is not raised when using ms sql. If I change the lazy mode to true, I don't have the problem but of course I don"t get the child record either. The problem occurs also with a many to many relationship. It there a compatibility problem between hibernate and Derby. Hibernate version:2 Name and version of the database you are using:Derby The generated SQL (show_sql=true): Hibernate: select entity0_.code as code0_, entity0_.entityName as entityName0_, entity0_.entityValue as entityVa3_0_ from Entity entity0_ where entity0_.code=? Hibernate: select entitymapp0_.entity_code as entity_c5___, entitymapp0_.code as code__, entitymapp0_.code as code0_, entitymapp0_.targetTable as targetTa2_0_, entitymapp0_.targetCode as targetCode0_, entitymapp0_.targetValue as targetVa4_0_ from EntityMapping entitymapp0_ where entitymapp0_.entity_code=? net.sf.hibernate.AssertionFailure: owner not associated with session at net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImpl.java:2915) at net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2788) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2239) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:463) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:373) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:242) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy4.read(Unknown Source) at com.relaystar.dao.TestMasterData.testReadEntity(TestMasterData.java:218) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) My Derby DB had CHAR(32) as PK. I changed it to VARCHAR(32) and it works. Now the question is: where is the bug? In Hibernate or Derby. To test that I create the same table in MSSQL with VARCHAR -> No problem it works I changed it the VARCHAR to CHAR(32) (N.B. the key with a lenght less the 32 will be padded by spaces) and if failed. I put it back to VARCHAR, notice that the PK will still have padded spaces. It failed again. I repopulate the DB with a new set of data, means without spaces at the end of the PK and it works. I have the feeling that the problem is in Hibernate because whatever is the DB Derby/MSSQL (I didn't test it with other DB, up to you) when PK has spaces at the end, something happen and it doesn't work anymore. FYI here are my Hibernate Mappings: <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping default-cascade="none"> <class name="com.xxx.Entity" table="Entity"> <id name="code" column="code"> <generator class="com.xxx.IdentifierGenerator"/> </id> <set name="entityMappings" lazy="false" cascade="all-delete-orphan"> <key column="entity_code"/> <one-to-many class="com.xxx.EntityMapping"/> </set> </class> </hibernate-mapping> <hibernate-mapping default-cascade="none"> <class name="com.xxx.EntityMapping" table="EntityMapping"> <id name="code" column="code"> <generator class="com.xxx.IdentifierGenerator"/> </id> <property name="targetTable" column="targetTable" not-null="true"/> </class> </hibernate-mapping> The IdentifierGenerator is based on net.sf.hibernate.id.UUIDHexGenerator. I'm using Hibernate 2.1.7. Cheers Dominique

    Hibernate JIRA | 1 decade ago | Dominique Vernier
    net.sf.hibernate.AssertionFailure: owner not associated with session

    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.AssertionFailure

      possible nonthreadsafe access to session

      at net.sf.hibernate.impl.SessionImpl.postInsert()
    2. net.sf.hibernate
      JTATransaction.commit
      1. net.sf.hibernate.impl.SessionImpl.postInsert(SessionImpl.java:2407)
      2. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:38)
      3. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
      4. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
      5. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
      6. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
      7. net.sf.hibernate.transaction.JTATransaction.commit(JTATransaction.java:52)
      7 frames
    3. ru.runa.commons
      HibernateSessionFactory.closeSession
      1. ru.runa.commons.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:105)
      1 frame
    4. ru.runa.af
      InitializerServiceBean.init
      1. ru.runa.af.dao.impl.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:54)
      2. ru.runa.af.dao.impl.DAOHibernateImpl.close(DAOHibernateImpl.java:56)
      3. ru.runa.af.dao.impl.DAOHelper.close(DAOHelper.java:37)
      4. ru.runa.af.logic.InitializerLogic.init(InitializerLogic.java:61)
      5. ru.runa.af.service.impl.ejb.InitializerServiceBean.init(InitializerServiceBean.java:68)
      5 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    6. JBoss Application Server Server
      StatelessSessionContainer$ContainerInterceptor.invoke
      1. org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
      1 frame
    7. JBoss Application Server Connector
      CachedConnectionInterceptor.invoke
      1. org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      1 frame