Hi,

I had following error:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection.

The reason was that I start the broker with following code:

broker = PersistenceBrokerFactory.createPersistenceBroker(new
PBKey("MyDB"));

this calls the method
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor.setUserName(Stri
ng str)

two times!!?? One time with the proper username from the repository and
one time with NULL.

It seams to be an error in the framework. Or should there be a new method
like
PersistenceBrokerFactory.getKey("MyDB")?

Work around:

broker =
PersistenceBrokerFactory.createPersistenceBroker(
PersistenceBrokerFactory.getDefaultKey());

 

my jdbc-connection-descriptor looks like:

    <jdbc-connection-descriptor
        jcd-alias="MyDB"
        default-connection="true"
        platform="MsSQLServer"
        jdbc-level="2.0"
        driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
        protocol="jdbc"
        subprotocol="microsoft:sqlserver"
        dbalias="//localhost:1433;DatabaseName=java"
        username="java"
        password="java"
        batch-mode="false"
   >

 

regards 

Matthias



Matthias Roth
Dipl. Ing. HTL
in Wirtschaftsinformatik

impart Software Engineering GmbH
Chasseralstrasse 13
Postfach
CH-3063 Ittigen


Phone           +41 (0)31 922 39 25
Fax             +41 (0)31 922 39 18
EMail           mailto:[EMAIL PROTECTED]
Homepage        http://www.impart.ch



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to