0 Replies Latest reply on Sep 11, 2002 10:08 PM by shogun1234

    connect to oracle problem through BMP

    shogun1234

      i have a question about how to connect to oracle. when testing BMP, source code is derived from
      oreilly's Enterprise JavaBean workbook for jboss, it works fine when the database
      is default database. however, when i switch to use oracle, there's error occurred.
      i only copy oracle-service.xml to default/deploy folder and
      edit login-config.xml resided in default/conf dir. change i made is as A). Then,
      when testing the sample BMP, it issues error like B). which parts should i adjust it?
      or what're the correct steps (and files) of configuration in order to connect to oracle correctly?
      BTW, env i have is jboss3.0.0 integrated with tomcat4.0.3, window 2000 pro., j2sdk1.4, oracle 7.x.
      i appreciate any suggestions, thank you very much~


      ============
      A).
      <!-- oracle-service.xml -->
      <application-policy name = "OracleDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">same_as_user_name</module-option>
      <module-option name = "userName">user_name</module-option>
      <module-option name = "password">password</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
      </login-module>

      </application-policy>
      ...
      ...
      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      OracleDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@host_or_ip:port:sid</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">user_name</config-property>
      <config-property name="Password" type="java.lang.String">password</config-property>



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

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">

      <module-option name = "principal">same_as_user_name</module-option>

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

      </application-policy>


      B).
      java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
      java.lang.ClassNotFoundException: org.jboss.resource.ResourceException (
      no security manager: RMI class loader disabled)
      ============