Comments (10)
That's strange then. I'd activate logging of class loading on the JVM level and see if I can stitch it together based on that.
from byte-buddy.
Are you retransforming? If so, a class might be loaded when matching it. What does the log say? Does the missing class show up at all?
from byte-buddy.
I didn't retransforming the class.
the matcher code is belong, use nameStartsWith to filter class.
agentBuilder.type(nameStartsWith("com.pay"))
.transform(new JacksonFieldDesensitizingTransformer())
SendCashReq class has a field recvBankCardNum annotate with Desensitization:
@Desensitization("BANKCARD_MASK")
private String recvBankCardNum;
the issue case log is:
INFO: 2024-02-01 17:33:47.267 [main] JacksonFieldDesensitizingTransformer - [logid:] [clientip:] [localip:] class com.pay.epic.api.model.vo.ActivityBankCardInfoVo rebased
the correct case log is:
INFO: 2024-02-01 22:24:10.984 [main] JacksonFieldDesensitizingTransformer - [logid:] [clientip:] [localip:] class com.pay.epic.service.client.req.SendCashReq rebased
INFO: 2024-02-01 22:24:11.473 [main] JacksonFieldDesensitizingTransformer - [logid:] [clientip:] [localip:] class com.pay.epic.api.model.vo.ActivityBankCardInfoVo rebased
Like the above log shows, the application has two class matched the matcher's rule. SendCashReq class wasn't rebased, That case was occered twice.
from byte-buddy.
To me it seems as if SendCashReq
is already loaded in that case. Are you logging ignored classes? Any class passed to Byte Buddy would get logged here.
from byte-buddy.
I think the class was already loaded too. I didn't log this message. I restart the application and use jvm option to logging loaded class. The SendCashReq
class was at very later. What kind of case that make the SendCashReq
was loadded at the beginning even before the main class. I install bytebuddy instrument at the main method first line.
from byte-buddy.
Do you reference losded classes somewhere? Byte Buddy would not load it itself. Are you running premain? In this case the app should not even come up before installing the sgent.
from byte-buddy.
I use net.bytebuddy.agent.ByteBuddyAgent.install()
, not running premain. But the install method is at first line in main method. I didn't reference SendCashReq
on main classs.
from byte-buddy.
Hello, have you reproduced this issue? Have you identified the root cause of the problem?
from byte-buddy.
No, I have no opportunity to reproduce this problem. Did you try logging of class loading?
from byte-buddy.
I logging of class loading when restart the application in test enviroment, but the error doesn't occur.
from byte-buddy.
Related Issues (20)
- Release missing of version 1.14.15 HOT 1
- java.lang.NoSuchMethodError when using the agent for method instrumentation HOT 2
- Cannot invoke public constructor HOT 5
- ByteBuddyAgent, Java 21 - A Java agent has been loaded dynamically HOT 2
- include method does not exist for Method Delegation approach HOT 6
- Having trouble delegating added instance method to static method HOT 2
- Setting value in constructor aliases collections HOT 5
- Is it possible to lazily instantiate AllArguments?
- install transformer takes too long time HOT 3
- Example that could be used in documentation HOT 6
- Issues attaching to Solaris Hotspot on Solaris 10 and 11. HOT 1
- How to generate multi-level generic code ? HOT 2
- java.lang.IllegalAccessError HOT 12
- InjectionStrategy.UsingUnsafe.OfFactory HOT 1
- java.lang.IncompatibleClassChangeError: Interface method reference: java.util.stream.Sink.begin(J)V HOT 1
- defineField not working well HOT 1
- JDK class enhancements HOT 3
- ByteBuddy is incompatible with CDS due to the Java 6 baseline HOT 3
- No JPMS module-info or Automatic-Module-Name in byte-buddy-dep HOT 2
- How to call method self when use Advice HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byte-buddy.