2 Replies Latest reply on Feb 4, 2005 3:09 AM by Felix Sima

    Connection + classpath problems

    Felix Sima Newbie

      Hello.

      Trying to deploy a simple test application packaged in jwm.ear (I'm learning how to configure the form-based authentication) I encountered 2 problems :

      Problem 1:

      Using a DB realm as application policy.
      After entering username/password I always get the error page as output, but no log messages, so I have no ideea what's wrong with my configuration (see below).

      Problem 2:

      Using a file realm as application policy.
      The authentication works fine but I get an error saying that my servlet class is not found, even
      if I double checked that the class is in one of the jars under WEB-INF/lib/ in jwm.war.

      Please see below for further info.
      Thank you in advance,
      Felix

      Configuration:

      Java 1.5, jboss-4.0.1, Win XP

      Excerpts from :

      login-config.xml
      ...

      <! -- DB realm -- >
      <application-policy name="JWM">

      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/JWM</module-option>
      <module-option name="principalsQuery">
      select password from users where username=?
      </module-option>
      <module-option name="rolesQuery">
      select rolename,'Roles' from user_roles where username=?
      </module-option>
      </login-module>

      </application-policy>

      <! -- file realm -- >
      <application-policy name = "JWMFile">

      <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
      <module-option name="usersProperties"> users.properties</module-option>
      <module-option name="rolesProperties"> roles.properties</module-option>
      </login-module>

      </application-policy>
      ...

      mysql-ds.xml

      <local-tx-datasource>
      <jndi-name>JWM</jndi-name>
      <connection-url>jdbc:mysql://127.0.0.1:3306/jwm</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>webclient</user-name>
      < password>pippo< /password>
      </local-tx-datasource>


      Files :
      jwm.ear
      | - javawm.war
      |
      | - META-INF/
      |
      |- Manifest.mf
      |- jboss-app.xml
      |- application.xml

      jwm.war
      | - META-INF/
      | |
      | |- Manifest.mf
      |
      |
      | - WEB-INF/
      | | - jboss-web.xml
      | | - web.xml
      | |
      | | - lib/
      | | - *.jar
      |
      |
      | - user.properties
      | - roles.properties
      | - login.jsp
      | - error.jsp