spring-loaded
spring-loaded copied to clipboard
error popping up while dynamicly change Java class generated from google protobuffer
I have some Java files generated from google protobuffer file. These java files are very complicated with deep embedded inner class. While I modify the protobuffer file(ie, add one field) and regenerate these java files, spring-loaded can't reload these classes. With error like this popping up:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.google.protobuf.GeneratedMessage$Builder.onChanged()V from class com.alibaba.solar.halley.protobuf.CustomerProtos$Customer$Builder$$EPGg1bMu at com.alibaba.solar.halley.protobuf.CustomerProtos$Customer$Builder$$EPGg1bMu.setId(CustomerProtos.java:1121) at com.alibaba.solar.halley.protobuf.CustomerProtos$Customer$Builder$$DPGg1bMu.setId(Unknown Source) at com.alibaba.solar.halley.protobuf.CustomerProtos$Customer$Builder.setId(CustomerProtos.java) at com.alibaba.solar.halley.classloader.CustomerProtosTest.main(CustomerProtosTest.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)