Haven't used MySql really so just guessing here. In the second statement, you have a potentially reserved word comment and also remark. Try removing them from the statement:
INSERT INTO commentdetail
(commentDetailID, commentID, commentType, locator1, locator2)
VALUES (?commentDetailID, ?commentID, ?commentType, ?locator1, ?locator2)
The need to optimize rises from a bad design. My articles[^]