1 Reply Latest reply: Mar 22, 2012 7:52 AM by Alexandre Clavaud RSS

JBoss 7.1 + Hibernate 4.1.1 + Spring 3.1.1 + JPA + JTA : NPE when fetching a revision with a change on a @ManyToOne attribute

Alexandre Clavaud Newbie

Dear,

 

This is my configuration (simplified) :

 

My Entities :

@MappedSuperclass

@Audited

public abstract class BaseObject {

     public Boolean isActive;

}

 

@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)

@Audited

@TableGenerator(name = "AdUserKeyGen", table = "AD_SEQUENCE", pkColumnName = "COLUMN_NAME", pkColumnValue = "AD_USER_ID", valueColumnName = "SEQ_VAL", initialValue = 0, allocationSize = 1)

public final class AdUser extends BaseObject {

     @Id

     @GeneratedValue(strategy = GenerationType.TABLE, generator = "AdUserKeyGen")

     @Column(name = "AD_User_ID", nullable = false, insertable = true, updatable = true, scale = 0)

     private Long                    id;

 

     private String initials;

 

     @ManyToOne

     @JoinColumn(name = "REF_OFFICE_ID")

     private RefOffice                refOffice;

}

 

@MappedSuperclass

@Audited

public abstract class DefaultObject extends BaseObject {

     @Column(nullable = false, unique = true)

     private String                    name;

}

 

@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)

@Entity

@Audited

@TableGenerator(name = "RefOfficeKeyGen", table = "AD_SEQUENCE", pkColumnName = "COLUMN_NAME", pkColumnValue = "REF_OFFICE_ID", valueColumnName = "SEQ_VAL", initialValue = 0, allocationSize = 1)

public final class RefOffice extends DefaultObject {

     @Id

     @GeneratedValue(strategy = GenerationType.TABLE, generator = "RefOfficeKeyGen")

     @Column(name = "REF_OFFICE_ID", nullable = false, insertable = true, updatable = true, scale = 0)

     private Long                    id;

 

     @ManyToOne

     @JoinColumn(name = "FLIGHTS_MANAGER")

     private AdUser                    flightsManager;

}

 

My persistence.xml

<?xml version="1.0" encoding="UTF-8"?>

<persistence

     version="2.0"

     xmlns="http://java.sun.com/xml/ns/persistence"

     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

     http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

 

     <persistence-unit name="XXXX">

          <mapping-file>META-INF/orm.xml</mapping-file>

          <class>ch.ilem.XXXX.base.model.AdUser</class>

          <class>ch.ilem.XXXX.base.model.BaseObject</class>

          <class>ch.ilem.XXXX.base.model.DefaultObject</class>

          <class>ch.ilem.XXXX.base.model.RefOffice</class>

 

          <jta-data-source>java:jboss/datasources/XXX</jta-data-source>

          <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>

          <properties>

               <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

               <property name="hibernate.default_batch_fetch_size" value="4"/>

               <property name="hibernate.connection.isolation" value="3"/>

               <property name="hibernate.hbm2ddl.auto" value="update"/>

 

               <property name="hibernate.cache.use_second_level_cache" value="true"/>

               <property name="hibernate.cache.use_query_cache" value="true"/>

               <property name="hibernate.cache.use_minimal_puts" value="true"/>

 

               <property name="jboss.entity.manager.factory.jndi.name" value="java:/XXX/EntityManagerFactory"/>

               <property name="jboss.entity.manager.jndi.name" value="java:/XXX/EntityManager"/>

          </properties>

     </persistence-unit>

</persistence>

 

Revision access function :

@Service("changeLogService")

@Transactional(propagation = Propagation.REQUIRED, readOnly = true)

public final class ChangeLogServiceImpl implements IChangeLogService {

     @Override

     public BaseObject fetchRevision(final Class<? extends BaseObject> clazz, final Long id, final Integer revision) {

          final AuditReader reader = AuditReaderFactory.get( entityManager );

          final BaseObject result = reader.find( clazz, id, revision );

 

          return result;

     }

}

 

The problem.... :

  1. If I create an AdUser instance, with refOffice = null and initials = 'Some value', I can save and retreive the revision using the fetchRevision function.
  2. If I update the same instance, and change the initials attribute, I have no problem and can retreive the revision using the fetchRevision function.
  3. If I update the instance and set the refOffice attribute, then, when fetching the revision, I have the following error :

14:06:13,382 ERROR [ch.ilem.XXXX.base.service.customDataSource.SmartGwtDataSource] (http-localhost-127.0.0.1-8443-4) execute() :: An unexpected error has occured : null: java.lang.NullPointerException

  at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:755) [hibernate-core-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:4147) [hibernate-core-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.entities.mapper.relation.ToOneIdMapper.nullSafeMapToEntityFromMap(ToOneIdMapper.java:99) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.entities.mapper.relation.AbstractToOneMapper.mapToEntityFromMap(AbstractToOneMapper.java:38) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.entities.mapper.MultiPropertyMapper.mapToEntityFromMap(MultiPropertyMapper.java:137) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.entities.EntityInstantiator.createInstanceFromVersionsEntity(EntityInstantiator.java:99) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.entities.EntityInstantiator.addInstancesFromVersionsEntities(EntityInstantiator.java:112) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.query.impl.EntitiesAtRevisionQuery.list(EntitiesAtRevisionQuery.java:110) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.query.impl.AbstractAuditQuery.getSingleResult(AbstractAuditQuery.java:107) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.reader.AuditReaderImpl.find(AuditReaderImpl.java:121) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at org.hibernate.envers.reader.AuditReaderImpl.find(AuditReaderImpl.java:96) [hibernate-envers-4.1.1.Final.jar:4.1.1.Final]

  at ch.ilem.XXXX.base.service.service.impl.AdChangeLogServiceImpl.fetchRevision(AdChangeLogServiceImpl.java:93) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_29]

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_29]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_29]

  at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_29]

  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73) [javamelody-core-1.35.0.jar:1.35.0]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at $Proxy200.fetchRevision(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_29]

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_29]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_29]

  at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_29]

  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73) [javamelody-core-1.35.0.jar:1.35.0]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at $Proxy201.fetchRevision(Unknown Source) at ch.ilem.XXXX.base.service.service.smartgwt.impl.SmartGwtDataSourceServiceImpl.executeFetch(SmartGwtDataSourceServiceImpl.java:236) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) [:1.6.0_29]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_29]

  at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_29]

  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73) [javamelody-core-1.35.0.jar:1.35.0]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at $Proxy216.executeFetch(Unknown Source) at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) [:1.6.0_29]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_29]

  at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_29]

  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73) [javamelody-core-1.35.0.jar:1.35.0]

  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at $Proxy217.executeFetch(Unknown Source) at ch.ilem.XXXX.base.service.customDataSource.SmartGwtDataSource.executeFetch(SmartGwtDataSource.java:295) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at com.isomorphic.datasource.DataSource.execute(DataSource.java:1154) [isomorphic_core_rpc-2.5.Pro.jar:]

  at ch.ilem.XXXX.base.service.customDataSource.SmartGwtDataSource.execute(SmartGwtDataSource.java:97) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.application.AppBase.execute(AppBase.java:491) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1714) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121) [isomorphic_core_rpc-2.5.Pro.jar:]

  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73) [isomorphic_core_rpc-2.5.Pro.jar:]

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) [isomorphic_core_rpc-2.5.Pro.jar:]

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:143) [javamelody-core-1.35.0.jar:1.35.0]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) [isomorphic_core_rpc-2.5.Pro.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at ch.ilem.XXXX.base.service.filter.CacheFilter.doFilter(CacheFilter.java:26) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:185) [javamelody-core-1.35.0.jar:1.35.0]

  at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:159) [javamelody-core-1.35.0.jar:1.35.0]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at ch.ilem.XXXX.base.service.authentication.DefaultAppFilter.doFilter(DefaultAppFilter.java:65) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at ch.ilem.XXXX.base.service.authentication.DefaultAppConcurrentSessionFilter.doFilter(DefaultAppConcurrentSessionFilter.java:70) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173) [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]

  at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at ch.ilem.XXXX.base.service.filter.SecureFilter.doFilter(SecureFilter.java:64) [XXXX-base-service-1.1.13-SNAPSHOT.jar:1.1.13-SNAPSHOT]

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]

  at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Final.jar:7.1.0.Final]

  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]

  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]

  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]

  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]

  at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]


In fact, I have this exception only when I try to access a revision where the @ManyToOne attribute has a value.

 

I tried to set the @ManyToOne as Lazy, Eager, .... : no change

I tried to set a @OneToMany on RefOffice : no change

 

Now I'm getting crazy, because I don't understand why the proxy is null AbstractEntityTuplizer.

 

Please help me....

 

Alexandre