ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: WindowsXP - JDBC and property files
Date Wed, 25 Feb 2004 21:16:38 GMT
Mario Manfre wrote:

>I've run across a problem where it seems like on an XP machine the property files variables
are padded.
>
>  
>
Hi,

I do not think that property files are padded on Windows XP, but you 
need to remove any trailing blanks in the value part of property files 
contents when the
properties are going to be used by the SQLExec task.

right
dbuser=johnsmith<crlf>

wrong
dbuser=johnsmith<space><crlf>

Now I do not have experience with Windows XP. Why do you say that 
property files are padded on Windows XP ?
Are you talking about property files generated automatically by, say 
Microsoft SQL server ?
If you are bothered by this problem, you might want to see if you can 
using <replaceregexp> (ant task) remove trailing blanks in your property 
file,
then load the property file.
To check the values of your properties, use <echo 
message="&lt;${my.property}&gt;"/>

If the content of my.property appears followed by spaces before the > 
sign, then  yes, your property file has trailing spaces and the values 
are not adequate
to be used in the sqlexec task.

Cheers,

Antoine

>I have a file user.properties which contains the following..
>
>jdbc-connect-db=TestDB1
>db.user=TestUser
>db.user.password=Testing_01 
>jdbc-connect=jdbc:microsoft:sqlserver://SQL-DB:1433;databasename=${jdbc-connect-db}
>dbDriver=com.microsoft.jdbc.sqlserver.SQLServerDriver
>
>
>when I run my ant script from windows2000 all is well, when I run it on XP I get a sql
login fail error for user 'TestDB1                         '
>
>If i change the above to look like
>
>   <property name="db.user" value="TestUser" />  
>   <property name="db.user.password" value="Testing_01" /> 
>
>everything works fine. Is there something simply not installed properly on the machine
(maybe) or is this a known issue? If so any ideas for a work around.
>
>Mario Manfre
>  
>




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


Mime
View raw message