Misleading error message on extra paranthesis

Description

Bug was closed as trivial. It is not trivial. It is the result of an incompetent or lazy developer, which is misleading users with a completely useless error message.

When Hibernate is encountering a query with an extraneous parenthesis, instead of reporting a malformed query or the extraneous parenthesis, it reports a 'NullPointerException'. In summary, Hibernate code crashed, with zero clue what happened.

The bug I am reporting is the totally useless error message being shown. Error reporting is not trivial and it takes some competence to report an error correctly. Incompetent error reporting, as in this case, makes users waste time simply because the developer couldn't be bothered.

Please report the error with some clue. Providing hints, such as 'Do you have extraneous parenthesis' would be helpful. Hibernate already prints such messages, so the idea is not novel.
Please use the pattern that you yourself seemed to have considered as correct, and just type in the extra few lines at the right place.

Environment

All

Activity

Show:
Gail Badner
October 24, 2016, 11:38 PM

, was not closed because it had status "Trivial". At the time that it was closed, Hibernate 3.x was no longer supported. and no one confirmed that the bug affected Hibernate 4.

Now, Hibernate 4.x is no longer supported. Please let us know if this is still a problem using Hibernate 5.2. If it is, then please create a test case reproducing your issue using the orm/hibernate-orm-5 template from https://github.com/hibernate/hibernate-test-case-templates and attach to this issue.

Assignee

Unassigned

Reporter

Alamgir Farouk

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure