views:

54

answers:

0

i've the following in my context.xml

<Resource name="jdbc/SomeDataSource" auth="Container"
            type="javax.sql.DataSource" username="foo" password="bar"
            driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/MyDatabase"
          initialSize="100" maxActive="500" maxIdle="50" minIdle="5" maxWait="20" validationQuery="select 1" removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true"/>

This works fine. But when i try to add encoding like

url="jdbc:jtds:sqlserver://localhost:1433/MyDatabase?useEncoding=true&amp;characterEncoding=UTF-8"

i get an exception saying "Cannot create PoolableConnectionFactory (login failed). i've no clue. any idea?

update: i've found that the url i used was for mssql. does anybody know how i do it for for ms sql???