I have to imolement jenkins pipeline where we use ansible playbooks to undeploy and then deploy 12 war files into oracle weblogic server. When we manually undeploy the war files and then try to deploy updated war files, I am not getting any error and it is deployed successsfully. But when I try to undeploy and then deploy by pipeline, I am getting below error. In our code, developers have set hibernate.dialect to Oracle10g dialect. We are using weblogic.deployer utility to undeploy and deploy.
Error Message in Pipeline - "weblogic.application.ModuleException: .hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set:.hibernate.HibernateException:Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set"
We are not using any plugins for this. we are directly trying to deploy after logging into server
I have tried the below ansible steps.
name: Downloading war file from Nexus for Deployment get_url: url: "{{ artifact_URL }}" dest: "/wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/zip/artifact.zip" mode: '0777' username: "{{ nexususername }}" password: "{{ nexuspassword }}" register: downloadwar
name: Unzipping the downloaded file unarchive: src: "/wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/zip/artifact.zip" dest: "/wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/" mode: '0777' remote_src: yes when: downloadwar is succeeded
name: Starting Deployment------------> block: - name: Undeploying the artifact shell: "cd /wls_domains/devnoncp05/ORFTA/deployment_automation/Dev && ./undeploy.sh" ignore_errors: yes
- name: Dev Deployment shell: "cd /wls_domains/devnoncp05/ORFTA/deployment_automation/Dev && ./ORFTA_DEV_DEPLOY.sh" register: deploy_result - name: Copy Build Folder of artifact.zip to Archive folder shell: "cp -r /wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/BuildFolder /wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/Archive/" when: deploy_result.rc == 0
rescue: - name: Getting files from Archive folder i,e. /wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/Archive shell: "cp -r /wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/Archive/BuildFolder /wls_domains/devnoncp05/ORFTA/deployment_automation/wars/Dev/"
- name: Undeploying the artifact shell: "cd /wls_domains/devnoncp05/ORFTA/deployment_automation/Dev && ./undeploy.sh" register: undeployLogrescue1 - debug: msg: "{{ undeployLogrescue1.stdout.split('\n') }}" - name: Deploying the wars shell: "cd /wls_domains/devnoncp05/ORFTA/deployment_automation/Dev && ./rollback.sh" register: deployLogrescue1 - debug: msg: "{{ deployLogrescue1.stdout.split('\n') }}"