I'm working on a Java project that uses jetty to run on local a webservice that access some databases. We was using jtds to access SQLServer databases, but now **we need to work with DATETIME2 fields** and this **enforce us to use Microsft SQLServer driver** instead of jtds.

So, before setting all to use it, and running OK on some junit test that creates directly Connection objects using these driver, when we try the main app, we get in trouble.
We have a jetty-env.xml like this :

```
<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
    <Call class="org.mortbay.log.Log" name="warn">
        <Arg>executing jetty-env.xml</Arg>
    </Call>

    <New id="DATABASE" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/DATABASE</Arg>
        <Arg>

            <!--  Servidor SQLserver -->
            <New class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                <Set name="User">username</Set>
                <Set name="Password">password</Set>
                <Set name="DatabaseName">databasename</Set> 
                <Set name="ServerName">servername</Set> 
                <Set name="PortNumber">portnumber</Set>
            </New>
        </Arg>
    </New>
</Configure>

```

But when I launch the app with Jetty on Eclipse, I get a SQLException saying that can't log with the username. Setting a breakpoint and debuging, I saw that when the Java code gets the Datasource from context, it not have a password!!!

```
String dsName = props.getProperty ("hibernate.connection.datasource"); // "java:comp/env/jdbc/DATABASE"
Context ctx = new InitialContext();
SQLServerDataSource sqlds = (SQLServerDataSource) ctx.lookup (dsName);
//sqlds.setPassword ("passoword");
DataSource ds = (DataSource) sqlds;

```

If I uncomment the sqlds.setPassword line, it conencts ok to the database. So by a unknow reason, the SQLServerDataSource isn't not getting the password from jetty. I try to use different 

Any clue of wtf is happening here ?

PD: We are using Jetty 6 with an old customized version of jetty-run-jetty plugin that auto apply maven overlays. So changing jetty version not is an option at this moment.

edit: added dsnames string