I am trying to move an app from 3.0.7 to 3.2.3RC1 and am getting the
following error.  Apparently it's trying to connect to hsqldb
instead of the mysql db named java:/RestaurantDS.  The app works
correctly under 3.0.7.

I would appreciate any help in resolving this.  I have included a short
stack trace, login-config.xml and restaurant-ds.xml.

Thanks,

Jack


<--snip-->
[org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3RC1
(build: CVSTag=JBoss_3_2_3_RC1 date=200311101720)] Started in
1m:35s:493ms
INFO  [STDOUT] 95508 [main] INFO org.jboss.system.server.Server  - JBoss
(MX MicroKernel) [3.2.3RC1 (build: CVSTag=JBoss_3_2_3_RC1
date=200311101720)] Started in 1m:35s:493ms
DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new thread
data
INFO  [STDOUT] 399044 [TP-Processor3] DEBUG
org.apache.tomcat.util.threads.ThreadPool  - Getting new thread data
INFO  [org.jboss.security.plugins.JaasSecurityManagerService] Created
[EMAIL PROTECTED]
INFO  [STDOUT] 399210 [TP-Processor4] INFO
org.jboss.security.plugins.JaasSecurityManagerService  - Created
[EMAIL PROTECTED]
INFO  [org.jboss.security.plugins.JaasSecurityManagerService]
setCachePolicy, [EMAIL PROTECTED]
INFO  [STDOUT] 399212 [TP-Processor4] INFO
org.jboss.security.plugins.JaasSecurityManagerService  - setCachePolicy,
[EMAIL PROTECTED]
INFO  [org.jboss.security.plugins.JaasSecurityManagerService] Added
RestaurantSecurityRealm,
[EMAIL PROTECTED] to map
INFO  [STDOUT] 399213 [TP-Processor4] INFO
org.jboss.security.plugins.JaasSecurityManagerService  - Added
RestaurantSecurityRealm,
[EMAIL PROTECTED] to map
ERROR [org.jboss.security.auth.spi.DatabaseServerLoginModule] Query
failed
java.sql.SQLException: Table not found: USER in statement [SELECT
Password FROM User WHERE UserID = 'jlauman']
        at org.hsqldb.Trace.getError(Unknown Source)
        at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
        at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
        at org.hsqldb.jdbcConnection.execute(Unknown Source)
        at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
        at org.hsqldb.jdbcStatement.executeQuery(Unknown Source)
        at org.hsqldb.jdbcPreparedStatement.executeQuery(Unknown Source)
        at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:304)
        at
org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:100)
        at
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:150)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
<--snip-->



<-- restaurant-ds.xml -->


<?xml version="1.0" encoding="UTF-8"?>

<!--
=====================================================================
-->
<!--                                                                      
-->
<!--  JBoss Server
Configuration                                           -->
<!--                                                                      
-->
<!--
=====================================================================
-->

<!-- $Id: mysql-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ -->
<!--
==================================================================== -->
<!--  Datasource config for MySQL using 3.0.9
driver                      -->
<!--
==================================================================== -->


<datasources>
  <local-tx-datasource>
    <jndi-name>RestaurantDS</jndi-name>
   
<connection-url>jdbc:mysql://localhost:3306/restaurants</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name></user-name>
    <password></password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    
    <!-- Use the getConnection(user, pw) for logins
      <application-managed-security/>
    -->
    
    <!-- Use the security domain defined in conf/login-config.xml -->
    <security-domain>RestaurantDbRealm</security-domain>
    
    <!-- Use the security domain defined in conf/login-config.xml or the
         getConnection(user, pw) for logins. The security domain takes
         precidence.
   
<security-domain-and-application>RestaurantDbRealm</security-domain-and-application>
    -->
    
    <!-- Add this depends tag if you are using the tcp connection url
    <depends>jboss:service=Hypersonic</depends>
    -->
    
  </local-tx-datasource>

</datasources>




<-- login-config.xml -->

<?xml version='1.0'?>
<!DOCTYPE policy PUBLIC
      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
      "http://www.jboss.org/j2ee/dtd/security_config.dtd";>


<policy>
    <!-- Used by clients within the application server VM such as
    mbeans and servlets that access EJBs.
    -->
    <application-policy name = "RestaurantSecurityRealm">
       <authentication>
          <login-module code =
"org.jboss.security.auth.spi.DatabaseServerLoginModule"
             flag = "required">
             <module-option name =
"dsJiniName">java:/RestaurantDS</module-option>
             <module-option name = "principalsQuery">
                SELECT Password FROM User WHERE UserID = ?
             </module-option>
             <module-option name = "rolesQuery">
                SELECT Role, 'Roles' FROM User WHERE UserID = ?
             </module-option>
             <module-option name = "hashAlgorithm">MD5</module-option>
             <module-option name = "hashEncoding">HEX</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <!-- Used by clients within the application server VM such as
    mbeans and servlets that access EJBs.
    -->
    <application-policy name = "client-login">
       <authentication>
          <login-module code = "org.jboss.security.ClientLoginModule"
             flag = "required">
          </login-module>
       </authentication>
    </application-policy>

    <!-- Security domain for JBossMQ -->
    <application-policy name = "jbossmq">
       <authentication>
          <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
             flag = "required">
             <module-option name =
"unauthenticatedIdentity">guest</module-option>
             <module-option name =
"sm.objectname">jboss.mq:service=StateManager</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <!-- Security domains for testing new jca framework -->
    <application-policy name = "HsqlDbRealm">
       <authentication>
          <login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">sa</module-option>
             <module-option name = "userName">sa</module-option>
             <module-option name = "password"></module-option>
             <module-option name =
"managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <!-- Security domains for Restaurants Websites -->
    <application-policy name = "RestaurantDbRealm">
       <authentication>
          <login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">user</module-option>
             <module-option name = "userName">user</module-option>
             <module-option name = "password">password</module-option>
             <module-option name =
"managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=RestaurantDS</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <application-policy name = "FirebirdDBRealm">
       <authentication>
          <login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">sysdba</module-option>
             <module-option name = "userName">sysdba</module-option>
             <module-option name = "password">masterkey</module-option>
             <module-option name =
"managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=FirebirdDS</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <application-policy name = "JmsXARealm">
       <authentication>
          <login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">guest</module-option>
             <module-option name = "userName">guest</module-option>
             <module-option name = "password">guest</module-option>
             <module-option name =
"managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
          </login-module>
       </authentication>
    </application-policy>

    <!-- A template configuration for the jmx-console web application.
This
      defaults to the UsersRolesLoginModule the same as other and should
be
      changed to a stronger authentication mechanism as required.
    -->
    <application-policy name = "jmx-console">
       <authentication>
          <login-module
code="org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required" />
       </authentication>
    </application-policy>

    <!-- A template configuration for the web-console web application.
This
      defaults to the UsersRolesLoginModule the same as other and should
be
      changed to a stronger authentication mechanism as required.
    -->
    <application-policy name = "web-console">
       <authentication>
          <login-module
code="org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required" />
       </authentication>
    </application-policy>

    <!-- The default login configuration used by any security domain
that
    does not have a application-policy entry with a matching name
    -->
    <application-policy name = "other">
       <!-- A simple server login module, which can be used when the
number 
       of users is relatively small. It uses two properties files:
       users.properties, which holds users (key) and their password
(value).
       roles.properties, which holds users (key) and a comma-separated
list of
       their roles (value).
       The unauthenticatedIdentity property defines the name of the
principal
       that will be used when a null username and password are presented
as is
       the case for an unuathenticated web client or MDB. If you want to
       allow such users to be authenticated add the property, e.g.,
       unauthenticatedIdentity="nobody"
       -->
       <authentication>
          <login-module code =
"org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required" />
       </authentication>
    </application-policy>

</policy>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to