[jboss-jira] [JBoss JIRA] (WFLY-10981) Hibernate51CompatibilityTransformer is missing some transformations for VersionType
Scott Marlow (JIRA)
issues at jboss.org
Thu Sep 6 14:34:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13630122#comment-13630122 ]
Scott Marlow commented on WFLY-10981:
-------------------------------------
{quote}
> I'm yet sure of the best fix, I got the tests to pass with the following transformer changes [1]:
>
> 1. In application classes that implement/extend certain ORM classes, change method calls to SessionImplementor, to instead call SharedSessionContractImplementor methods. Previously, we only did this for calls to org.hibernate.* class methods.
The certain ORM classes that we made this change for, to handle synthetic bridge methods (plus other methods), are currently the following classes:
org/hibernate/usertype/UserType
org/hibernate/usertype/CompositeUserType
org/hibernate/usertype/UserCollectionType
org/hibernate/usertype/UserVersionType
org/hibernate/type/Type
org/hibernate/type/SingleColumnType
org/hibernate/type/AbstractStandardBasicType
org/hibernate/type/ProcedureParameterExtractionAware
org/hibernate/type/ProcedureParameterNamedBinder
org/hibernate/type/VersionType
org/hibernate/collection/spi/PersistentCollection
> 2. Update constructors for application classes that implement org.hibernate.collection.spi.PersistentCollection to use SharedSessionContractImplementor instead of SessionImplementor.
Note that we are only updating the constructors for PersistentCollection implementations, which means that synthetic bridge methods in the other (above) class implementations, will not be updated to use SharedSessionContractImplementor instead of SessionImplementor.
I'm thinking that we should update the constructors for the other above listed classes as well. I'll try making this change and will push again.
Scott
{quote}
> Hibernate51CompatibilityTransformer is missing some transformations for VersionType
> -----------------------------------------------------------------------------------
>
> Key: WFLY-10981
> URL: https://issues.jboss.org/browse/WFLY-10981
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 14.0.0.Final
> Reporter: Martin Simka
> Assignee: Scott Marlow
>
> There is probably missing transformation for synthetic "bridge methods" in {{org.hibernate.type.VersionType}}
> {noformat}
> Caused by: java.lang.NoSuchMethodError: org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(Lorg/hibernate/engine/spi/SessionImplementor;)Ljava/lang/Integer;
> at org.jboss.as.test.compat.jpa.hibernate.transformer.IntegerType.seed(IntegerType.java:26)
> at org.hibernate.engine.internal.Versioning.seed(Versioning.java:42)
> at org.hibernate.engine.internal.Versioning.seedVersion(Versioning.java:73)
> at org.hibernate.event.internal.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:428)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:274)
> at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:200)
> at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
> at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
> at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
> at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
> at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:709)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:701)
> at org.hibernate.internal.SessionImpl.save(SessionImpl.java:696)
> at org.jboss.as.test.compat.jpa.hibernate.transformer.SFSBHibernateSessionFactory.createQueueOwner(SFSBHibernateSessionFactory.java:231)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
> ... 191 more
> {noformat}
> I don't expect users to implement directly {{VersionType}} but {{UserVersionType}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list