title: XStream ForbiddenClassException when using a custom Forager with OptaPlanner
body: <p>I recently upgraded optaplanner version from version 7.0.0 to version 7.4.1. I use a custom Forager declared in the config file like this:</p>
  
  <pre><code>...
  &lt;forager class="com.mycompany.MyCustomForagerConfig"&gt;
              &lt;acceptedCountLimit&gt;100&lt;/acceptedCountLimit&gt;
  &lt;/forager&gt;
  ...
  </code></pre>
  
  <p>Everything worked without hassle with the previous OptaPlanner version, but after the upgrade I got a problem while OptaPlanner reads the config.xml file:</p>
  
  <pre><code>---- Debugging information ----
  cause-exception     : com.thoughtworks.xstream.security.ForbiddenClassException
  cause-message       : com.mycompany.MyCustomForagerConfig
  class               : org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig
  required-type       : org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig
  converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
  line number         : 137
  class[1]            : org.optaplanner.core.config.solver.SolverConfig
  version             : 1.4.10
  -------------------------------
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
      …
  </code></pre>
  
  <p>It seems somewhat related to this issue <a href="https://issues.jboss.org/browse/PLANNER-896" rel="nofollow noreferrer">https://issues.jboss.org/browse/PLANNER-896</a> (resolved) for the latest version (7.5.0), so I tried to upgrade but the problem persists.</p>
  
  <p>Thanks.</p>