I have very long SQL statements that span multiple lines and it works for me.
You might want to paste your SQL into a tool like Squirrel and see if it executes outside of DIH. One guess I have is you've got something like this... where blah='${my.property}' ...but the variable is not resolving to anything so your database gets: where blah='' ...and for some reason it doesn't like being passed an empty string like that. Just a shot in the dark here but maybe? James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 -----Original Message----- From: Cirelli, Stephen J. [mailto:stephen.j.cire...@saic.com] Sent: Friday, August 31, 2012 2:22 PM To: solr-user@lucene.apache.org Subject: DIH jdbc4.MySQLSyntaxErrorException Is there some limitation to how complex of a select I can use? I'm getting this error when I try to execute my query. The query runs fine inside MySQL Workbench. " Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '' at line 1" It's a very vague error message with not information. I have no idea what the error could be. In my DIH xml on the entity I have the query property, the query spans multiple lines. Does it all have to be on one line? I can't figure out why I get this error. Thanks for the help, Steve