admin管理员组文章数量:1352849
I have a big application written in Tapestry using @Transactional
annotation from Spring to manage transactions and Hibernate sessions. At the moment I'm in a process of upgrading dependencies, including Spring.
The problem is that @Transactional
aspect used to be before/after, but has been changed to around and this collides with PlasticClassLoader
. The aspect is weaved using post-compile weaving. Whenever any local method (private or public) is called, it fails with
java.lang.ClassCastException: class XYZ cannot be cast to class XYZ (XYZ is in unnamed module of loader .apache.tapestry5.internal.plastic.PlasticClassLoader @162b4f91; XYZ is in unnamed module of loader 'app')
For example I have an onSuccessFrom
... method and this method cannot call another method from the same class which is annotated with @Transactional
, because it fails like above.
Any idea how to fix it?
I have a big application written in Tapestry using @Transactional
annotation from Spring to manage transactions and Hibernate sessions. At the moment I'm in a process of upgrading dependencies, including Spring.
The problem is that @Transactional
aspect used to be before/after, but has been changed to around and this collides with PlasticClassLoader
. The aspect is weaved using post-compile weaving. Whenever any local method (private or public) is called, it fails with
java.lang.ClassCastException: class XYZ cannot be cast to class XYZ (XYZ is in unnamed module of loader .apache.tapestry5.internal.plastic.PlasticClassLoader @162b4f91; XYZ is in unnamed module of loader 'app')
For example I have an onSuccessFrom
... method and this method cannot call another method from the same class which is annotated with @Transactional
, because it fails like above.
Any idea how to fix it?
Share Improve this question edited Apr 1 at 8:41 M. Deinum 125k22 gold badges233 silver badges249 bronze badges asked Apr 1 at 8:00 bedneebednee 12 bronze badges 12 | Show 7 more comments1 Answer
Reset to default 0Too many issues can exist, with unnamed module, since I am not able to comment due to point issues, I have found the answer check the answers on the link & fix your the issue.
https://stackoverflow/a/57753612/16897849
本文标签: javaTapestry bean with Around aspect class loading problemStack Overflow
版权声明:本文标题:java - Tapestry bean with Around aspect class loading problem - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743901458a2558749.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
around
aspect since the beginning and not anbefore
/after
aspect . So not sure where you get that information from but that is plain wrong, as it would only work with an around aspect. – M. Deinum Commented Apr 1 at 8:57AnnotationTransactionAspect.aspectOf().ajc$before$_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(this, ajc$tjp_1);
at the begining of @Transactional method, while now it's((AbstractTransactionAspect)var10000).ajc$around$_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(this, new ApplicationPropertiesImpl$AjcClosure1(var6), ajc$tjp_0);
– bednee Commented Apr 1 at 9:57