0 Replies Latest reply on Jan 28, 2002 6:13 PM by Ted Schwartz

    oracle connection problem - null password

    Ted Schwartz Newbie

      Hope this helps others:

      The oracle-service.xml obtained from CVS ($Id: oracle-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $)
      and those posted elsewhere in documentation failed to establish a database connection. Here's what the exception looked like:


      javax.resource.ResourceException: Unable to create DB connection for url:

      exception: java.sql.SQLException: ORA-01005: nul
      l password given; logon denied

      The problem was the inclusion of the password in the same element as the userName in the PrincipalMappingProperties.

      The revised (and working) file lists the password as an element separate from the username.

      I also added a value for AutoCommit (which requires different placement for thin vs. oci drivers, see EOM):

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- $Id: oracle-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $ -->

      <!-- =====================================================================-->
      <!-- oracleds-service.xml -->
      <!-- JBoss v3.0alpha (november 23, 2001) ORACLE thin driver Configuration -->
      <!-- tested against ORACLE v8.x -->
      <!-- ==================================================================== -->
      <!-- -->
      <!-- please put jdbc driver (in this case classes12.zip) in jboss_home/lib/ext -->
      <!-- please put this file (oracleds-service.xml) under jboss_home/deploy -->
      <!-- Contributed by Christian Biasuzzi bic@quinary.com-->
      <!-- ===================================================================== -->







      ConnectionURL=jdbc:oracle:thin:@<DB_URL>:<DB_PORT>:
      DriverClass=oracle.jdbc.driver.OracleDriver
      AutoCommit=true

      OracleDS
      java:/TransactionManager
      <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
      <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
      #
      #Wed Aug 15 16:17:29 EDT 2001
      BlockingTimeoutMillis=50000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      userName=<YOUR_USER_NAME>

      Password=<YOUR_PASSWORD>




      I also found that if you use the oci driver, it requires the AutoCommit element in the list of ConnectionManagerProperties rather than
      ManagedConnectionFactoryProperties (and the url is of the form ConnectionURL=jdbc:oracle:oci8:@<SERVICE_NAME>