Class NoMatchingSamplerFoundException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
de.ppi.deepsampler.core.error.BaseException
de.ppi.deepsampler.persistence.error.PersistenceException
de.ppi.deepsampler.persistence.error.NoMatchingSamplerFoundException
All Implemented Interfaces:
java.io.Serializable

public class NoMatchingSamplerFoundException
extends PersistenceException
The NoMatchingSamplerFoundException is thrown if a JSON file (or any other source of persistent Samples) contains Samples that don't have a matching Sampler. A Sampler is defined using PersistentSample.of(Object). A typical cause of this Exception is, that the signature of a sampled method has changed. Maybe the method name was refactored. Since the complete method signature is saved in the JSON (or any other persistent medium) by default, the signature in the file might not correspond to the refactored one in the code anymore. You can prevent situations like this, by defining the id of a Sample manually using PersistentSampler.of().hasId("MyId"). See PersistentSampleBuilder.hasId(String).
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    NoMatchingSamplerFoundException​(java.lang.String unusedSamplerId, java.util.List<de.ppi.deepsampler.core.model.SampleDefinition> definedSampleDefinitions)  
    NoMatchingSamplerFoundException​(java.util.Collection<java.lang.String> unusedSamplerIds, java.util.List<de.ppi.deepsampler.core.model.SampleDefinition> definedSampleDefinitions)  
  • Method Summary

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NoMatchingSamplerFoundException

      public NoMatchingSamplerFoundException​(java.lang.String unusedSamplerId, java.util.List<de.ppi.deepsampler.core.model.SampleDefinition> definedSampleDefinitions)
    • NoMatchingSamplerFoundException

      public NoMatchingSamplerFoundException​(java.util.Collection<java.lang.String> unusedSamplerIds, java.util.List<de.ppi.deepsampler.core.model.SampleDefinition> definedSampleDefinitions)