title: Exceptions in criteria API after changed hibernate.criteria.literal_handling_mode
body: <p>I have a software which used java, ejb, hibernate and wicket.
  After I changed <em>hibernate.criteria.literal_handling_mode</em> on &quot;<em><strong>bind</strong></em>&quot; I get some exceptions in criteria api query</p>
  <p><strong>Query</strong></p>
  <pre><code> TypedQuery&lt;Long&gt; typed = getEntityManager().createQuery(query);
  </code></pre>
  <p><strong>Exceptions</strong></p>
  <pre><code> Caused by: java.lang.IllegalArgumentException: Parameter value [0] did not match expected type [java.lang.Long (n/a)]
  </code></pre>
  <p>And</p>
  <pre><code>2022-04-21 15:38:27,683 ERROR [org.apache.wicket.DefaultExceptionMapper] (default task-1) Unexpected error occurred: org.apache.wicket.WicketRuntimeException:
   Can't instantiate page using constructor 'public com.application.ui.wicket.pages.AllRestrictionPage()'.
   Might be it doesn't exist, may be it is not visible (public).
  </code></pre>
  <p><strong>If I removing hibernate.criteria.literal_handling_mode (AUTO by default) all works properly.</strong></p>
  <p>How handling mode can affected on wicket?</p>
  <p>P.S. More information:
  exception occurred in -&gt; QueryParameterBindingValidator.validate() on 54 row.
  Version of hibernate - 5.3.7.Final (provided by jboss)</p>