commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [configuration] SQL query falsely read from properties file
Date Tue, 08 Jan 2008 19:34:45 GMT
Note: Please prefix the subjects of your postings with the name of the
affected component because this is a shared list.

Comments below.

Konstantinos Pachopoulos wrote:
> Hi,
> i am reading an SQL query from a properties file and
> turning into a PreparedStatement.
> The line from the properties file:
> [code]
> IN_ANSWERING_IDS= SELECT pk_msgId FROM EMail WHERE
> inReplyTo=?;
> [/code]
> 
> I use the Jakarta Commons PropertiesConfiguration
> class and i read the property like this:
> 
> [code]
> PreparedStatement psIN_REPLY_SENDER_IDS;
> psIN_REPLY_SENDER_IDS=con_.prepareStatement(props_.getString("IN_REPLY_SENDER_IDS"));
> [/code]
> 
> While debugging however, i see, that only
> "IN_ANSWERING_IDS= SELECT pk_msgId" has been read...
> 
> Same with the "OUT_INCOM_REFERENCES=UPDATE EMail SET
> incomingReferences=CONCAT(incomingReferences\, ?)\,
> inRefCounter=inRefCounter+1  WHERE pk_msgId=?;"
> query. Only
> "UPDATE EMail SET
> incomingReferences=CONCAT(incomingReferences" is read.
> 
> Any ideas?
> 

>From the format of the mail it is not obvious whether the properties for
the statements are defined in a single line or in multiple lines. Maybe
you can send a stripped version of the properties file, so that we can
do some tests.

One possibility is to switch off delimiter parsing completely (if this
is the source of the problem) using

props.setDelimiterParsingDisabled(true);

(this method has to be called before the configuration is loaded!)

BTW what version of configuration do you use? Older versions used to
have some problems with the processing of delimiter characters.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message