[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6160) NPE when setting readOnly hint

David J. M. Karlsen (JIRA) noreply at atlassian.com
Tue Apr 26 08:00:59 EDT 2011


NPE when setting readOnly hint
------------------------------

                 Key: HHH-6160
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6160
             Project: Hibernate Core
          Issue Type: Bug
          Components: entity-manager
    Affects Versions: 3.6.3
         Environment: 3.6.3, jpa2, 64 bit IBM JDK, atomikos jta tx mgr
            Reporter: David J. M. Karlsen


I get the following stack trace when executing a Named Query which was defined like this:
<lock-mode>READ</lock-mode>
<hint name="org.hibernate.readOnly" value="true" />

if I remove the hint it works fine.


{noformat}
javax.persistence.PersistenceException: error during managed flush
        at org.hibernate.ejb.AbstractEntityManagerImpl$3.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1072)
        at org.hibernate.transaction.synchronization.CallbackCoordinator.beforeCompletion(CallbackCoordinator.java:122)
        at org.hibernate.transaction.synchronization.HibernateSynchronizationImpl.beforeCompletion(HibernateSynchronizationImpl.java:51)
        at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:55)
        at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:278)
        at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:319)
        at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:79)
        at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:236)
        at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:498)
        at com.atomikos.icatch.jta.UserTransactionImp.commit(UserTransactionImp.java:129)
        at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73)
        at com.edb.finance.common.spring.aop.monitoring.ExtendedMonitoringSpringInterceptor.invoke(ExtendedMonitoringSpringInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:67)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy157.create(Unknown Source)
        at com.edb.payment.pays.ws.service.payment.initiate.PaymentInitiateCreateService.handleInternal(PaymentInitiateCreateService.java:45)
        at com.edb.payment.pays.ws.service.payment.initiate.PaymentInitiateCreateService.handleInternal(PaymentInitiateCreateService.java:12)
        at com.edb.payment.pays.ws.service.AbstractService.handle(AbstractService.java:96)
        at com.edb.payment.pays.ws.service.payment.initiate.PaymentInitiateCreateService.pAYSPaymentInitiateCreate_V1_0(PaymentInitiateCreateService.java:27)
        at sun.reflect.GeneratedMethodAccessor246.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)

{noformat}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list