1 Reply Latest reply on Sep 9, 2002 12:07 PM by lucas3

    ORA-01006: bind variable does not exist

    lucas3

      Hello
      I get this error while trying to authenticate with DatabaseServerLoginModule. I use JBoss-3.0.0, Oracle 8.1.7 and EJB 2.0
      I only configured login-config.xml in this way:

      <application-policy name = "LoginRealm">

      <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
      <module-option name="dsJndiName">java:/OracleDS</module-option>
      <module-option name="principalsQuery"> select PASSWORD from APPUSER where USERNAME=?</module-option>
      <module-option name="rolesQuery"> select ROLE.NAME from ROLE, ROLEDSUBJECT, BUSSUBJECT, APPUSER where APPUSER.BUSINESSSUBJECT = BUSSUBJECT.ID and BUSSUBJECT.ID = ROLEDSUBJECT.BUSINESSSUBJECT and ROLEDSUBJECT.ROLE = ROLE.ID</module-option>
      <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
      </login-module>

      </application-policy>



      the first query goes ok (principalsQuery), in the second one (rolesQuery) I get the error: java.sql.SQLException: ORA-01006: bind variable does not exist.

      Is there something else to be configured?

      Thank you in advance for your support


        • 1. Re: ORA-01006: bind variable does not exist
          lucas3

          I resolved the problem by myself the rolesQuery had to be:

          <module-option name="rolesQuery"> select ROLE.NAME, 'ROLES' from ROLE, ROLEDSUBJECT, BUSSUBJECT, APPUSER where APPUSER.BUSINESSSUBJECT = BUSSUBJECT.ID and BUSSUBJECT.ID = ROLEDSUBJECT.BUSINESSSUBJECT and ROLEDSUBJECT.ROLE = ROLE.ID and USERNAME=?</module-option>