3 Replies Latest reply on Sep 17, 2002 7:12 PM by jakasjava

    JBoss3/Tomcat4 Bundle: OracleDS: principal=null

    gchianes

      We are upgrading from JBoss 2.4.x and Tomcat 3.x running in seperate JVMs to the JBoss3/Tomcat4 bundle.

      It appears we're connecting to the database, but failing to return data:
      java.lang.SecurityException: Invalid authentication attempt, principal=null

      -------------------------------------------------------

      login-config.xml:
      <application-policy name = "OracleDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentity
      LoginModule" flag = "required">
      <module-option name = "principal">myusername</module-option>
      <module-option name = "userName">myusername</module-option>
      <module-option name = "password">mypassword</module-option>
      <module-option name = "managedConnectionFactoryName">
      jboss.jca:service=XaTxCM,name=OracleDS
      </module-option>
      </login-module>

      </application-policy>

      -------------------------------------------------------

      oracle-service.xml


      ...

      OracleDbRealm

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      OracleDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@myhostname:1521:mysid</config-property>
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>




      -------------------------------------------------------

      I'm not sure what 'principal' should be in this context. The examples I've seen show the same value as username.

      Any suggestions would be greatly appreciated.
      George

        • 1. Re: JBoss3/Tomcat4 Bundle: OracleDS: principal=null
          davidjencks

          <module-option name = "managedConnectionFactoryName">
          jboss.jca:service=XaTxCM,name=OracleDS
          </module-option>

          should be

          <module-option name = "managedConnectionFactoryName">
          jboss.jca:service=LocalTxCM,name=OracleDS
          </module-option>

          It has to match the object name you are using.

          • 2. Re: JBoss3/Tomcat4 Bundle: OracleDS: principal=null
            gchianes

            David,

            Thanks for your quick response. I've tried your suggested resolution, but still get the same error. Is there significance to either the LocalTxCM or XATxCM?

            Also, there is a warning in the log:

            [org.jboss.system.ServiceController] jboss.jca:ser
            vice=LocalTxDS,name=OracleDS does not implement any Service methods

            I'm willing to try just about any changes you suggest.
            Thanks again,
            George

            • 3. Re: JBoss3/Tomcat4 Bundle: OracleDS: principal=null
              jakasjava

              That is just a warning. it has nothin to do with the problem u are facing.

              Issue is in login-config.xml
              u have to change the user id, password, principal and also in oracle-service.xml as well.
              take close look peacefully @ login-config.xml and oracle-service.xml. this is st. forward.


              sudhi