You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a diff of two JPA entities and unfortunately some of properties of these JPA entities are hibernate proxies, so I get the following exception:
2017-11-17 14:29:35,672 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[dispatcherServlet] [https-jsse-nio-127.0.0.1-8112-exec-7] ERROR: Servlet.service() for servlet [dispatcherServlet] in context with path [/storefront] threw exception [Request processing failed; nested exception is org.springframework.sync.PatchException: Error performing diff:] with root cause
java.lang.IllegalArgumentException: Can not set javassist.util.proxy.MethodHandler field com.nemesis.platform.core.entity.catalog.CatalogVersionEntity_$$_jvst933_2c.handler to com.nemesis.platform.core.entity.catalog.CatalogVersionEntity
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58)
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)
at java.lang.reflect.Field.get(Field.java:393)
at org.springframework.sync.Diff.diffNonList(Diff.java:117)
at org.springframework.sync.Diff.diffNonList(Diff.java:126)
at org.springframework.sync.Diff.diff(Diff.java:51)
at com.nemesis.platform.module.restservices.storefront.controller.RestDiffController.synchronize(RestDiffController.java:66)
at com.nemesis.platform.module.restservices.storefront.controller.RestDiffController$$FastClassBySpringCGLIB$$aa2b6dc9.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
at com.nemesis.platform.module.restservices.storefront.controller.RestDiffController$$EnhancerBySpringCGLIB$$4092d952.synchronize(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
I'm trying to make a diff of two JPA entities and unfortunately some of properties of these JPA entities are hibernate proxies, so I get the following exception: