title: Parentheses in java .properties files?
body: <p>I am trying to pass a sql query into a java class via a bash shell script, the script gets the query from an external EnvFile.properties. The query in the properties file looks like:</p>
  
  <pre><code>DDAQUERY1=SELECT COUNT(1), marketsectordescription FROM PRODUCT GROUP BY marketsectordescription ORDER BY marketsectordescription
  </code></pre>
  
  <p>The query fails with this error:</p>
  
  <pre><code>java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
  </code></pre>
  
  <p>The value being passed into the script looks like this (as seen in console output window in Jenkins):</p>
  
  <pre><code>SELECT 'COUNT(1),' marketsectordescription FROM PRODUCT GROUP BY marketsectordescription ORDER BY marketsectordescription
  </code></pre>
  
  <p>It definitely seems the parentheses are creating some kind of problem as single quotes (') appear near statements with parentheses in them. Is this in fact what is going on? What can be done to remedy the problem?</p>
  
  <p>The env variables are injected into the build with the following Jenkins plug-in:
  <a href="https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin</a></p>
  
  <p>EDIT:</p>
  
  <p>It appears it's not the parentheses, it's the spaces. Here's what I'm getting passed in from prop file > bash script args:</p>
  
  <p>ddaquery1=SELECT COUNT, marketsectordescription FROM PRODUCT GROUP BY marketsectordescription ORDER BY marketsectordescription</p>
  
  <p>ddaquery2=select count(distinct(smci)) from issuer</p>
  
  <p>Here's whats getting into the java app:</p>
  
  <p>ddaquery1: SELECT
  ddaquery2 : COUNT,</p>
  
  <p>The spaces are delmiting the string and making each word after a whitespace a seperate arg[]. Does anyone know how I can fix this?</p>
  
  <p>Thank you</p>