You already have by
<module-option name="dsJndiName">java:/PasswordDS</module-option>

You have to validate that java:/PasswordDS actually points to your
database connection factory.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Ionel Gardais" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 7:34 AM
Subject: [JBoss-user] specifiing the datasource jndi name for the
DatabaseServerLoginModule


> Hi,
>
> After succeded in configuring JBoss to auth my users via the
> UsersRolesLoginModule, I'm trying to use the DatabaseServerLoginModule.
>
> I modified the login-config.xml to match my needs :
>
> <snip>
>     <application-policy name = "lab">
>        <authentication>
>           <login-module code =
> "org.jboss.security.auth.spi.DatabaseServerLoginModule"
>              flag = "required" />
>             <module-option
> name="dsJndiName">java:/PasswordDS</module-option>
>             <module-option name="principalsQuery">select Password from
> Principals where PrincipalID=?</module-option>
>             <module-option name="rolesQuery">select Role, RoleGroup from
> Roles where PrincipalID=?</module-option>
>        </authentication>
>     </application-policy>
> </snip>
>
> I've deployed a service that connect to my Password database, created
> the two tables, populated them and all runs well.
>
> When my clients try to login, an error is thrown :
> <snip>
> ERROR [DatabaseServerLoginModule] Query failed
> java.sql.SQLException: Table not found: PRINCIPALS in statement [select
> Password ...]
> at org.hsqldb.Trace.getError(Trace.java:180)
>         at org.hsqldb.Result.<init>(Result.java:175)
>         at
> org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
>         at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
>         at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
> ...
> </snip>
>
> As you can see, it is trying to connect via the hsqldb (the DefaultDS
> datasource) whereas I have specified that I want to use
> "java:/PasswordDS" and PasswordDS use mysql.
>
>
> Any tips to force the DatabaseServerLoginModule to use another
> datasource than the DefaultDS ?
>
>
> thanks,
> ionel




-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to