Background
The title might sound a bit confusing, because everyone that has experienced an ORA-01017 knows it only happens if either the database username or password is incorrect.I recently had to change the password for all of the infrastructure component schemas in a Oracle® SOA Suite 12.1.3 installation. How to do it is documented at https://docs.oracle.com/middleware/1213/core/ASADM/repos.htm#ASADM637
After running the modifyBootStrapCredential for the OPSS configuration I expected everything to be dandy except a few ORA-01017 errors for the data sources I had not yet updated with the new password. Everything I needed to do was to edit each data source and provide the new password. Or so I thought...
The problem
When I tried to apply the changes I got the following ORA-01017 error for each data source I tried to edit:I was a bit thunderstruck at first because the username and passwords worked fine in both SQL*Plus and in SQL Developer.
The AdminServer out file contained errors like this:
<Jan 19, 2016 1:15:54 PM UTC> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "LocalSvcTblDataSource" due to error weblogic.application.ModuleException: weblogic.common.resourcepool.ResourceSystemException:
Could not create connection for datasource '<data source name>'.
The returned message is: ORA-01017: invalid username/password; logon denied
It is likely that the login or password is not valid.
It is also possible that something else is invalid in
the configuration or that the database is not available.
weblogic.application.ModuleException: weblogic.common.resourcepool.ResourceSystemException:
Could not create connection for datasource '<data source name>'.
The returned message is: ORA-01017: invalid username/password; logon denied
It is likely that the login or password is not valid.
It is also possible that something else is invalid in
the configuration or that the database is not available.
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:350)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:175)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:170)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: weblogic.common.resourcepool.ResourceSystemException:
Could not create connection for datasource '<data source name>'.
The returned message is: ORA-01017: invalid username/password; logon denied
It is likely that the login or password is not valid.
It is also possible that something else is invalid in
the configuration or that the database is not available.
at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:322)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection0(ConnectionEnvFactory.java:492)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.access$000(ConnectionEnvFactory.java:20)
at weblogic.jdbc.common.internal.ConnectionEnvFactory$1.run(ConnectionEnvFactory.java:388)
at java.security.AccessController.doPrivileged(Native Method)
Truncated. see log file for complete stacktrace
>
The workaround
For each data source I had to do the following to work around this problem:
- Clicked the Lock & Edit button.
- Had to note which targets the data source was using.
- Removed the targets from the data source, and clicked on the Save button.
- Clicked on the Activate Changes button.
- Clicked the Lock & Edit button.
- Updated the password for the data source, and clicked on the Save button.
- Clicked on the Activate Changes button.
- Clicked the Lock & Edit button.
- Added the targets that I noted in step 2 to the data source, before I clicked on the Save button.
- Clicked the Activate Changes button.
After all data sources had been updated with the new passwords, and the data sources had been re-targeted, I did a full domain restart.
While I started the AdminServer up, I looked out for errors like these which could indicate I had forgotten to update some data sources:
<Jan 19, 2016 1:32:34 PM UTC> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "<data source name>" due to error weblogic.application.ModuleException: weblogic.common.resourcepool.ResourceSystemException
Thanks for spotting the issue in step 10. I'll fix that later today.
ReplyDeleteRegarding the question: I like to tinker and try things out. I'm probably better at trial and error than reading the documentation from front to back. For this specific issue though, it is not the first time I've seen Weblogic use old values. Sometimes when you redeploy you also see it use classes from your previous deploy.
You are my hero of the day. Solution worked like a charm - appreciate your posting this.
ReplyDeleteThanks for the feedback. I am glad you found it useful :)
DeleteMany thanks, your solution worked smoothly...
ReplyDeleteYou saved my day. Thanks a lot ;)
ReplyDeleteI Have Same Error in My JDeveloper 12.2.1.3 If I Run Weblogic server Can u Help Me
ReplyDeleteMuch appreciate the solution provided. Can anyone comment on the RCA of the issue caused.
ReplyDeleteThanks in advance.
Fantastic, I was having difficulty in bringing back the UI after changing the password, these steps help me in resolving the issue. thanks so much.
ReplyDelete