The issue you are facing arises from the inclusion of the keyword USING in your SQL statement. Since USING is a reserved word in SQL, utilizing it as a name during table creation or while executing particular operations can result in syntax errors.
Solution:
1. Change the Class Name: Modify the name of the Using class to something that is not a reserved keyword (for example, BookReader, BookUsage, etc.).
public class BookReader { // change Using to BookReader }
// your fields and methods
}
2. Update Your Code: Ensure that your main() method is adjusted to reference the new class name.
3. Verify Mappings: Make sure that your Hibernate mappings are updated to reflect the class name change.