In Java, it's standard practice for packages that are available at compile time not to be available at runtime. This is often a way to allow multiple implementations of functionality, with the choice of implementation depending on which package is actually provided.
A result of this approach is that there may be methods that match the config, but that have parameters or a return type that javassist can't process. When the agent tries to instrument such a method, it prints out an ugly error message, e.g.
22:02:40.704 [restartedMain] ERROR Logger.println: com.appland.appmap.output.v1.NoSourceAvailableException: Failed to get parameter types for org.springframework.boot.autoconfigure.cache.HazelcastCacheConfiguration.cacheManager(Lorg/springframework/boot/autoconfigure/cache/CacheManagerCustomizers;Lcom/hazelcast/core/HazelcastInstance;)Lcom/hazelcast/spring/cache/HazelcastCacheManager;: com.hazelcast.core.HazelcastInstance
at com.appland.appmap.output.v1.Parameters.<init>(Parameters.java:59)
at com.appland.appmap.output.v1.Event.<init>(Event.java:159)
at com.appland.appmap.record.EventTemplateRegistry.register(EventTemplateRegistry.java:38)
at com.appland.appmap.transform.annotations.Hook.prepare(Hook.java:133)
at com.appland.appmap.transform.ClassFileTransformer.lambda$applyHooks$4(ClassFileTransformer.java:147)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at com.appland.appmap.transform.ClassFileTransformer.applyHooks(ClassFileTransformer.java:149)
at com.appland.appmap.transform.ClassFileTransformer.transform(ClassFileTransformer.java:248)
...
Given that the JVM would object if the application tried to actually call one of these methods, the agent should just ignore them.
In Java, it's standard practice for packages that are available at compile time not to be available at runtime. This is often a way to allow multiple implementations of functionality, with the choice of implementation depending on which package is actually provided.
A result of this approach is that there may be methods that match the config, but that have parameters or a return type that javassist can't process. When the agent tries to instrument such a method, it prints out an ugly error message, e.g.
Given that the JVM would object if the application tried to actually call one of these methods, the agent should just ignore them.