How to log SQL query in GeoServer?
I've tried to raise the logging level, but failed to log the SQL query.
I'm using Oracle 12c datastore.
It's painful to guess the cause of the error without the query statement that is generated by GeoServer.
As I mentioned in my comment to the OP, the VERBOSE_LOGGING profile provides detail that includes the SQL queries that GeoServer is running. The following links provide some added detail about logging in GeoServer.