Testing Oracle named query through local H2 database

  • The task is to test the execution of a named query, which is written to work with an Oracle database, through a locally raised H2 base. To do this, we have a special class that independently performs the necessary configuration of the H2 base, all it needs is sql scripts that create and fill in the necessary tables and some configuration parameters, like show_sql, hibernate_dialect (I have H2, but I tried to install and Oracle), in the properties of this class there is an h2 compatibility mode with Oracle, there are no problems here. The base goes up correctly, the request is executed, but the problem occurs at this point:



    Function "FIRST_VALUE" not found;

    I googled what kind of function this is, it turned out that it exists both in the Oracle dialect and in H2, the query is compiled synaxically correctly, why there is a problem in this moment is not very clear.

  • It found out that the FIRST_VALUE function appeared in H2 in version 1.4.198, in our project there was version 1.4.195

Log in to reply

Suggested Topics

  • 3
  • 1
  • 2
  • 2
  • 2