Sometimes it can happen you will face a requirement to deploy previously generated EAR on another server. In my specific case we were deploying on WebLogic server directly from JDeveloper 11g, with enabled auto generation for JDBC descriptors - see my previous post. For some specific reasons, now we need to redeploy same EAR on another server, however we dont have access anymore to development environment. What we did, we took previously deployed EAR from ORACLE_HOME/user_projects/domains/domain_name/servers/AdminServer/upload folder and tried to deploy it manually. Of course we got error, because EAR was generated with JDBC descriptor auto generation enabled. We got error, same as described in my blog post mentioned above - No credential mapper entry found for password indirection user=hr data source HrDS:
This error is logical, what we need to do is to modify deployment plan and to remove JDBC descriptor declaration. When you deploy, you can do this through Oracle Enterprise Manager 11g, it offers option to edit Deployment Plan just before actual deployment. Its possible to open Deployment Plan through Oracle Enterprise Manager 11g, and it allows to delete JDBC descriptor:
Bad news - its not removing it, even after pressing Apply. Delete action is not working and deployment Plan remains the same. Since it remains the same, deployment fails the same error mentioned above.
In seems no choice and we need to apply good old manual approach. Extract EAR archive you want to deploy, and go to META-INF folder. Remove (back-up) JDBC configuration file (HrDS-jdbc.xml in my case) and open weblogic-application.xml file for editing:
From weblogic-application.xml file remove entry related to JDBC descriptor:
Now pack your EAR back, you can simply Zip it and rename file extension to ear. With modified descriptors, Deployment Plan will updated automatically and deployment should be successful:
Just make sure you have JDBC Data Source defined on WLS. Application will use Data Source that should be present on WebLogic server, it will not be autogenerated. Also you should check if your deployment target is listed in JDBC Data Source targets as well: