You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johannes Renoth (Jira)" <ji...@apache.org> on 2023/02/21 11:10:00 UTC
[jira] [Comment Edited] (WICKET-7005) ByteBuddy IllegalStateException: Cannot inject already loaded type
[ https://issues.apache.org/jira/browse/WICKET-7005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691520#comment-17691520 ]
Johannes Renoth edited comment on WICKET-7005 at 2/21/23 11:09 AM:
-------------------------------------------------------------------
we have created a Quickstart to reproduce the Problem with Bytebuddy
just run all tests in the attached quickstart
see WICKET-7005.zip
was (Author: renoth):
we have created a Quickstart to reproduce the Problem with Bytebuddy
just run all tests in the attached quickstart
> ByteBuddy IllegalStateException: Cannot inject already loaded type
> ------------------------------------------------------------------
>
> Key: WICKET-7005
> URL: https://issues.apache.org/jira/browse/WICKET-7005
> Project: Wicket
> Issue Type: Bug
> Components: wicket-ioc
> Affects Versions: 9.11.0
> Reporter: Miroslav Silhavy
> Priority: Major
> Attachments: WICKET-7005.zip
>
>
> Sometimes we get following exception in our application. It happens during our regression application tests running on parallel.
> We're running Wicket 9.11.0 with byteBuddy enabled (-Dwicket.ioc.useByteBuddy=true) on Java 17. We applied a workaround by changing this spring component to extend a single interface instead of being sole class. When using cglib there was no issue.
>
>
> {code:java}
> Caused by: java.lang.RuntimeException: error while injecting object [[Page class = com.project.core.web.page.login.LoginPage, id = 1, render count = 0]] of type [com.project.core.web.page.login.LoginPage]
> at org.apache.wicket.injection.Injector.inject(Injector.java:122)
> at org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
> at org.apache.wicket.spring.injection.annot.SpringComponentInjector.onInstantiation(SpringComponentInjector.java:130)
> at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38)
> at org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
> at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:81)
> at org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33)
> at org.apache.wicket.Component.<init>(Component.java:691)
> at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:180)
> at org.apache.wicket.Page.<init>(Page.java:171)
> at org.apache.wicket.Page.<init>(Page.java:160)
> at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:99)
> at com.project.core.web.page.base.AbstractprojectPage.<init>(AbstractprojectPage.java:64)
> at com.project.core.web.page.base.AbstractprojectPage.<init>(AbstractprojectPage.java:54)
> at com.project.core.web.page.base.projectPageImpl.<init>(projectPageImpl.java:66)
> at com.project.core.web.page.base.projectSimplePage.<init>(projectSimplePage.java:17)
> at com.project.core.web.page.login.LoginPage.<init>(LoginPage.java:86)
> at com.project.core.web.page.login.LoginPage.<init>(LoginPage.java:78)
> ... 151 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Could not create type
> at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:170)
> at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
> at org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createOrGetProxyClass(ByteBuddyProxyFactory.java:105)
> at org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.createProxy(ByteBuddyProxyFactory.java:75)
> at org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:160)
> at org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:166)
> at org.apache.wicket.injection.Injector.inject(Injector.java:111)
> ... 168 common frames omitted
> Caused by: java.lang.IllegalStateException: Cannot inject already loaded type: class com.project.core.web.page.base.WicketProxy_DoubleClickPreventionSupport
> at net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection.injectRaw(ClassInjector.java:286)
> at net.bytebuddy.dynamic.loading.ClassInjector$AbstractBase.inject(ClassInjector.java:118)
> at net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default$InjectionDispatcher.load(ClassLoadingStrategy.java:241)
> at net.bytebuddy.dynamic.loading.ClassLoadingStrategy$Default.load(ClassLoadingStrategy.java:148)
> at net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:101)
> at net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:6166)
> at org.apache.wicket.proxy.bytebuddy.ByteBuddyProxyFactory.lambda$createOrGetProxyClass$0(ByteBuddyProxyFactory.java:119)
> at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
> ... 174 common frames omitted
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)