Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Datasource with Orion

0 views
Skip to first unread message

Jörgen Wahlund

unread,
May 13, 2002, 10:48:08 AM5/13/02
to
I have some problem using datasources with Orion.

This is the datasource xml:
<data-source
class="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
name="MS SQL Server"
location="jdbc/db"
pooled-location="jdbc/dbPool"
connection-driver="com.microsoft.jdbcx.sqlserver.SQLServerDriver"
username="user"
password="pass"
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db"
max-connections="30"
min-connections="2"
inactivity-timout="60"
wait-timeout="30"
inactivity-timeout="30"
schema="database-schemas/ms-sql.xml"
/>


Orion starts up and seemes to find the Datasource.

Here's the code I run in orion:
-----------
String dataSourceJndiName = "jdbc/dbPool";
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dataSourceJndiName);
Connection con = ds.getConnection();
-----------

The code goes well until the getConnection() call. This is casted:

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Unable to
connect. DataSource property serverName must be specified.
at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at
com.microsoft.jdbcx.base.BaseDataSource.getConnectionProperties(Unknown
Source)
at
com.microsoft.jdbcx.base.BaseDataSource.getBaseConnection(Unknown
Source)
at
com.microsoft.jdbcx.base.BaseDataSource.getPooledConnection(Unknown
Source)
at com.evermind.sql.OrionPooledDataSource._bgb(Unknown Source)
at com.evermind._jb._bgb(Unknown Source)
at com.evermind.sql.OrionPooledDataSource.getConnection(Unknown
Source)

I'm very tired of having this kind of faults. Any suggestions about the
problem.

Regars Jörgen

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages