밑에와 이어서 질문을 올리는데 


아래 소스에서 mysql connector 쪽에서 문법 에러를 내뱉습니다...


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?, ?, ?, ?, ?, ?, ?, ?, now())' at line 1


아무리 봐도 sql 쪽엔 문법적인 에러가 않보여서

수동적으로 저 sql 문에서 ? 를 bean 에 있는 내용을 직접넣어서 sql 서버쪽에서 써보니 아무문제 없이 됩니다..


일단 환경은 

Tomcat 6.0.35 / jdk 1.7.0_01 / common-dbcp 구성 / mysql-connector 5.1.18 / mysql 5.0.77


sql = new StringBuilder("INSERT INTO italk_location")

.append("(userid, latitude, longitude, altitude, accuracy, speed, provider, locationType, locationTime) ")

.append("VALUES(?, ?, ?, ?, ?, ?, ?, ?, now());")

.toString();

LOG.debug(new StringBuilder("sql : ").append(sql));

LOG.debug(jsonData);

try {

conn = DBTool.getConnection();

pstmt = conn.prepareStatement(sql);

pstmt.setString(1, bean.getUserId());

pstmt.setDouble(2, bean.getLatitude());

pstmt.setDouble(3, bean.getLongitude());

pstmt.setDouble(4, bean.getAltitude());

pstmt.setDouble(5, bean.getAccuracy());

pstmt.setDouble(6, bean.getSpeed());

pstmt.setString(7, bean.getProvider());

pstmt.setString(8, bean.getLocationType());

pstmt.execute(sql);