There is an error msg in my log:
Caused by: java.lang.IllegalArgumentException: Can not set static 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter
 field 
com.okcoin.aircraft.rest.priapi.controller.BaseWebController.delegate$n04bej1 
to 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ConstructorInter


it's skywalking's error
And if I remove skywalking-agent ,and then restart project, it will be started 
successfully.














At 2022-11-01 20:38:03, "Sheng Wu" <wu.sheng.841...@gmail.com> wrote:
>I can't follow your case. Accessing a **final** field? Why do you
>think it is possible? How does this relate to SkyWalking?
>
>Sheng Wu 吴晟
>Twitter, wusheng1108
>
>dafang <13240156...@163.com> 于2022年11月1日周二 20:31写道:
>>
>> Hi skywalking dev team:
>>       env:   skywalking-agent:v8.11.0,skywalking-oap:v9.1.0  Project 
>> byte-buddy version is : 1.11.22
>>       Recently,we have found our skywalking-agent report error log during 
>> project starting.It happend several times.
>>
>>  The error log:
>>       "Caused by: java.lang.IllegalArgumentException: Can not set static 
>> org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter
>>  field 
>> com.okcoin.aircraft.rest.priapi.controller.BaseWebController.delegate$n04bej1
>>  to 
>> org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ConstructorInter
>> at 
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
>>  ~[?:1.8.0_321]
>> at 
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
>>  ~[?:1.8.0_321]
>> at 
>> sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:81)
>>  ~[?:1.8.0_321]
>> at java.lang.reflect.Field.set(Field.java:764) ~[?:1.8.0_321]
>> at 
>> org.apache.skywalking.apm.dependencies.net.bytebuddy.implementation.LoadedTypeInitializer$.onLoad(LoadedTypeInitializer.java:170)
>>  ~[skywalking-agent.jar:8.11.0]
>> at 
>> org.apache.skywalking.apm.dependencies.net.bytebuddy.implementation.LoadedTypeInitializer$Compound.onLoad(LoadedTypeInitializer.java:233)
>>  ~[skywalking-agent.jar:8.11.0]
>> at 
>> org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$InitializationStrategy$SelfInjection$Dispatcher$InjectingInitializer.onLoad(AgentBuilder.java:3655)
>>  ~[skywalking-agent.jar:8.11.0]
>> at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source) ~[?:?]
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  ~[?:1.8.0_321]
>> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_321]
>> at 
>> org.apache.skywalking.apm.dependencies.net.bytebuddy.dynamic.Nexus.initialize(Nexus.java:139)
>>  ~[skywalking-agent.jar:8.11.0]
>> at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) ~[?:?]
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  ~[?:1.8.0_321]
>> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_321]
>> at com.test.controller.BaseWebController.<clinit>(BaseWebController.java) 
>> ~[classes!/:1.2.2-SNAPSHOT]
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
>> ~[?:1.8.0_321]
>> at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>>  ~[?:1.8.0_321]
>> at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>  ~[?:1.8.0_321]
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
>> ~[?:1.8.0_321]
>> at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211) 
>> ~[spring-beans-5.3.20.jar!/:5.3.20]
>> at 
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
>>  ~[spring-beans-5.3.20.jar!/:5.3.20]
>> at 
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1326)
>>  ~[spring-beans-5.3.20.jar!/:5.3.20]
>> ... 25 more"
>>
>>
>> The Java Code:
>> "@RestController
>> public class BaseWebController {
>>
>>
>>     @Autowired
>>     private HttpServletRequest request;
>>
>>
>>     public static final String USER_AGENT = "user-agent";
>>     public static final String IOS = "ios";
>>
>>
>>     protected RpcProto.SourceEnum getHost() {
>>
>>     }
>>
>>
>>     public BizErrorCodeEnum checkStatus(StatusEnum statusEnum) {
>>
>>     }
>> }"
>>
>>
>>
>>
>> I don't have any ideas. Please help me to see my problems.
>> Yours dafang
>> 2022.11.1

Reply via email to