Tuesday, February 18, 2020

ouafDatabasePatch.sh gives java.sql.SQLException: ORA-01017: invalid username/password; logon denied


java.sql.SQLException: ORA-01017: invalid username/password; logon denied

When we are trying to apply a patch in CCB we had came across the below error as invalid username and password, as the hashed password might not be in sync with the application layer and database layer, we need to perform the below steps to update the password and proceed through the patching 

Step 1 trying to apply the database patch

[appccbt@omccbtst ORACLE]$ sh ouafDatabasePatch.sh


Enter the target database type (O/M/D) [O]: O


Enter the username that owns the schema: CISADM

Enter the password for the CISADM user:


Enter the name of the Oracle Database Connection String: omccbtst.<domain>.com:1590:OMTRAIN

Couldn't connect to database ORACLE omccbtst.<domain>.com:1590:OMTRAIN CISADM : java.sql.SQLException: ORA-01017: invalid username/password; logon denied


Step 2: update the database patch by using invokeDBUpdatePatch.sh command from the ouaf home/bin
Once the command had been executed we need to provide the new password as the input 

[appccbt@omccbtst bin]$ sh invokeDBUpdatePatch.sh -p
invokeDBUpdatePatch.sh: option requires an argument -- p
INFO: Loaded file:/u06/app/oracle/product/fmw/ouaf/OMTCCB/splapp/standalone/config/hibernate.properties from classpath: {hibernate.connection.password=ENCKS(EaodgSKfOmYz0giX+yN/8QliK1eRwWl5FLkIC9BYFWk=), hibernate.ucp.min_size=1, hibernate.ucp.connection_wait_timeout=5, hibernate.query.substitutions=true 'Y', false 'N', hibernate.cache.use_second_level_cache=false, hibernate.show_sql=false, hibernate.ucp.inactive_connection_timeout=300, hibernate.jdbc.batch_size=30, hibernate.jdbc.fetch_size=100, hibernate.ucp.max_size=30, hibernate.max_fetch_depth=2, hibernate.connection.release_mode=on_close, hibernate.ucp.max_idle_time=0, hibernate.connection.username=CISADM, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.ucp.max_statements=50, hibernate.connection.provider_class=com.splwg.shared.common.UCPConnectionProvider, hibernate.ucp.jmx_enabled=false, hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory, hibernate.dialect=org.hibernate.dialect.Oracle10gDialect, hibernate.connection.url=jdbc:oracle:thin:@//omccbtst.<domain>.com:1590/OMTRAIN, hibernate.query.factory_class=org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory}
INFO: Loaded file:/u06/app/oracle/product/fmw/ouaf/OMTCCB/splapp/standalone/config/spl.properties from classpath: {spl.runtime.cobol.sql.cursoredCache.maxRows=10, com.oracle.ouaf.system.keystore.hmac_key_alias=ouaf.system.hmac, spl.tools.loaded.applications=base,ccb,cm, spl.runtime.environ.init.dir=/u06/app/oracle/product/fmw/ouaf/OMTCCB/etc, spl.runtime.environ.SPLEBASE=/u06/app/oracle/product/fmw/ouaf/OMTCCB, com.oracle.ouaf.system.keystore.mode=CBC, spl.geocodeDatasource.url=, calendar.japanese.eras=name:Taisho,abbr:T,since:1912-07-30,endDate:1926-12-24,japAbbr:大正;name:Showa,abbr:S,since:1926-12-25,endDate:1989-01-07,japAbbr:昭和;  name:Heisei,abbr:H,since:1989-01-08,endDate:,japAbbr:平成, ouaf.batch.onlineLogDir=/u06/app/oracle/product/fmw/ouaf/sploutput/OMTCCB, com.oracle.ouaf.system.truststore.passwordFileName=/u06/app/oracle/product/fmw/ouaf/OMTCCB/ks/.ouaf_truststore_pass, com.oracle.ouaf.flush.jndi.provider.url=t3s://omccbtst.<domain>.com:8004, com.oracle.ouaf.flush.jms.disabled=true, com.oracle.ouaf.truststore.type=JCEKS, spl.runtime.cobol.cobrcall=false, com.oracle.ouaf.flush.jms.connection=jms/OUFlushConnectionFactory, com.oracle.ouaf.system.keystore.file=/u06/app/oracle/product/fmw/ouaf/OMTCCB/ks/.ouaf_keystore, com.oracle.ouaf.flush.jms.requestTopic=jms/OUFlushRequestTopic, jmx.remote.x.password.file=scripts/ouaf.jmx.password.file, com.oracle.ouaf.xsl.dir=file:////u06/app/oracle/product/fmw/ouaf/OMTCCB/splapp/xai/schemas, spl.runtime.environ.SPLOUTPUT=/u06/app/oracle/product/fmw/ouaf/sploutput/OMTCCB, spl.runtime.sql.highValue=, jmx.remote.x.access.file=scripts/ouaf.jmx.access.file, com.oracle.ouaf.system.database.disableTagging=false, spl.runtime.oracle.statementCacheSize=300, spl.runtime.cobol.sql.fetchSize=150, spl.runtime.options.allowSystemDateOverride=true, com.oracle.ouaf.system.keystore.passwordFileName=/u06/app/oracle/product/fmw/ouaf/OMTCCB/ks/.ouaf_storepass, com.oracle.XPath.LRUSize=, spl.geocodeDatasource.contextFactory=weblogic.jndi.WLInitialContextFactory, spl.runtime.service.extraInstallationServices=CILTINCP, com.oracle.ouaf.xsd.dir=file:////u06/app/oracle/product/fmw/ouaf/OMTCCB/splapp/xai/schemas, spl.runtime.options.isFCFEnabled=false, com.oracle.ouaf.system.keystore.padding=PKCS5Padding, spl.runtime.cobol.encoding=UTF8, spl.runtime.cobol.sql.cache.maxTotalEntries=1000, ouaf.database.session.setInstallationTimeZone=false, ouaf.accessiblity.features=false, com.oracle.XPath.flushTimeout=, spl.runtime.performSignedNumberValidation.C1=false , com.oracle.ouaf.flush.jms.responseTopic=jms/OUFlushResponseTopic, spl.geocodeDatasource.password=, spl.geocodeDatasource.user=, com.oracle.ouaf.system.truststore.file=/u06/app/oracle/product/fmw/ouaf/OMTCCB/ks/.ouaf_truststore, spl.runtime.utf8Database=true, com.oracle.ouaf.system.keystore.alias=ouaf.system, spl.runtime.cobol.sql.disableQueryCache=false, com.splwg.schema.newValidations.C1=false, com.splwg.schema.newValidations.F1=true, com.oracle.ouaf.system.keystore.type=JCEKS, com.oracle.ouaf.flush.jndi.factory.initial=weblogic.jndi.WLInitialContextFactory, spl.runtime.environ.isWebExpanded=false}
Enter the password  (or hit ENTER to quit):
Re-enter the value:
 -   2020-02-18 14:52:33,308 [main] INFO  (shared.common.DBUpdatePatchingCredentials) DB Config Info record in the table CI_WFM_OPT has been successfully updated has been successfully updated with new password.
 -   2020-02-18 14:52:33,311 [main] INFO  (shared.common.DBUpdatePatchingCredentials) Committed changes.
[appccbt@omccbtst bin]$

Step 3 Run ouafDatabasePatch.sh command to apply the patch in CCB database


[appccbt@omccbtst ORACLE]$ sh ouafDatabasePatch.sh


Enter the target database type (O/M/D) [O]:


Enter the username that owns the schema: CISADM

Enter the password for the CISADM user:


Enter the name of the Oracle Database Connection String: omccbtst.<domain>.com:1590:OMTRAIN

Target Schema is a Production Schema



Ready to process patches, Do you want to continue? (Y/N): Y

Working Directory: OMTRAIN001

***********************************

Setting up language file: OMTRAIN001/CDXPatch.lang
exit value: 0

Applying 23621236 ...

Writing to log file: OMTRAIN001/log23621236.log



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

--Applying patch 23621236 at 02-18-2020 14:54:21 using $LastChangedRevision: 43302 $

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


--Copying language information



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

--Patch 23621236 applied successfully at 02-18-2020 14:54:21

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


Patch applied successfully..

0
[appccbt@omccbtst ORACLE]$